Author Albert.Zeyer
Recipients Albert.Zeyer, neologix, pitrou, r.david.murray
Date 2013-02-25.13:37:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361799442.43.0.308714279488.issue17263@psf.upfronthosting.co.za>
In-reply-to
Content
The symbols are there because it is a library which exports all the symbols. Other debugging information are not there and I don't know any place where I can get them.

It currently cannot work on Linux in the same way because the GUI is Cocoa only right now. I'm trying to get it to run with another Python on Mac, though.

Note that in threadmodule.c, in local_clear, we are iterating through all threads:

    /* Remove all strong references to dummies from the thread states */
    if (self->key
        && (tstate = PyThreadState_Get())
        && tstate->interp) {
        for(tstate = PyInterpreterState_ThreadHead(tstate->interp);
            tstate;
            tstate = PyThreadState_Next(tstate))
            if (tstate->dict &&
                PyDict_GetItem(tstate->dict, self->key))
                PyDict_DelItem(tstate->dict, self->key);
    }

In PyDict_DelItem, if the GIL is released and meanwhile, the list of threadstates is altered, is that a problem for this loop? So maybe tstate becomes invalid there.

I also noticed this part in another backtrace of the same crash:

Thread 2:
0   libsystem_kernel.dylib          0x00007fff8a54e0fa __psynch_cvwait + 10
1   libsystem_c.dylib               0x00007fff85daaf89 _pthread_cond_wait + 869
2   org.python.python               0x000000010006f54e PyThread_acquire_lock + 96
3   org.python.python               0x000000010001d8e3 PyEval_RestoreThread + 61
4   org.python.python               0x0000000100053351 PyGILState_Ensure + 93
5   _objc.so                        0x0000000103b89b6e 0x103b80000 + 39790
6   libobjc.A.dylib                 0x00007fff880c6230 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 464
7   libobjc.A.dylib                 0x00007fff880c85a2 (anonymous namespace)::AutoreleasePoolPage::tls_dealloc(void*) + 42
8   libsystem_c.dylib               0x00007fff85dad4fe _pthread_tsd_cleanup + 240
9   libsystem_c.dylib               0x00007fff85da69a2 _pthread_exit + 146
10  libsystem_c.dylib               0x00007fff85da674d _pthread_start + 338
11  libsystem_c.dylib               0x00007fff85d93181 thread_start + 13


This seems to be a non-Python thread, so PyGILState_Ensure would have created a new threadstate and this would have altered the list.
History
Date User Action Args
2013-02-25 13:37:22Albert.Zeyersetrecipients: + Albert.Zeyer, pitrou, r.david.murray, neologix
2013-02-25 13:37:22Albert.Zeyersetmessageid: <1361799442.43.0.308714279488.issue17263@psf.upfronthosting.co.za>
2013-02-25 13:37:22Albert.Zeyerlinkissue17263 messages
2013-02-25 13:37:21Albert.Zeyercreate