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

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

Comments

Projects
None yet
3 participants
@mspacek
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

This comment has been minimized.

Show comment Hide comment
@takluyver

takluyver Jun 2, 2011

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

Owner

takluyver commented Jun 2, 2011

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

This comment has been minimized.

Show comment Hide comment
@mspacek

mspacek Jun 2, 2011

Contributor

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

Contributor

mspacek commented Jun 2, 2011

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

@takluyver

This comment has been minimized.

Show comment Hide comment
@takluyver

takluyver Jun 2, 2011

Owner

Possibly, but at a glance, it looks unrelated.

Owner

takluyver commented Jun 2, 2011

Possibly, but at a glance, it looks unrelated.

@minrk

This comment has been minimized.

Show comment Hide comment
@minrk

minrk Jun 3, 2011

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.

Owner

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

This comment has been minimized.

Show comment Hide comment
@mspacek

mspacek Jun 3, 2011

Contributor

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

Contributor

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

This comment has been minimized.

Show comment Hide comment
@minrk

minrk Jun 3, 2011

Owner

Should be fixed by #501, can you test?

Owner

minrk commented Jun 3, 2011

Should be fixed by #501, can you test?

@mspacek

This comment has been minimized.

Show comment Hide comment
@mspacek

mspacek Jun 3, 2011

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment Hide comment
@minrk

minrk Jun 3, 2011

Owner

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)

Owner

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

This comment has been minimized.

Show comment Hide comment
@mspacek

mspacek Jun 3, 2011

Contributor

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

Contributor

mspacek commented Jun 3, 2011

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

@minrk minrk closed this in 3e19444 Jun 4, 2011

pombredanne added a commit to pombredanne/ipython that referenced this issue Jun 17, 2011

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

@dovf dovf referenced this issue in dwb/jsonrpc2-zeromq-python Aug 12, 2012

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