-
Notifications
You must be signed in to change notification settings - Fork 61
crash on exit in slp_kill_tasks_with_stacks #21
Comments
Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew): @ctismer on 2013-04-28 15:02:19 said: I was trying to find out when this problem crept in, but it appears to be from Can you please provide more info about your environment, compiler, version etc.? Thanks for the patch! |
Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew): mconst on 2013-04-28 20:52:51 said: It's not that old -- I believe it was introduced three weeks ago, in revision cf49004a05e2. It looks like that patch fixed another crash bug on shutdown (by adding a missing Py_INCREF, and using st.current instead of st.main), but it also modified the calls to SLP_CHAIN_REMOVE and SLP_CHAIN_INSERT. The SLP_CHAIN_INSERT change shouldn't hurt anything, although it looks unnecessary to me (SLP_CHAIN_INSERT doesn't actually modify *chain unless it's NULL, and I don't think st.current can ever be NULL). The SLP_CHAIN_REMOVE call caused this bug. I'm using the latest slp-2.7 from mercurial; I compiled it with gcc 4.7.0, and I'm running it on an x86-64 system with Linux 2.6.35.4. I think this crash should be cross-platform, though -- it's a 100% reliable null-pointer dereference. Is it not happening for you? |
Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew): @ctismer on 2013-04-28 22:13:30 said: In fact, that was quite a bit before we moved to Mercurial. At the same time, Nagare also And I guess some check-ins were a bit quicker than they should have been. Keep reporting, it is appreciated. Please double-check before committing or submitting comments. People are people, for heaven's sake, although they try to be better. cheers - chris |
Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew): @ctismer on 2013-04-29 23:07:04 said: Anselm, I agree that this patch is ok, but it was a bit too quick. I wanted to ask Michel Constant to create the relevant headers on top of the |
These include spelling/grammar fixes, removing some outdated prose, updating some superseded prose, and adding/cleaning up some links. Also rewraps the entire file at 79 columns.
Originally reported by: RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew)
(originally reported in Trac by mconst on 2013-04-26 23:45:44)
With the current stackless 2.7-slp, the following code crashes on exit:
It's crashing in slp_kill_tasks_with_stacks, where it calls SLP_CHAIN_REMOVE to remove the task from the runqueue:
The problem is that this code is calling SLP_CHAIN_REMOVE incorrectly. "task" is supposed to be an output parameter, not input -- and it can't be an alias of *chain, or else SLP_CHAIN_REMOVE will think the list is empty and crash. The code should be:
I've attached a patch. With this patch, the program above works for me.
The text was updated successfully, but these errors were encountered: