thread suspension when dumping core
Mark Johnston
markj at FreeBSD.org
Sat Jun 4 02:19:55 UTC 2016
Hi,
I've recently observed a hang in a multi-threaded process that had hit
an assertion failure and was attempting to dump core. One thread was
sleeping interruptibly on an advisory lock with TDF_SBDRY set (our
filesystem sets VFCF_SBDRY). SIGABRT caused the receipient thread to
suspend other threads with thread_single(SINGLE_NO_EXIT), which fails
to interrupt the sleeping thread, resulting in the hang.
My question is, why does the SA_CORE handler not force all threads to
the user boundary before attempting to dump core? It must do so later
anyway in order to exit. As I understand it, TDF_SBDRY is intended to
avoid deadlocks that can occur when stopping a process, but in this
case we don't stop the process with the intention of resuming it, so it
seems erroneous to apply this flag.
Thanks,
-Mark
More information about the freebsd-current
mailing list