Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 May 2016 10:52:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-threads@FreeBSD.org
Subject:   [Bug 209233] [patch] pthread_suspend_all_np races with check_suspend
Message-ID:  <bug-209233-16-4mGCBQ6C7S@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-209233-16@https.bugs.freebsd.org/bugzilla/>
References:  <bug-209233-16@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=3D209233

Konstantin Belousov <kib@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kib@FreeBSD.org

--- Comment #1 from Konstantin Belousov <kib@FreeBSD.org> ---
(In reply to Lawrence Esswood from comment #0)

So the issue is that we might leave pthread_resume{_all}_np with the
THR_FLAG_SUSPENDED still set.  IMO this is the real bug, and it cannot be
worked around by trying to set NEED_SUSPEND in the next suspend cycle.=20
Instead, resume functions should wait until the resumed thread is scheduled=
 and
has a chance to run enough to clear the flag.

One more wait/wake point around thread->cycle would be needed to ensure of
proper control pass between resume->resumed->resume threads.

--=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-209233-16-4mGCBQ6C7S>