module Low_level_debug: Low_level_debugval stop_upon_sigbus : unit -> unitval stop_upon_sigsegv : unit -> unitval stop_upon_sigpipe : unit -> unitval stop_upon_exit : unit -> unitval stop_me_now : unit -> unitval segfault_me_now : unit -> unitval start_canary_thread : max_wait:Core.Time.Span.t -> check_interval:Core.Time.Span.t -> unitcheck_interval, and immediately
releases it once it succeeds. The C thread checks that your thread is
getting the caml lock within max_wait, and if it isn't it stops the
program (see stop_me_now). You can then inspect your program with gdb and
hopefully determine what caused it to block. It is safe to continue a
program stopped by the canary thread, though there is no special handling in
the canary thread to support this, so it may stop your program again. If
you do manage to continue, the canary thread should continue to work.
It is not safe to call this function more than once, in a given program an
exception will be raised if you do (but a second canary will not be
started).