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
Blocker: Qt console broken after "all magics" menu became dynamic #1057
Comments
Using the commit mentioned above, I'm finding the frequency is a bit lower than I seemed to be getting yesterday. It also seems like it happens a bit more often when the memory is full (i.e. after loading a load of big applications), although this could be a red herring. Yesterday when I tried, I couldn't get it to happen when I had both cores running makework. |
I've just committed to master a temporary fix that effectively disables #956 without actually deleting @Carreau's code. I simply copied back the old static list and commented out the call to the new dynamic function. @Carreau, if you can find a proper fix, start off this and simply delete the code I added in 65546bf, I made it be a minimal amount that only fixed the current problem and nothing else. With this workaround, if push comes to shove we could release 0.12 as-is and push this issue back to 0.13. I'd prefer to have a proper fix, but now at least we don't have a completely broken qt console in master. For that reason I'm downgrading the priority to just 'high', as it's not really a blocker anymore. But I'd much prefer to have a real fix than this band-aid I just put in. @Carreau, let us know if we can help in some way. |
Hum, I'm totally unable to reproduce this bug (on my debian at least, i'll try on mac). even after 25 launch in a row. I've already connect the action to kernel Do you think just setting a timer after which updating the menu might be enough or do you want something more specific. I can also propose to leave the "static" menu at startup but put a 'update menu' at the top of it (ie, just don't trigger the auto update as startup). |
On Sun, Nov 27, 2011 at 11:41 PM, Bussonnier Matthias
Note that I did add this afternoon a fix to master that effectively You would need to re-activate that code to see the problem. It was
No, timers are never the solution to race conditions. The issue is
That's probably a good idea. Thanks for the quick response! |
@fperez Actually, If a dirrectly trigger I'll try to get it not work on Ubuntu at work.... And BTW, this afternoon is durring the night for me :-) |
On Sun, Nov 27, 2011 at 11:58 PM, Bussonnier Matthias
Ah, ok.
Yes, that's probably it. @minrk, have you seen this problem, or do
Today when I fixed it, it was to the point where I simply couldn't
Yes, I think you're in Europe, right? But why do you point this out, |
So yeah, you kind of mentioned it... :-) |
On Mon, Nov 28, 2011 at 12:06 AM, Bussonnier Matthias
Ah, yes. I just said that because I figured the changes had happened |
I know, don't worry, I was just messing with you. Now it's my turn to be awake while most of you will be asleep if I'm right. |
On Mon, Nov 28, 2011 at 12:14 AM, Bussonnier Matthias
yes, I'm clocking out now for some sleep... Bye! |
I think I got it... (the why, not the how to fix it) self._request_info['execute'] = self._ExecutionRequest(msg_id, 'silent_exec_callback') Instead of "appending" another execute request. Then the I might not have have time to deeply look at it during my day/your night. I'll try to make a better "Quick-fix" and try to modifie the current code to handle several multiple execution request waiting. There might be something I haven't understand, and I 'll appreciate some advice in the right way to handle that. |
@fperez, @takluyver |
@Carreau - you are correct, the qtconsole does not allow multiple outstanding execution requests, and does not protect itself by preventing them. This is fine if there are no background operations, but now that we have some, it obviously isn't. I think your approach has the right idea, but I would use a dict by msg_id instead of a list. msg_ids are unique, so there is no worry about duplication. |
I checked out the commit after you reverted @fperez's temporary fix, but before your fix, to check that I could still reproduce the bug. Unfortunately, I can't reproduce it after more than 40 tries, so I won't be able to tell if your fix makes a difference. Hopefully @fperez can check it. The problem and the approach makes sense. I agree with Min that a dictionary is preferable. |
On Mon, Nov 28, 2011 at 3:26 PM, Thomas
I'll try to check tonight with my home machine, which is where I could Thanks everyone for working on this one, we'll get to the bottom of it. |
Won't have much time to ti re-write it today, and i'll do it with more suitable container. |
This reverts commit 65546bf, done to temporaly fixed a race condition introduced by ipython#956, next commits should fixe this race condition
Ok, fixed, with dictionnary, (rebased, force pushed ) several times because I'm a moron, and also to put space around equal sign... There is some redundent info as now, |
fix race condition in qtconsole due to a race condition beween the population of the magic menu and the first prompt request. Resolved by upgrading the logic of the console to handle several executions request in parallel. Some namedTuple might still carry redundent information but the fix is the first priority fixes ipython#1057 , introduced by ipython#956
Basically it reverts the effect of ipython#956 and goes back to a static list for the 'all magics' menu. I tried to mark very clearly the new code so we can disable it once a proper fix for ipython#1057 is committed, but we can't have a broken qt console in master.
This reverts commit 65546bf, done to temporaly fixed a race condition introduced by ipython#956, next commits should fixe this race condition
fix race condition in qtconsole due to a race condition beween the population of the magic menu and the first prompt request. Resolved by upgrading the logic of the console to handle several executions request in parallel. Some namedTuple might still carry redundent information but the fix is the first priority fixes ipython#1057 , introduced by ipython#956
Fix race condition in qtconsole between the population of the magic menu and the first prompt request. Resolved by upgrading the logic of the console to handle several executions request in parallel. Closes ipython#1057, introduced by ipython#956.
It turns out that the merge of #956 introduced a serious, major problem with the Qt console. Unfortunately it's intermittent, which is why we didn't notice it during review, but we do need to fix it.
Symptoms: sometimes, perhaps one out of every four or five invocations, the qt console will not display the first prompt. It shows the banner but the input prompt never appears. The only solution is to kill it and try again, hoping for better. From a git bisection I did, it appears the first bad commit was e9402d7. The way to test this is simply to reset to that commit, make sure you remove all .pyc files just in case and then try opening multiple times the qt console. Eventually, you'll see an instance where it comes out with no input prompt.
@Carreau, I hope you'll be able to figure out a solution for this one... Some detective work by @takluyver pinpointed the issue somewhat, here's our IRC log:
In any case, this is a major blocker. If a full solution isn't found, we'll have to revert the dynamic magic menu out altogether, but I hope we can find a fix.
The text was updated successfully, but these errors were encountered: