D14302: Don't block forever in ensureKdeinitRunning

Thiago Macieira noreply at phabricator.kde.org
Tue Jul 24 02:17:19 BST 2018


thiago added a comment.


  Quick testing via gdb:
  
    Breakpoint 1, QLockFile::tryLock (this=0x7fffffffc6d8, timeout=0) at /home/tjmaciei/src/qt/qt5/qtbase/src/corelib/io/qlockfile.cpp:241
    241         Q_D(QLockFile);
    (gdb) n
    242         QDeadlineTimer timer(qMax(timeout, -1));    // QDT only takes -1 as "forever"
    (gdb) 
    243         int sleepTime = 100;
    (gdb) 
    245             d->lockError = d->tryLock_sys();
    (gdb) 
    246             switch (d->lockError) {
    (gdb) 
    254                 if (!d->isLocked && d->isApparentlyStale()) {
    (gdb) 
    265                 break;
    (gdb) 
    268             int remainingTime = timer.remainingTime();
    (gdb) p timer
    $4 = {t1 = 39043, t2 = 76902106, type = 1}
    (gdb) s
    QDeadlineTimer::remainingTime (this=0x7fffffffc590) at /home/tjmaciei/src/qt/qt5/qtbase/src/corelib/kernel/qdeadlinetimer.cpp:426
    426         qint64 ns = remainingTimeNSecs();
    (gdb) s
    QDeadlineTimer::remainingTimeNSecs (this=0x7fffffffc590) at /home/tjmaciei/src/qt/qt5/qtbase/src/corelib/kernel/qdeadlinetimer.cpp:440
    440         if (isForever())
    (gdb) n
    442         qint64 raw = rawRemainingTimeNSecs();
    (gdb) n
    443         return raw < 0 ? 0 : raw;
    (gdb) p raw
    $5 = -24344165069
    (gdb) fin
    Run till exit from #0  QDeadlineTimer::remainingTimeNSecs (this=0x7fffffffc590)
        at /home/tjmaciei/src/qt/qt5/qtbase/src/corelib/kernel/qdeadlinetimer.cpp:443
    0x00007ffff7a1d014 in QDeadlineTimer::remainingTime (this=0x7fffffffc590)
        at /home/tjmaciei/src/qt/qt5/qtbase/src/corelib/kernel/qdeadlinetimer.cpp:426
    426         qint64 ns = remainingTimeNSecs();
    Value returned is $6 = 0
    (gdb) 
    Run till exit from #0  0x00007ffff7a1d014 in QDeadlineTimer::remainingTime (this=0x7fffffffc590)
        at /home/tjmaciei/src/qt/qt5/qtbase/src/corelib/kernel/qdeadlinetimer.cpp:426
    QLockFile::tryLock (this=0x7fffffffc6d8, timeout=0) at /home/tjmaciei/src/qt/qt5/qtbase/src/corelib/io/qlockfile.cpp:268
    268             int remainingTime = timer.remainingTime();
    Value returned is $7 = 0

REPOSITORY
  R271 KDBusAddons

REVISION DETAIL
  https://phabricator.kde.org/D14302

To: jtamate, dfaure, #frameworks, thiago
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180724/e3529f17/attachment.html>


More information about the Kde-frameworks-devel mailing list