Date: Fri, 06 Feb 2015 11:37:40 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-threads@FreeBSD.org Subject: [Bug 197365] pthread_barrier_destroy() return EBUSY on idle barrier Message-ID: <bug-197365-16@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
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@FreeBSD.org Reporter: fguiliani@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197365-16>