Opened 15 years ago

Closed 15 years ago

#1323 closed Bugs (fixed)

Assertion Error during cleanup after running out of thread resources

Reported by: martin_wille Owned by: Anthony Williams
Milestone: To Be Determined Component: thread
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

If test_barrier is run under certain resource constraints then an assertion violation is triggered during cleanup. I believe this assertion error indicates a bug.

Note: if Boost.Test is used and a signal got raised in response to hitting a resource limit then the problem could actually be in Boost.Test.

Example run with LIMIT_NPROC == 20 (using Linux x86_64, gcc 3.4.6 and also with gcc 4.1.2):

Running 1 test case... unknown location(0): fatal error in "test_barrier": std::exception: boost::thread_resource_error

* 1 failure detected in test suite "Master Test Suite" test_barrier_lib: ../libs/thread/src/condition.cpp:354: boost::detail::condition _impl::~condition_impl(): Assertion `res == 0' failed.

The first error message is the correct response. The second looks like a bug.

Change History (2)

comment:1 by Anthony Williams, 15 years ago

Status: newassigned

The assertion failure implies a bug in the use of barrier (and hence condition). pthread_cond_destroy should only fail if there is still a thread waiting on the condition when it is destroyed, which is an application bug.

comment:2 by Anthony Williams, 15 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.