I'm running https://github.com/mineo/mb2wikidatabot with Python 2.6.5 (I know, I know, but the server is not under my control and https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation#Initial_setup claims this should work). Every now and then I have to kill the bot manually because it seems to run into a deadlock when quitting. The last messages in the log file are
2015-04-14 12:20:34 __init__.py, 702 in stopme: VERBOSE Dropped throttle(s).
2015-04-14 12:20:34 http.py, 122 in _flush: VERBOSE Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
2015-04-14 12:20:34 http.py, 127 in _flush: VERBOSE All threads finished.
The process has not shut down since then and I can't press ctrl-c because the processes are being run from cron.
gdb output:
(gdb) info threads
2 Thread 0x7fe117339700 (LWP 7870) sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:86
- 1 Thread 0x7fe11b895700 (LWP 7869) sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:86
This looks like both threads are waiting for something, possible blocking each other.
The revision of pwb currently running is 297089be218a5528150ba1fffaa42773d291c683.