Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ZMQError: Interrupted system call" when saving inline figure #499

Closed
mspacek opened this issue Jun 2, 2011 · 9 comments
Closed

"ZMQError: Interrupted system call" when saving inline figure #499

mspacek opened this issue Jun 2, 2011 · 9 comments

Comments

@mspacek
Copy link
Contributor

mspacek commented Jun 2, 2011

Running ipython-qtconsole --pylab=inline, and then plot(range(10)), followed by right clicking on the inline figure and choosing either "Save Image As..." or "Save SVG As... " generates:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/home/mspacek/source/ipython/IPython/zmq/kernelmanager.py", line 388, in run
    self.ioloop.start()
  File "/usr/local/lib/python2.6/dist-packages/zmq/eventloop/ioloop.py", line 251, in start
    event_pairs = self._impl.poll(poll_timeout)
  File "poll.pyx", line 189, in zmq.core.poll.Poller.poll (zmq/core/poll.c:2108)
  File "poll.pyx", line 101, in zmq.core.poll._poll (zmq/core/poll.c:1391)
ZMQError: Interrupted system call

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/home/mspacek/source/ipython/IPython/zmq/kernelmanager.py", line 476, in run
    self.ioloop.start()
  File "/usr/local/lib/python2.6/dist-packages/zmq/eventloop/ioloop.py", line 251, in start
    event_pairs = self._impl.poll(poll_timeout)
  File "poll.pyx", line 189, in zmq.core.poll.Poller.poll (zmq/core/poll.c:2108)
  File "poll.pyx", line 101, in zmq.core.poll._poll (zmq/core/poll.c:1391)
ZMQError: Interrupted system call

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/home/mspacek/source/ipython/IPython/zmq/kernelmanager.py", line 181, in run
    self.ioloop.start()
  File "/usr/local/lib/python2.6/dist-packages/zmq/eventloop/ioloop.py", line 251, in start
    event_pairs = self._impl.poll(poll_timeout)
  File "poll.pyx", line 189, in zmq.core.poll.Poller.poll (zmq/core/poll.c:2108)
  File "poll.pyx", line 101, in zmq.core.poll._poll (zmq/core/poll.c:1391)
ZMQError: Interrupted system call

The file save dialog box does come up though, and the image saves correctly.

@takluyver
Copy link
Member

Confirmed. Note that because the ZMQ threads are dead, we can no longer communicate with the kernel after that. I'm going to set this as critical for now because of that - tagging @minrk, @ellisonbg

@mspacek
Copy link
Contributor Author

mspacek commented Jun 2, 2011

I just submitted another issue, #500, which might be related (?)

@takluyver
Copy link
Member

Possibly, but at a glance, it looks unrelated.

@minrk
Copy link
Member

minrk commented Jun 3, 2011

I can reproduce this on Linux, but not on OSX. As far as I can tell, the QtGui.QFileDialog constructor sends a spurious SIGINT to all child threads, which is completely stupid and bizarre, but I guess we have to deal with it.

There is an issue in pyzmq where EINTR used to produce a warning and continue the loop, but now (as of 2.0.8) will raise. This will be fixed in 2.1.8 (or 2.1.7.2), but I don't think we can depend on that.

@mspacek
Copy link
Contributor Author

mspacek commented Jun 3, 2011

I forgot to mention, I'm on Ubuntu 10.10 x86-64 with zmq and pyzmq 2.1.7.

minrk added a commit to minrk/ipython that referenced this issue Jun 3, 2011
@minrk
Copy link
Member

minrk commented Jun 3, 2011

Should be fixed by #501, can you test?

@mspacek
Copy link
Contributor Author

mspacek commented Jun 3, 2011

Yup, that seemed to do it. Thanks!

By the way, what's the typical way to apply a single commit like this from github to your local branch? I tried stuff like

git cherry-pick 379a29008cb614143024
git cherry-pick 379a29008cb614143024772f7146a926ce0e9278
git cherry-pick https://github.com/minrk/ipython/commit/379a29008cb614143024772f7146a926ce0e9278

as well as git merge commands. Nothing worked. I had to download the tarball and copy the file into my branch.

@minrk
Copy link
Member

minrk commented Jun 3, 2011

Cherry pick requires the commit to be in your local content. So:

git remote add minrk https://github.com/minrk/ipython.git

git fetch minrk

then git cherry-pick c4a6eb452 should work.

On Jun 2, 2011, at 18:42, mspacekreply@reply.github.com wrote:

Yup, that seemed to do it. Thanks!

By the way, what's the typical way to apply a single commit like this from github to your local branch? I tried stuff like

git cherry-pick 379a29008cb614143024
git cherry-pick 379a29008cb614143024772f7146a926ce0e9278
git cherry-pick https://github.com/minrk/ipython/commit/379a29008cb614143024772f7146a926ce0e9278

as well as git merge commands. Nothing worked. I had to download the tarball and copy the file into my branch.

Reply to this email directly or view it on GitHub:
#499 (comment)

@mspacek
Copy link
Contributor Author

mspacek commented Jun 3, 2011

Thanks minrk. I'm coming from bzr. Hopefully I'll get the hang of git eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants