Re: [zeromq-dev] are zmq::atomic_ptr_t<> Helgrind warnings known?

2018-02-25 Thread Luca Boccassi
On Sun, 2018-02-25 at 13:22 -0500, Bill Torpey wrote: > Hi Franceso: > > A few more points below … > > Good luck, and please post back if you find out anything interesting! > > Regards, > > Bill > > > On Feb 25, 2018, at 4:54 AM, Francesco > m> wrote: > > > >

Re: [zeromq-dev] are zmq::atomic_ptr_t<> Helgrind warnings known?

2018-02-25 Thread Bill Torpey
Hi Franceso: A few more points below … Good luck, and please post back if you find out anything interesting! Regards, Bill > On Feb 25, 2018, at 4:54 AM, Francesco wrote: > > Hi Bill, > thanks for your answer. > > > > 2018-02-24 21:49 GMT+01:00 Bill Torpey

Re: [zeromq-dev] are zmq::atomic_ptr_t<> Helgrind warnings known?

2018-02-25 Thread Francesco
Hi Bill, thanks for your answer. 2018-02-24 21:49 GMT+01:00 Bill Torpey : > > ... > If T2 and T4 were application code, this would be a clear violation of > ZMQ’s threading rules (assuming “legacy”, non-thread-safe socket types). > Right. > For instance, one technique

Re: [zeromq-dev] are zmq::atomic_ptr_t<> Helgrind warnings known?

2018-02-24 Thread Luca Boccassi
There are a couple in the use/setting of a handful of socket options, but nothing major. The pipes and queues are fine. On Sat, 2018-02-24 at 17:34 +0100, Francesco wrote: > Actually even building zeromq with -fsanitize=thread I still get a > lot of > data races about ZMQ atomics: > > WARNING:

Re: [zeromq-dev] are zmq::atomic_ptr_t<> Helgrind warnings known?

2018-02-24 Thread Bill Torpey
Francesco: Please see my comments below. Full disclaimer: I don’t pretend to understand ZMQ internals, and a lot of this information came via trial and error. YMMV, but I hope this helps. If you find out more, it would be much appreciated if you post back to this thread — thanks! Regards,

Re: [zeromq-dev] are zmq::atomic_ptr_t<> Helgrind warnings known?

2018-02-24 Thread Francesco
Actually even building zeromq with -fsanitize=thread I still get a lot of data races about ZMQ atomics: WARNING: ThreadSanitizer: data race (pid=25770) Atomic write of size 4 at 0x7d417e48 by thread T4: #0 __tsan_atomic32_fetch_add

Re: [zeromq-dev] are zmq::atomic_ptr_t<> Helgrind warnings known?

2018-02-24 Thread Francesco
Hi Bill, indeed I've found ThreadSanitizer to be more effective i.e., it contains much less false positives compared to Helgrind... still I'm getting several race condition warnings out of libzmq 4.2.3... indeed I actually built only my application code with -fsanitize=thread... do you know if I

Re: [zeromq-dev] are zmq::atomic_ptr_t<> Helgrind warnings known?

2018-02-24 Thread Bill Torpey
I’m using clang’s Thread Sanitizer for a similar purpose, and just happened to notice that the TSAN docs use ZeroMQ as one of the example suppressions: https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions

Re: [zeromq-dev] are zmq::atomic_ptr_t<> Helgrind warnings known?

2018-02-23 Thread Thomas Rodgers
I don’t know if this has changed recently, but at the time I added the compiler intrinsics support, it was generally deemed undesirable to require C++11. On Fri, Feb 23, 2018 at 5:22 AM Francesco wrote: > Hi all, > I'm trying to further debug the problem I

Re: [zeromq-dev] are zmq::atomic_ptr_t<> Helgrind warnings known?

2018-02-23 Thread Luca Boccassi
On Fri, 2018-02-23 at 12:22 +0100, Francesco wrote: > Hi all, > I'm trying to further debug the problem I described in my earlier > mail ( > https://lists.zeromq.org/pipermail/zeromq-dev/2018-February/032303.ht > ml) so > I decided to use Helgrind to find race conditions in my code. > > My

[zeromq-dev] are zmq::atomic_ptr_t<> Helgrind warnings known?

2018-02-23 Thread Francesco
Hi all, I'm trying to further debug the problem I described in my earlier mail ( https://lists.zeromq.org/pipermail/zeromq-dev/2018-February/032303.html) so I decided to use Helgrind to find race conditions in my code. My problem is that apparently Helgrind 3.12.0 is reporting race conditions