[Interest] Will TSAN_OPTIONS=detect_deadlocks=1 work when Qt is compiled with -sanitize thread?
Alexey Rusakov
ktirf at users.sf.net
Fri Jul 19 15:04:00 CEST 2024
Deadlocks usually occur across several threads. Do you have a stack
trace for other threads, too?
Alexey
On Fri, 2024-07-19 at 12:12 +0100, Nuno Santos via Interest wrote:
> Dennis,
>
> Thanks for the clarification.
>
> Maybe it is deviating a bit from Qt. It’s probably something I’m not
> doing correctly from the Qt paradigm perspective but this is one of
> those problems where I feeling lost.
>
> I’ve just had one of those rare deadlock and it happened like this:
>
> - This is a music making application. I have the audio processing and
> the GUI.
> - In the audio render thread, I call the processing of the sequencer
> which is responsible for handling the music events.
> - There are visual representations of this elements that contains the
> notes that are being played
> - During the processing of the musical steps, there is a signal that
> is being called. It got stuck there.
>
> But invoking a method as a queue connection in another thread
> shouldn’t be a problem, right?
>
> QMetaObject::invokeMethod(this, &DSClip::stepChanged,
> Qt::QueuedConnection);
>
> This invoke will trigger a signal that will request the DSClip visual
> instance to be updated on the QML side.
>
> Here is the place it got stuck in the audio render thread. It got
> locked when invoking the method.
>
> Does this ring any bell?
>
> Thanks!
>
> Best,
>
> Nuno
>
>
>
> > On 19 Jul 2024, at 12:00, Dennis Luehring <dl.soluz at gmx.net> wrote:
> >
> > Am 19.07.2024 um 12:52 schrieb Nuno Santos:
> > > Can data race cause deadlocks?
> > >
> > > Or should I explicitly look for deadlock: "lock-order-inversion
> > > (potential deadlock)”
> >
> >
> > data races can maybe get you into deadlocks someway... but you
> > should
> > look for lock-order-inversions and fix them (even if very hard to
> > sometimes understand why they happening)
> >
> >
> > btw: the discussion is drifting away from Qt itself :)
>
> _______________________________________________
> 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/20240719/b261e970/attachment.htm>
More information about the Interest
mailing list