Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
mspacek opened this Issue · 9 comments

3 participants

@mspacek

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
Owner

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

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

@takluyver
Owner

Possibly, but at a glance, it looks unrelated.

@minrk
Owner

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

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

@minrk minrk referenced this issue from a commit in minrk/ipython
@minrk minrk ignore EINTR in channel loops
closes gh-499
379a290
@minrk
Owner

Should be fixed by #501, can you test?

@mspacek

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
Owner
@mspacek

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

@minrk minrk closed this issue from a commit
@minrk minrk ignore EINTR in channel loops
closes gh-499
closes gh-501
3e19444
@minrk minrk closed this in 3e19444
@pombredanne pombredanne referenced this issue from a commit in pombredanne/ipython
@minrk minrk ignore EINTR in channel loops
closes gh-499
closes gh-501
e342449
@ellisonbg ellisonbg referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@mattvonrocketstein mattvonrocketstein referenced this issue from a commit in mattvonrocketstein/ipython
@minrk minrk ignore EINTR in channel loops
closes gh-499
closes gh-501
50c0f1b
@dovf dovf referenced this issue in dwb/jsonrpc2-zeromq-python
Open

"ZMQError: Interrupted system call" when used with Qt #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.