{"action":"created","issue":{"url":"https://api.github.com/repos/ipython/ipython/issues/8105","labels_url":"https://api.github.com/repos/ipython/ipython/issues/8105/labels{/name}","comments_url":"https://api.github.com/repos/ipython/ipython/issues/8105/comments","events_url":"https://api.github.com/repos/ipython/ipython/issues/8105/events","html_url":"https://github.com/ipython/ipython/issues/8105","id":63443948,"number":8105,"title":"Console crashes when interrupted during execution","user":{"login":"cactaur","id":6021310,"avatar_url":"https://avatars.githubusercontent.com/u/6021310?v=3","gravatar_id":"","url":"https://api.github.com/users/cactaur","html_url":"https://github.com/cactaur","followers_url":"https://api.github.com/users/cactaur/followers","following_url":"https://api.github.com/users/cactaur/following{/other_user}","gists_url":"https://api.github.com/users/cactaur/gists{/gist_id}","starred_url":"https://api.github.com/users/cactaur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cactaur/subscriptions","organizations_url":"https://api.github.com/users/cactaur/orgs","repos_url":"https://api.github.com/users/cactaur/repos","events_url":"https://api.github.com/users/cactaur/events{/privacy}","received_events_url":"https://api.github.com/users/cactaur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-21T19:19:56Z","updated_at":"2015-03-21T22:46:43Z","closed_at":null,"body":"After updating to IPython 3.0, there was a bug in IPython console where interruptions during execution cause the kernel and console to crash. A simple way of reproducing this bug is by running:\r\n\r\n    $ ipython console\r\n    In [1]: for i in range(1000000000):\r\n        ...:      pass\r\n        ...:\r\n\r\nand then pressing Ctrl-C to interrupt. It results in:\r\n\r\n    In [1]: for i in range(1000000000):\r\n        ...:      pass\r\n        ...:\r\n    ^CTraceback (most recent call last):\r\n      File \"/usr/custom/Anaconda-2.0.1/bin/ipython\", line 6, in <module>\r\n        sys.exit(start_ipython())\r\n      File \"/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/IPython/__init__.py\", line 120, in start_ipython\r\n        return launch_new_instance(argv=argv, **kwargs)\r\n      File \"/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/IPython/config/application.py\", line 574, in launch_instance\r\n        app.start()\r\n      File \"/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/IPython/terminal/ipapp.py\", line 367, in start\r\n        return self.subapp.start()\r\n      File \"/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/IPython/terminal/ipapp.py\", line 371, in start\r\n        self.shell.mainloop()\r\n      File \"/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/IPython/terminal/console/interactiveshell.py\", line 407, in mainloop\r\n        self.interact(display_banner=display_banner)\r\n      File \"/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/IPython/terminal/console/interactiveshell.py\", line 568, in interact\r\n        self.run_cell(source_raw)\r\n      File \"/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/IPython/terminal/console/interactiveshell.py\", line 168, in run_cell\r\n        self.handle_input_request(msg_id, timeout=0.05)\r\n      File \"/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/IPython/terminal/console/interactiveshell.py\", line 373, in handle_input_request\r\n        req = self.client.stdin_channel.get_msg(timeout=timeout)\r\n      File \"/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/IPython/kernel/blocking/channels.py\", line 50, in get_msg\r\n        ready = self.socket.poll(timeout)\r\n      File \"/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/zmq/sugar/socket.py\", line 448, in poll\r\n        evts = dict(p.poll(timeout))\r\n      File \"/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/zmq/sugar/poll.py\", line 101, in poll\r\n    return zmq_poll(self.sockets, timeout=timeout)\r\n      File \"zmq/backend/cython/_poll.pyx\", line 115, in zmq.backend.cython._poll.zmq_poll (zmq/backend/cython/_poll.c:1586)\r\n      File \"zmq/backend/cython/checkrc.pxd\", line 21, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/_poll.c:2016)\r\n        raise ZMQError(errno)\r\n    ZMQError: Interrupted system call\r\n\r\n    If you suspect this is an IPython bug, please report it at:\r\n        https://github.com/ipython/ipython/issues\r\n    or send an email to the mailing list at ipython-dev@scipy.org\r\n\r\n    You can print a more detailed traceback right now with \"%tb\", or use \"%debug\"\r\n    to interactively debug it.\r\n\r\n    Extra-detailed tracebacks for bug-reporting purposes can be enabled via:\r\n        %config Application.verbose_crash=True\r\n\r\nThis does not seem to occur with the basic ipython without separate kernel support. When I attach an ipython console to an ipython notebook kernel, interruption only crashes the console while the notebook kernel remains active.\r\n\r\nI am running IPython 3.0 through Anaconda on CentOS 6.6 and python 2.7. More system information is as follows:\r\n\r\n    $ python -c \"import IPython; print(IPython.sys_info())\"\r\n    {'commit_hash': u'f75fda4',\r\n     'commit_source': 'installation',\r\n     'default_encoding': 'UTF-8',\r\n     'ipython_path': '/usr/custom/Anaconda-2.0.1/lib/python2.7/site-packages/IPython',\r\n     'ipython_version': '3.0.0',\r\n     'os_name': 'posix',\r\n     'platform': 'Linux-2.6.32-504.8.1.el6.x86_64-x86_64-with-centos-6.6-Final',\r\n     'sys_executable': '/usr/custom/Anaconda-2.0.1/bin/python',\r\n     'sys_platform': 'linux2',\r\n     'sys_version': '2.7.9 |Anaconda 2.0.1 (64-bit)| (default, Dec 15 2014, 10:33:51) \\n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]'}\r\n\r\nI hope that information is adequate! Thanks!"},"comment":{"url":"https://api.github.com/repos/ipython/ipython/issues/comments/84464818","html_url":"https://github.com/ipython/ipython/issues/8105#issuecomment-84464818","issue_url":"https://api.github.com/repos/ipython/ipython/issues/8105","id":84464818,"user":{"login":"takluyver","id":327925,"avatar_url":"https://avatars.githubusercontent.com/u/327925?v=3","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"created_at":"2015-03-21T22:46:43Z","updated_at":"2015-03-21T22:46:43Z","body":"#8108 fixes it for me, but I want to get clarification on whether the fix is in the best place."}}