sage: alarm(1)
sage:                                                                           
                                                                                
      


AlarmInterrupt escaped interact()

sage: 
sage:                                                                           
                                                                                
      

^[[50;1R
**********************************************************************

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

...

Is this supposed to happen?

Here is the crash report:

***************************************************************************

IPython post-mortem report

{'commit_hash': u'033ab93c7',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': 
'/srv/public/kliem/sage/local/lib/python2.7/site-packages/IPython',
 'ipython_version': '5.8.0',
 'os_name': 'posix',
 'platform': 'Linux-4.9.0-8-amd64-x86_64-with-debian-9.7',
 'sys_executable': '/srv/public/kliem/sage/local/bin/python2',
 'sys_platform': 'linux2',
 'sys_version': '2.7.15 (default, Nov  9 2018, 13:01:06) \n[GCC 6.3.0 
20170516]'}

***************************************************************************



***************************************************************************

Crash traceback:

---------------------------------------------------------------------------
---------------------------------------------------------------------------
OSError             Python 2.7.15: /srv/public/kliem/sage/local/bin/python2
                                                   Wed Feb  6 10:03:08 2019
A problem occurred executing Python code.  Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/srv/public/kliem/sage/src/bin/sage-ipython in <module>()
      1 #!/usr/bin/env sage-python23
      2 # -*- coding: utf-8 -*-
      3 """
      4 Sage IPython startup script.
      5 """
      6 
      7 # Display startup banner. Do this before anything else to give the 
user
      8 # early feedback that Sage is starting.
      9 from sage.misc.banner import banner
     10 banner()
     11 
     12 from sage.repl.interpreter import SageTerminalApp
     13 
     14 app = SageTerminalApp.instance()
     15 app.initialize()
---> 16 app.start()
        global app.start = <bound method SageTerminalApp.start of 
<sage.repl.interpreter.SageTerminalApp object at 0x7f0b41571d10>>

/srv/public/kliem/sage/local/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc
 
in start(self=<sage.repl.interpreter.SageTerminalApp object>)
    340         if self.log_level <= logging.INFO: print()
    341 
    342     def _pylab_changed(self, name, old, new):
    343         """Replace --pylab='inline' with --pylab='auto'"""
    344         if new == 'inline':
    345             warnings.warn("'inline' not available as pylab backend, 
"
    346                       "using 'auto' instead.")
    347             self.pylab = 'auto'
    348 
    349     def start(self):
    350         if self.subapp is not None:
    351             return self.subapp.start()
    352         # perform any prexec steps:
    353         if self.interact:
    354             self.log.debug("Starting IPython's mainloop...")
--> 355             self.shell.mainloop()
        self.shell.mainloop = <bound method 
SageTerminalInteractiveShell.mainloop of 
<sage.repl.interpreter.SageTerminalInteractiveShell object at 
0x7f0b3d17ab10>>
    356         else:
    357             self.log.debug("IPython not interactive...")
    358 
    359 def load_default_config(ipython_dir=None):
    360     """Load the default config file from the default ipython_dir.
    361 
    362     This is useful for embedded shells.
    363     """
    364     if ipython_dir is None:
    365         ipython_dir = get_ipython_dir()
    366 
    367     profile_dir = os.path.join(ipython_dir, 'profile_default')
    368     app = TerminalIPythonApp()
    369     app.config_file_paths.append(profile_dir)
    370     app.load_config_file()

/srv/public/kliem/sage/local/lib/python2.7/site-packages/IPython/terminal/interactiveshell.pyc
 
in mainloop(self=<sage.repl.interpreter.SageTerminalInteractiveShell 
object>, display_banner=<object object>)
    480                 if (not self.confirm_exit) \
    481                         or self.ask_yes_no('Do you really want to 
exit ([y]/n)?','y','n'):
    482                     self.ask_exit()
    483 
    484             else:
    485                 if code:
    486                     self.run_cell(code, store_history=True)
    487 
    488     def mainloop(self, display_banner=DISPLAY_BANNER_DEPRECATED):
    489         # An extra layer of protection in case someone mashing 
Ctrl-C breaks
    490         # out of our internal code.
    491         if display_banner is not DISPLAY_BANNER_DEPRECATED:
    492             warn('mainloop `display_banner` argument is deprecated 
since IPython 5.0. Call `show_banner()` if needed.', DeprecationWarning, 
stacklevel=2)
    493         while True:
    494             try:
--> 495                 self.interact()
        self.interact = <bound method SageTerminalInteractiveShell.interact 
of <sage.repl.interpreter.SageTerminalInteractiveShell object at 
0x7f0b3d17ab10>>
    496                 break
    497             except KeyboardInterrupt as e:
    498                 print("\n%s escaped interact()\n" % 
type(e).__name__)
    499             finally:
    500                 # An interrupt during the eventloop will mess up the
    501                 # internal state of the prompt_toolkit library.
    502                 # Stopping the eventloop fixes this, see
    503                 # https://github.com/ipython/ipython/pull/9867
    504                 if hasattr(self, '_eventloop'):
    505                     self._eventloop.stop()
    506 
    507     _inputhook = None
    508     def inputhook(self, context):
    509         if self._inputhook is not None:
    510             self._inputhook(context)

/srv/public/kliem/sage/local/lib/python2.7/site-packages/IPython/terminal/interactiveshell.pyc
 
in interact(self=<sage.repl.interpreter.SageTerminalInteractiveShell 
object>, display_banner=<object object>)
    463                 # Older version of prompt_toolkit; it's OK to set 
the document
    464                 # directly here.
    465                 set_doc()
    466             self.rl_next_input = None
    467 
    468     def interact(self, display_banner=DISPLAY_BANNER_DEPRECATED):
    469 
    470         if display_banner is not DISPLAY_BANNER_DEPRECATED:
    471             warn('interact `display_banner` argument is deprecated 
since IPython 5.0. Call `show_banner()` if needed.', DeprecationWarning, 
stacklevel=2)
    472 
    473         self.keep_running = True
    474         while self.keep_running:
    475             print(self.separate_in, end='')
    476 
    477             try:
--> 478                 code = self.prompt_for_code()
        code = u''
        self.prompt_for_code = <bound method 
SageTerminalInteractiveShell.prompt_for_code of 
<sage.repl.interpreter.SageTerminalInteractiveShell object at 
0x7f0b3d17ab10>>
    479             except EOFError:
    480                 if (not self.confirm_exit) \
    481                         or self.ask_yes_no('Do you really want to 
exit ([y]/n)?','y','n'):
    482                     self.ask_exit()
    483 
    484             else:
    485                 if code:
    486                     self.run_cell(code, store_history=True)
    487 
    488     def mainloop(self, display_banner=DISPLAY_BANNER_DEPRECATED):
    489         # An extra layer of protection in case someone mashing 
Ctrl-C breaks
    490         # out of our internal code.
    491         if display_banner is not DISPLAY_BANNER_DEPRECATED:
    492             warn('mainloop `display_banner` argument is deprecated 
since IPython 5.0. Call `show_banner()` if needed.', DeprecationWarning, 
stacklevel=2)
    493         while True:

/srv/public/kliem/sage/local/lib/python2.7/site-packages/IPython/terminal/interactiveshell.pyc
 
in prompt_for_code(self=<sage.repl.interpreter.SageTerminalInteractiveShell 
object>)
    357                         
processor=HighlightMatchingBracketProcessor(chars='[](){}'),
    358                         filter=HasFocus(DEFAULT_BUFFER) & ~IsDone() 
&
    359                             Condition(lambda cli: 
self.highlight_matching_brackets))],
    360                 }
    361 
    362     def _update_layout(self):
    363         """
    364         Ask for a re computation of the application layout, if for 
example ,
    365         some configuration options have changed.
    366         """
    367         if self._pt_app:
    368             self._pt_app.layout = 
create_prompt_layout(**self._layout_options())
    369 
    370     def prompt_for_code(self):
    371         document = self.pt_cli.run(
--> 372             pre_run=self.pre_prompt, reset_current_buffer=True)
        global pre_run = undefined
        self.pre_prompt = <bound method 
SageTerminalInteractiveShell.pre_prompt of 
<sage.repl.interpreter.SageTerminalInteractiveShell object at 
0x7f0b3d17ab10>>
        global reset_current_buffer = undefined
        global True = undefined
    373         return document.text
    374 
    375     def enable_win_unicode_console(self):
    376         if sys.version_info >= (3, 6):
    377             # Since PEP 528, Python uses the unicode APIs for the 
Windows
    378             # console by default, so WUC shouldn't be needed.
    379             return
    380 
    381         import win_unicode_console
    382 
    383         if PY3:
    384             win_unicode_console.enable()
    385         else:
    386             # https://github.com/ipython/ipython/issues/9768
    387             from win_unicode_console.streams import 
(TextStreamWrapper,

/srv/public/kliem/sage/local/lib/python2.7/site-packages/prompt_toolkit/interface.pyc
 
in run(self=<prompt_toolkit.interface.CommandLineInterface object>, 
reset_current_buffer=True, pre_run=<bound method 
SageTerminalInteractiveShell.pre_p...interpreter.SageTerminalInteractiveShell 
object>>)
    400 
    401         try:
    402             self._is_running = True
    403 
    404             self.on_start.fire()
    405             self.reset()
    406 
    407             # Call pre_run.
    408             self._pre_run(pre_run)
    409 
    410             # Run eventloop in raw mode.
    411             with self.input.raw_mode():
    412                 self.renderer.request_absolute_cursor_position()
    413                 self._redraw()
    414 
--> 415                 self.eventloop.run(self.input, 
self.create_eventloop_callbacks())
        self.eventloop.run = <bound method PosixEventLoop.run of 
<prompt_toolkit.eventloop.posix.PosixEventLoop object at 0x7f0b3752f890>>
        self.input = StdinInput(stdin=<open file '<stdin>', mode 'r' at 
0x7f0b44c780c0>)
        self.create_eventloop_callbacks = <bound method 
CommandLineInterface.create_eventloop_callbacks of 
<prompt_toolkit.interface.CommandLineInterface object at 0x7f0b374c56d0>>
    416         finally:
    417             # Clean up renderer. (This will leave the alternate 
screen, if we use
    418             # that.)
    419 
    420             # If exit/abort haven't been called set, but another 
exception was
    421             # thrown instead for some reason, make sure that we 
redraw in exit
    422             # mode.
    423             if not self.is_done:
    424                 self._exit_flag = True
    425                 self._redraw()
    426 
    427             self.renderer.reset()
    428             self.on_stop.fire()
    429             self._is_running = False
    430 

/srv/public/kliem/sage/local/lib/python2.7/site-packages/prompt_toolkit/eventloop/posix.pyc
 
in run(self=<prompt_toolkit.eventloop.posix.PosixEventLoop object>, 
stdin=StdinInput(stdin=<open file '<stdin>', mode 'r' at 0x7f0b44c780c0>), 
callbacks=<prompt_toolkit.interface._InterfaceEventLoopCallbacks object>)
    134                         if fd == self._schedule_pipe[0]:
    135                             for c, max_postpone_until in 
self._calls_from_executor:
    136                                 if max_postpone_until is None:
    137                                     # Execute now.
    138                                     tasks.append(c)
    139                                 else:
    140                                     # Execute soon, if 
`max_postpone_until` is in the future.
    141                                     now = now or _now()
    142                                     if max_postpone_until < now:
    143                                         tasks.append(c)
    144                                     else:
    145                                         
low_priority_tasks.append((c, max_postpone_until))
    146                             self._calls_from_executor = []
    147 
    148                             # Flush all the pipe content.
--> 149                             os.read(self._schedule_pipe[0], 1024)
        global os.read = <built-in function read>
        self._schedule_pipe = (5, 6)
    150                         else:
    151                             handler = self._read_fds.get(fd)
    152                             if handler:
    153                                 tasks.append(handler)
    154 
    155                     # When there are high priority tasks, run all 
these.
    156                     # Schedule low priority tasks for the next 
iteration.
    157                     if tasks:
    158                         for t in tasks:
    159                             t()
    160 
    161                         # Postpone low priority tasks.
    162                         for t, max_postpone_until in 
low_priority_tasks:
    163                             self.call_from_executor(t, 
_max_postpone_until=max_postpone_until)
    164                     else:

OSError: [Errno 11] Resource temporarily unavailable

***************************************************************************

History of session input:alarm(Integer(1))
*** Last line of input (may not be in above history):
alarm(Integer(1))

-- 
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