Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Oct 2021 13:34:49 +0000
From:      bugzilla-noreply@freebsd.org
To:        threads@FreeBSD.org
Subject:   [Bug 254995] pthread_cond_timedwait() returns EDEADLK
Message-ID:  <bug-254995-13406-QpxLSkvMzS@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-254995-13406@https.bugs.freebsd.org/bugzilla/>
References:  <bug-254995-13406@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254995

--- Comment #9 from nkoch@demig.de ---
After inspecting the source of libthread, I see that the temporary workarou=
nd
(ignoring EDEADLK) cannot work.

The hexdump of the mutex after calling pthread_cond_timedwait() shows that =
it
is owned by the thread according to m_lock.m_owner. But it is not in the
threads mutex queue as it should be.

That would trigger mutex_assert_isowned() in dequeue_mutex() when calling
pthread_mutex_unlock().

So I think the mutex is in an inconsistent state.
I will try to reproduce the problem with some added debug logging in
libpthread.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254995-13406-QpxLSkvMzS>