Could you open a trac ticket? This is definitely a bug
(most probably in `interfaces/expect.py`).

Le 03/03/2019 à 11:41, Simon Brandhorst a écrit :
Trying to provoke more errors:

sage: from sage.env import SAGE_EXTCODE
sage: for k in range(10000):
....:     gp = Gp()
....:     gp.read(SAGE_EXTCODE + "/pari/simon/qfsolve.gp")
....:     k


breaks at k = 1922 with

---------------------------------------------------------------------
OSError                             Traceback (most recent call last)
<ipython-input-5-38e8adf2a837> in <module>()
       1 for k in range(Integer(10000)):
       2     gp = Gp()
----> 3     gp.read(SAGE_EXTCODE + "/pari/simon/qfsolve.gp")
       4     k
       5

/home/simon/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc
in read(self, filename)
     222             sage: os.unlink(filename)
     223         """
--> 224         self.eval(self._read_in_file_command(filename))
     225
     226     def _read_in_file_command(self, filename):

/home/simon/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc
in eval(self, code, strip, synchronize, locals, allow_use_file,
split_lines, **kwds)
    1349                 elif split_lines:
    1350                     return '\n'.join([self._eval_line(L,
allow_use_file=allow_use_file, **kwds)
-> 1351                                         for L in code.split('\n')
if L != ''])
    1352                 else:
    1353                     return self._eval_line(code,
allow_use_file=allow_use_file, **kwds)

/home/simon/sage/local/lib/python2.7/site-packages/sage/interfaces/gp.pyc
in _eval_line(self, line, allow_use_file, wait_for_prompt,
restart_if_needed)
     443         a = Expect._eval_line(self, line,
     444                               allow_use_file=allow_use_file,
--> 445                               wait_for_prompt=wait_for_prompt)
     446         if a.find("the PARI stack overflows") != -1:
     447             verbose("automatically doubling the PARI stack and
re-executing current input line")

/home/simon/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc
in _eval_line(self, line, allow_use_file, wait_for_prompt,
restart_if_needed)
     914         try:
     915             if self._expect is None:
--> 916                 self._start()
     917             E = self._expect
     918             try:

/home/simon/sage/local/lib/python2.7/site-packages/sage/interfaces/gp.pyc
in _start(self, alt_message, block_during_init)
     241
     242     def _start(self, alt_message=None, block_during_init=True):
--> 243         Expect._start(self, alt_message, block_during_init)
     244         # disable memory debugging: those warnings can only confuse
our
     245         # interface

/home/simon/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc
in _start(self, alt_message, block_during_init)
     501                         # Work around
https://bugs.python.org/issue1652
     502                         preexec_fn=lambda:
signal.signal(signal.SIGPIPE, signal.SIG_DFL),
--> 503                         quit_string=self._quit_string())
     504             except (ExceptionPexpect, pexpect.EOF) as e:
     505                 # Change pexpect errors to RuntimeError

/home/simon/sage/local/lib/python2.7/site-packages/sage/interfaces/sagespawn.pyx
in sage.interfaces.sagespawn.SageSpawn.__init__
(build/cythonized/sage/interfaces/sagespawn.c:1948)()
      63         kwds.setdefault("maxread", 4194304)
      64
---> 65         with ContainChildren(silent=True):
      66             spawn.__init__(self, *args, **kwds)
      67

/home/simon/sage/local/lib/python2.7/site-packages/sage/interfaces/sagespawn.pyx
in sage.interfaces.sagespawn.SageSpawn.__init__
(build/cythonized/sage/interfaces/sagespawn.c:1902)()
      64
      65         with ContainChildren(silent=True):
---> 66             spawn.__init__(self, *args, **kwds)
      67
      68         self.delaybeforesend = None

/home/simon/sage/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc in
__init__(self, command, args, timeout, maxread, searchwindowsize, logfile,
cwd, env, ignore_sighup, echo, preexec_fn, encoding, codec_errors,
dimensions, use_poll)
     202             self.name = '<pexpect factory incomplete>'
     203         else:
--> 204             self._spawn(command, args, preexec_fn, dimensions)
     205         self.use_poll = use_poll
     206

/home/simon/sage/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc in
_spawn(self, command, args, preexec_fn, dimensions)
     301
     302         self.ptyproc = self._spawnpty(self.args, env=self.env,
--> 303                                      cwd=self.cwd, **kwargs)
     304
     305         self.pid = self.ptyproc.pid

/home/simon/sage/local/lib/python2.7/site-packages/sage/interfaces/sagespawn.pyx
in sage.interfaces.sagespawn.SageSpawn._spawnpty
(build/cythonized/sage/interfaces/sagespawn.c:2133)()
      80             SagePtyProcess.spawn(...)
      81         """
---> 82         ptyproc = SagePtyProcess.spawn(args, **kwds)
      83         ptyproc.quit_string = self.quit_string
      84         return ptyproc

/home/simon/sage/local/lib/python2.7/site-packages/ptyprocess/ptyprocess.pyc
in spawn(cls, argv, cwd, env, echo, preexec_fn, dimensions)
     218
     219         if use_native_pty_fork:
--> 220             pid, fd = pty.fork()
     221         else:
     222             # Use internal fork_pty, for Solaris

/home/simon/sage/local/lib/python2.7/pty.pyc in fork()
     106
     107     master_fd, slave_fd = openpty()
--> 108     pid = os.fork()
     109     if pid == CHILD:
     110         # Establish a new session.

OSError: [Errno 11] Resource temporarily unavailable
sage:
**********************************************************************

Oops, Sage crashed. We do our best to make it stable, but...
........


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to