Bug 379977 - hang in context browser popup
Summary: hang in context browser popup
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: language (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-18 16:32 UTC by RJVB
Modified: 2023-02-18 03:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
workaround patch (2.00 KB, patch)
2017-05-19 08:26 UTC, RJVB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RJVB 2017-05-18 16:32:01 UTC
I just had my 2nd hang in a context browser popup, this time one I triggered myself in order to jump to a variable definition in some header file.

The (partial) backtrace:

#0  0x00007fc4df38b93d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fc4dfc8488d in qt_nanosleep (amount=...)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/kernel/qelapsedtimer_unix.cpp:195
#2  0x00007fc4dfa67134 in QThread::usleep (usecs=usecs@entry=500)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/thread/qthread_unix.cpp:511
#3  0x00007fc4dd52babe in KDevelop::DUChainLock::lockForWrite (
    this=0x7fc4ddcc8ce0 <KDevelop::(anonymous namespace)::Q_QGS_sdDUChainPrivate::innerFunction()::holder+32>, 
    timeout=0)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kdevplatform5/kf5-kdevplatform-devel/work/kf5-kdevplatform-5/language/duchain/duchainlock.cpp:155
#4  0x00007fc4dd52bcdc in KDevelop::DUChainWriteLocker::lock (this=0x7ffe666ff340)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kdevplatform5/kf5-kdevplatform-devel/work/kf5-kdevplatform-5/language/duchain/duchainlock.cpp:249
#5  0x00007fc4dd4d3526 in KDevelop::DUChain::documentLoadedPrepare (this=0x17dbc60, doc=0x947bb80)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kdevplatform5/kf5-kdevplatform-devel/work/kf5-kdevplatform-5/language/duchain/duchain.cpp:1504
#6  0x00007fc4dfc5e32e in call (a=0x7ffe666ff4c0, r=0x17dbc60, this=<optimised out>)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtbase/include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#7  QMetaObject::activate (sender=0x1624d10, signalOffset=<optimised out>, 
    local_signal_index=local_signal_index@entry=9, argv=argv@entry=0x7ffe666ff4c0)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/kernel/qobject.cpp:3723
#8  0x00007fc4dfc5e8c7 in QMetaObject::activate (sender=<optimised out>, 
    m=m@entry=0x7fc4e1ca76a0 <KDevelop::IDocumentController::staticMetaObject>, 
    local_signal_index=local_signal_index@entry=9, argv=argv@entry=0x7ffe666ff4c0)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/kernel/qobject.cpp:3602
#9  0x00007fc4e1a93c52 in KDevelop::IDocumentController::documentLoadedPrepare (this=<optimised out>, 
    _t1=<optimised out>, _t1@entry=0x947bb80)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kdevplatform5/kf5-kdevplatform-devel/work/build/interfaces/KDevPlatformInterfaces_automoc.dir/moc_idocumentcontr_BKHINBC3JP6LAY.cpp:565
#10 0x00007fc4e1a85960 in KDevelop::IDocument::notifyLoaded (this=0x947bb80)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kdevplatform5/kf5-kdevplatform-devel/work/kf5-kdevplatform-5/interfaces/idocument.cpp:130
#11 0x00007fc4dfc5e32e in call (a=0x7ffe666ff600, r=0x947bb60, this=<optimised out>)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtbase/include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#12 QMetaObject::activate (sender=sender@entry=0xa20c060, signalOffset=<optimised out>, 
    local_signal_index=local_signal_index@entry=15, argv=argv@entry=0x7ffe666ff600)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/kernel/qobject.cpp:3723
#13 0x00007fc4dfc5e8c7 in QMetaObject::activate (sender=sender@entry=0xa20c060, m=<optimised out>, 
    local_signal_index=local_signal_index@entry=15, argv=argv@entry=0x7ffe666ff600)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_aqua_qt5-kde-devel/qt5-kde-devel/work/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/kernel/qobject.cpp:3602
#14 0x00007fc4dc2c4272 in KTextEditor::Document::textChanged(KTextEditor::Document*) (this=this@entry=0xa20c060, 
    _t1=<optimised out>, _t1@entry=0xa20c060)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_KF5-Frameworks/kf5-ktexteditor/work/build/src/KF5TextEditor_automoc.dir/moc_document_G7ZZNPEZ2BAWZM.cpp:577
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) f 3
#3  0x00007fc4dd52babe in KDevelop::DUChainLock::lockForWrite (
    this=0x7fc4ddcc8ce0 <KDevelop::(anonymous namespace)::Q_QGS_sdDUChainPrivate::innerFunction()::holder+32>, 
    timeout=0)
    at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kdevplatform5/kf5-kdevplatform-devel/work/kf5-kdevplatform-5/language/duchain/duchainlock.cpp:155
155           QThread::usleep(uSleepTime);
(gdb) l
150             d->m_writerRecursion = 0;
151           }
152         }
153
154         if (!timeout || t.elapsed() < timeout) {
155           QThread::usleep(uSleepTime);
156         } else {
157           //Fail!
158           return false;
159         }
(gdb) p timeout
$1 = 0
(gdb) p timeout=1000
$3 = 1000
(gdb) p t.restart()
$4 = -9222948135378
(gdb) p t.elapsed()
$5 = 3613
(gdb) c
Continuing.


Wouldn't it be possible to use a "large" value for the timeout argument, rather than 0. 

I have no idea what triggered this; my system wasn't even particularly busy.
Comment 1 RJVB 2017-05-19 08:26:43 UTC
Created attachment 105625 [details]
workaround patch

I'll be running the attached patch to see just how often this occurs (and if 10-12 second timeouts are "reasonably eternal").

I don't know if there's any use to it, but I kinda like my idea to randomise the timeout so that theoretically only 1 of a series of deadlocked threads will ever time out :)
Comment 2 Justin Zobel 2023-01-19 00:18:46 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 3 Bug Janitor Service 2023-02-03 05:01:23 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2023-02-18 03:47:28 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!