[Interest] Will TSAN_OPTIONS=detect_deadlocks=1 work when Qt is compiled with -sanitize thread?

coroberti coroberti at gmail.com
Thu Jul 18 17:41:55 CEST 2024


Nuno,
if you are on linux, *strace *command could be helpful to see and analyse
all system calls.
Thus, you could see how you are coming to a deadlock, if any.

Kind regards,
Robert Iakobashvili
............................


On Thu, Jul 18, 2024 at 6:31 PM Nuno Santos via Interest <
interest at qt-project.org> wrote:

> Hi,
>
> Thanks for your reply.
>
> I’ve compiled Qt with -sanitize thread and I’m trying to find deadlock on
> my application.
>
> Regards,
>
> Nuno
>
> > On 18 Jul 2024, at 16:15, Dennis Luehring via Interest <
> interest at qt-project.org> wrote:
> >
> > Am 18.07.2024 um 17:07 schrieb Nuno Santos via Interest:
> >>
> https://github.com/google/sanitizers/wiki/ThreadSanitizerDeadlockDetector
> >>
> >> "Just use TSAN_OPTIONS=detect_deadlocks=1 when running your
> tsan-instrumented program.”
> >>
> >
> > this document is from 2015 - lock order inversion aka Deadlock detection
> > is a feature that is active per default
> > or better said i've used TSAN many times to find deadlocks - maybe its a
> > special feature but seems to be the default now
> >
> > beware: you should always use recent gcc or clang for TSAN/ASAN as they
> > evolve permanently - older compiler instrumentation just don't be that
> good
> > in detecting - im normaly using SUSE Tumbleweed with latest available
> > gcc/clang for a my "bug hunting" environment
> >
> > do you try to find a Deadlock inside Qt code or inside your application
> > - for the first a TSAN build of Qt would be better to prevent false
> > positives
> >
> >
> >
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org
> > https://lists.qt-project.org/listinfo/interest
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240718/1cc102b9/attachment.htm>


More information about the Interest mailing list