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

Already on GitHub? Sign in to your account

Heartbeat no longer shares the app's Context #1262

Merged
merged 3 commits into from Jan 14, 2012

Conversation

Projects
None yet
2 participants
Owner

minrk commented Jan 13, 2012

This is the chosen solution 2. in #1260. I couldn't see any of the extra bookkeeping that I thought might be necessary, so simply creating a new context is all there was to do.

Test script and notebook added to examples directory for easier confirmation, as described in #1127

closes #1260

minrk added some commits Jan 13, 2012

@minrk minrk kernel heartbeat does not share zmq context with rest of the app
This prevents the heartbeat from ever waiting for the GIL, which
could cause erroneous heartbeat failures.
ad971e3
@minrk minrk add test notebook and script for #1260 (GIL-related heartbeat failures)
per #1127
7e81bf6
Owner

ellisonbg commented Jan 13, 2012

This fixes looks quite simple and it looks ready for merging. Thanks again for tracking this down!

Owner

minrk commented Jan 14, 2012

I just realized that this obviously can also affect the parallel engines, so I'll make the same change there before merging.

Owner

minrk commented Jan 14, 2012

Similar tiny change in parallel, merging shortly.

@minrk minrk added a commit that referenced this pull request Jan 14, 2012

@minrk minrk Merge pull request #1262 from minrk/hbgil
Heartbeat no longer shares the app's Context

Fixes in both the single and parallel kernels, preventing the heartbeat thread from sharing the zmq Context with the rest of the process.  Non-copying sends require grabbing the GIL from the zmq io-thread in order to free memory, which could let Python get in the way of the heartbeat.

Test script and notebook added to examples directory.

closes #1260
1c4daed

@minrk minrk merged commit 1c4daed into ipython:master Jan 14, 2012

@minrk minrk added a commit that referenced this pull request Jan 18, 2012

@minrk @minrk minrk + minrk Merge pull request #1262 from minrk/hbgil
Heartbeat no longer shares the app's Context

Fixes in both the single and parallel kernels, preventing the heartbeat thread from sharing the zmq Context with the rest of the process.  Non-copying sends require grabbing the GIL from the zmq io-thread in order to free memory, which could let Python get in the way of the heartbeat.

Test script and notebook added to examples directory.

closes #1260
0d05c58

@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

@minrk @minrk minrk + minrk Merge pull request #1262 from minrk/hbgil
Heartbeat no longer shares the app's Context

Fixes in both the single and parallel kernels, preventing the heartbeat thread from sharing the zmq Context with the rest of the process.  Non-copying sends require grabbing the GIL from the zmq io-thread in order to free memory, which could let Python get in the way of the heartbeat.

Test script and notebook added to examples directory.

closes #1260
da8c4f6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment