Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jun 2016 19:23:47 -0700
From:      Mark Johnston <markj@FreeBSD.org>
To:        freebsd-current@FreeBSD.org
Subject:   thread suspension when dumping core
Message-ID:  <20160604022347.GA1096@wkstn-mjohnston.west.isilon.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160604022347.GA1096>