Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#8410 closed Bugs (invalid)

lockfree 1.53.0: queue.cpp: push is broken if tail_.compare_exchange_strong returns false

Reported by: robert.hranitzky@… Owned by: timblechmann
Milestone: To Be Determined Component: lockfree
Version: Boost 1.53.0 Severity: Problem
Keywords: Cc:

Description

see line 299, queue.hpp, in lockfree, boost version 1.53.0

the implementation of compare_exchange_strong on x86 may return false; see line 320, boost/atomic/detail/gcc-x86.hpp however that isn't checked in push() of queue.hpp;

proof: add an assert to the code, line 299 in queue.hpp: assert (tail_.compare_exchange_strong(tail, new_tail) && "ERROR: broken"); return true;

and run a stress test with lots of pthreads pushing and popping data. I can provide the test code on demand.

Follow up: maybe this issue applies also to other parts of the lockfree code ?

Change History (2)

comment:1 by timblechmann, 10 years ago

Resolution: invalid
Status: newclosed

in reply to:  1 comment:2 by robert.hranitzky@…, 10 years ago

Replying to timblechmann:

read the paper: http://www.research.ibm.com/people/m/michael/podc-1996.pdf

thanks for the paper, I see now that I need to change my benchmarking-code for this algorithm.

Note: See TracTickets for help on using tickets.