Re: POSIX pthread counter (integer) overflow in valgrind drd_vc.c

Julian Seward <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <[email protected]>
 > drd: drd_vc.c:96 (vgDrd_vc_increment): Assertion 'oldcount <
 > vc->vc[i].count' failed.

I suspect (I don't know for sure) that this is a vector clock overflow.
That might happen if your program performed more that 2^32 inter-thread
synchronisation events, for example, mutex lock, unlock, condvar posts
or signals, sem post/wait, thread create/join, etc.  Is that likely?

Can you reduce the problem size (to perhaps a few hundred thousand records)
and see if the failure goes away?

 > I don't understand what the semantics of the thread counter "count" is [..]

I suspect that is incremented every time one of the abovementioned thread
events happens.  The mechanism is a bit complex, but a counter overflow could
happen if there is a chain of such thread events (possibly involving multiple
threads) that is more than 2^32 long.

J
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.