[zeromq-dev] Running under valgrind shows a lot of possible data races
Pieter Hintjens
ph at imatix.com
Thu Jun 26 12:03:20 CEST 2014
There are various false positives with different valgrind tools. You
can maybe catch these in the suppression file?
On Thu, Jun 26, 2014 at 10:43 AM, Goswin von Brederlow
<goswin-v-b at web.de> wrote:
> On Thu, Jun 26, 2014 at 08:03:08AM +0400, Dmitry Antipov wrote:
>> I've tried to run hwserver and hwclient examples (taken unmodified from zguide)
>> under 'valgrind --tool=helgrind' and see a lot of "Possible data race during
>> read of size ..." errors (?). Can someone please explain them? Obviously hwclient
>> and hwserver don't share sockets between threads, and all valgrind reports
>> traces down to zeromq internals.
>>
>> Dmitry
>
> I believe that is an implementation detail of the internal queues.
> There is a race between the writer and reader of a queue. But no
> matter what order the writer and reader run data is neither lost nor
> duplicated. So yes, there is a race, but both possible orderings
> produce correct behaviour.
>
> Unless there is some bug there. You should trace down the race, verify
> that the behaviour is actualy intended that way and then annotate the
> code for helgrind to not show that specific race in the future. Repeat
> till you get no more reports.
>
> MfG
> Goswin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list