Crash in PyThread_acquire_lock

  • Thread starter moerchendiser2k3
  • Start date
M

moerchendiser2k3

Hi all,

I have a serious problem I want to solve. My app, where
Python is embedded crashs on OSX (10.6 SL). I can reproduce the crash
sometimes with a script that makes use of Python threads ( module:
threading).

'thelock->locked' is for sure still locked, but I can't identify the
problem.
Its just waiting, but it gets a 'EXC_BAD_ACCESS'. The line of the
crash
in PyThread_acquire_lock is the following one:

while ( thelock->locked ) {
status = pthread_cond_wait(&thelock->lock_released, &thelock-
mut); <<<<<<<<<<

From the view of my code, I can exclude that the GIL was ensured but
not properly released
by PyStateGIL_Ensure and PyStateGIL_Release.

Any ideas how to get rid of this crash somehow? Thanks in advance!!

Bye, moerchendiser2k3

#0 0x00007fff86c95316 in __semwait_signal ()
#1 0x00007fff86c99131 in _pthread_cond_wait ()
#2 0x000000011c89f8f4 in PyThread_acquire_lock (lock=0x1013803c0,
waitflag=1) at thread_pthread.h:452
#3 0x000000011c84a414 in PyEval_RestoreThread (tstate=0x101380200) at
Python/ceval.c:334
#4 0x000000011c889725 in PyGILState_Ensure () at Python/pystate.c:592
 
A

Antoine Pitrou

Hello,
'thelock->locked' is for sure still locked, but I can't identify the
problem.
Its just waiting, but it gets a 'EXC_BAD_ACCESS'. The line of the
crash
in PyThread_acquire_lock is the following one:

while ( thelock->locked ) {
status = pthread_cond_wait(&thelock->lock_released, &thelock-

Are you sure the crash happens in this thread and not another one?
 
M

moerchendiser2k3

Thanks Antoine! :) You were right. It was the wrong thread...uhmm...

Bye! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top