Commit Graph

18 Commits

Author SHA1 Message Date
Victor Stinner 301f3f093c test_faulthandler: use a longer sleep (2.5 sec instead of 1.3 sec) in
_check_dump_tracebacks_later() to avoid failures if the system is slow.
2011-06-01 13:49:12 +02:00
Victor Stinner 7bba62fd68 faulthandler: dump all threads by default
* Set the default value of all_threads arguments to True
 * Py_FatalError() dumps all threads, instead of only the current thread

Dump only the current thread is not reliable. In some cases, Python is unable
to retrieve the state of the current thread and so is unable to dump the
traceback. faulthandler keeps a reference to the interpreter and so is always
able to dump the traceback of all threads.
2011-05-07 12:43:00 +02:00
Victor Stinner c790a5346d faulthandler: dump_tracebacks_later() displays also the timeout 2011-04-08 13:39:59 +02:00
Victor Stinner de10f4054b faulthandler: one more time, fix usage of locks in the watchdog thread
* Write a new test to ensure that dump_tracebacks_later() still works if
   it was already called and then cancelled before
 * Don't use a variable to check the status of the thread, only rely on locks
 * The thread only releases cancel_event if it was able to acquire it (if
   the timer was interrupted)
 * The main thread always hold this lock. It is only released when
   faulthandler_thread() is interrupted until this thread exits, or at Python
   exit.
2011-04-08 12:57:06 +02:00
Victor Stinner ff4cd88266 faulthandler: fix compilating without threads 2011-04-07 11:50:25 +02:00
Victor Stinner 9bdb43e43f Issue #11765: don't test time.sleep() in test_faulthandler
time.time() and/or time.sleep() are not accurate on Windows, don't test them
in test_faulthandler. Anyway, the check was written for an old implementation
of dump_tracebacks_later(), it is not more needed.
2011-04-04 23:42:30 +02:00
Victor Stinner f77ccc6d7e test_faulthandler: improve the test on dump_tracebacks_later(cancel=True) 2011-04-03 18:45:42 +02:00
Victor Stinner 1b3241fa0c test_faulthandler: fix regex on the check_dump_traceback_threads() traceback
The traceback may contain "_is_owned":

Thread 0x40962b90:
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py", line 220 in _is_owned
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py", line 227 in wait
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py", line 421 in wait
  File "<string>", line 23 in run
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py", line 735 in _bootstrap_inner
  File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py", line 708 in _bootstrap

Current thread XXX:
  File "<string>", line 10 in dump
  File "<string>", line 28 in <module>
2011-04-03 18:41:22 +02:00
Victor Stinner 44378d46f6 Issue #11393: signal of user signal displays tracebacks even if tstate==NULL
* faulthandler_user() displays the tracebacks of all threads even if it is
   unable to get the state of the current thread
 * test_faulthandler: only release the GIL in test_gil_released() check
 * create check_signum() subfunction
2011-04-01 15:37:12 +02:00
Victor Stinner a01ca12a52 Issue #11393: Fix faulthandler.disable() and add a test 2011-04-01 12:56:17 +02:00
Victor Stinner d727e23243 Issue #11393: The fault handler handles also SIGABRT 2011-04-01 12:13:55 +02:00
Victor Stinner 7ad24e9a73 Issue #11393: test_faulthandler is more tolerant on inaccurate time 2011-03-31 22:35:49 +02:00
Victor Stinner eb50e51a0f Issue #11393: get more information on assertion error (test_faulthandler) 2011-03-31 19:07:58 +02:00
Victor Stinner 1940233102 Issue #11393: check that stdout is empty if we use a file 2011-03-31 18:15:52 +02:00
Victor Stinner 05585cbdc8 Issue #11393: test_faulthandler checks the exitcode after the output 2011-03-31 13:29:56 +02:00
Victor Stinner f048075079 Issue #11393: limit stack overflow test to 100 MB
Stop if the stack overflow doesn't occur after allocating 100 MB on the stack.
2011-03-31 11:34:08 +02:00
Victor Stinner 0862d6ed8f Issue #11393: Disable test_stack_overflow of test_faulthandler 2011-03-31 02:05:54 +02:00
Victor Stinner 024e37adcc Issue #11393: Add the new faulthandler module 2011-03-31 01:31:06 +02:00