[pypy-issue] [issue1324] stm-thread-2: SIGSEGV pypy_g_bootstrap()

Remi tracker at bugs.pypy.org
Wed Nov 14 14:45:46 CET 2012

New submission from Remi <remi.meier at gmail.com>:

Running the test_quicksort_segv.py sometimes shows the Assertion Failure from 
issue1320 but most of the time it receives SIGSEGV.

The SEGV happens in Bootstrapper.bootstrap() where in the finally-clause we call 
thread.gc_thread_die() which frees the shadow-stack. Unfortunately, at that time 
we already have a KeyError exception which will be ReRaised after the 
gc_thread_die() and it looks like ReRaising needs the shadow-stack.

The KeyError comes from the call to space.threadlocals.leave_thread(space) which 
calls thread_is_stopping(). In there, the "del local.dicts[ec]" seems to raise 
the KeyError.

That is as far as I got and I am struggling to see why that happens :)

files: segv.zip
messages: 4995
nosy: Remi, pypy-issue
priority: bug
status: unread
title: stm-thread-2: SIGSEGV pypy_g_bootstrap()

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list