| valhallasw added a comment. |
Could you try the following: https://wiki.python.org/moin/DebuggingWithGdb
Specifically the 'To see Python code positions for all threads, use' part. If we know where pywikibot is hanging, it's easier to understand what's going on.
Another option is doing this in pure python:
import sys,threading,time,traceback
class RampLogger(threading.Thread):
def run(self):
print >> sys.stderr, "\n STACKTRACE - START \n"
code = []
for threadId, stack in sys._current_frames().items():
code.append("\n# ThreadID: %s" % threadId)
for filename, lineno, name, line in traceback.extract_stack(stack):
code.append('File: "%s", line %d, in %s' % (filename, lineno, name))
if line:
code.append(" %s" % (line.strip()))
for line in code:
print >> sys.stderr, line
print >> sys.stderr, "\n*** STACKTRACE - END ***\n"
time.sleep(10)
RampLogger().start()If you add that to the beginning of the script, you will get a full stacktrace (for all threads) every 10s. (the indentation of the code might be off in some spaces, but I think it's correct)
TASK DETAIL
EMAIL PREFERENCES
To: valhallasw
Cc: valhallasw, Xqt, pywikibot-bugs-list, Mineo, Aklapper, Mdupont, JJMC89, jayvdb
Cc: valhallasw, Xqt, pywikibot-bugs-list, Mineo, Aklapper, Mdupont, JJMC89, jayvdb
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
