[Bug 197365] pthread_barrier_destroy() return EBUSY on idle barrier
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Feb 6 11:37:40 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197365
Bug ID: 197365
Summary: pthread_barrier_destroy() return EBUSY on idle barrier
Product: Base System
Version: 10.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: threads
Assignee: freebsd-threads at FreeBSD.org
Reporter: fguiliani at verisign.com
Created attachment 152607
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=152607&action=edit
reproduce test case
pthread_barrier_destroy() can return EBUSY even when the barrier is not in use.
The problem was introduced somewhere between FreeBSD 8 and 10.0-RELEASE.
I have attached a simple test case to reproduce the issue. The problem seems
related
to the use of uninitialized memory.
pthread_barrier_destroy() is testing bar->b_destroying in thr_barrier.c:
https://github.com/verisign/freebsd/blob/f4c11c6b678195515bbab8bb2825fa5222ed3a58/lib/libthr/thread/thr_barrier.c#L53
while pthread_barrier_init() did not initialized bar->b_destroying:
https://github.com/verisign/freebsd/blob/f4c11c6b678195515bbab8bb2825fa5222ed3a58/lib/libthr/thread/thr_barrier.c#L95
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-threads
mailing list