[PyKDE] pyqt/mysqld thread deadlock
"Martin v. Löwis"
martin at v.loewis.de
Wed Jan 1 22:42:06 CET 2003
Kaleb Pederson wrote:
> (gdb) thread 1
> #0 0x4024b1be in select () from /lib/libc.so.6
> #16 0x080a81d2 in PyImport_ImportModuleEx (name=0x818a924 "gem.src.gui.gui",
> globals=0x8145154, locals=0x8145154, fromlist=0x8114484) at
>>From my limited knowledge of the Python interpreter, it looks like the lock
> only gets acquired once in the third thread. In which case, there would be
> no reason for it to block. But, the first thread also had some relevant
> import calls, so I'm not sure. Where do I look now?
See the source of PyImport_ImportModuleEx. It acquires the import lock,
so you are holding the import lock while QApplication_exec_loop is
running. That means you deadlock.
gem.src.gui.gui should not run the mainloop, but expose a function to
run the mainloop, which the importer of gui should then invoke.
More information about the Python-list