Summary: | deadlock in backgroundparser [mutex locked while plugin gets loaded] | ||
---|---|---|---|
Product: | [Developer tools] kdevplatform | Reporter: | Milian Wolff <mail> |
Component: | language | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | afief.h, ambrop7, leandrosansilva, simonandric5 |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevplatform/8c46e8e765857b9e4d09b78c6896100dc150f964 | Version Fixed In: | 5.0.1 |
Description
Milian Wolff
2015-11-09 18:05:14 UTC
*** Bug 319829 has been marked as a duplicate of this bug. *** Git commit e4c26c563231fea20898c1f3a9743b178df9fd39 by Kevin Funk. Committed on 28/01/2016 at 15:41. Pushed by kfunk into branch '5.0'. ContextBrowserView: Fix deadlock This happens everytime the context browser view is open at startup, and KDevelop's background parser starts jobs. Arguably, we should never block indefinitely in a non-user initiated event (here: QWidget::showEvent). So let's give up after a timeout. Differential Revision: https://phabricator.kde.org/D866 M +8 -2 plugins/contextbrowser/contextbrowserview.cpp http://commits.kde.org/kdevplatform/e4c26c563231fea20898c1f3a9743b178df9fd39 @Milian: Do you still consider this a release blocker? I never got into this deadlock again, after my fix. No, not a release blocker, but still potentially broken. We should try to fix this in the long run somehow. So let's keep it open. *** Bug 367825 has been marked as a duplicate of this bug. *** Git commit 64f72d3fad28261f97cff6837526d69f6bb72837 by Milian Wolff. Committed on 06/09/2016 at 11:16. Pushed by mwolff into branch '5.0'. Add test to trigger deadlock in BackgroundParser. To run it, use: $ TEST_BUG_355100=1 ./test_backgroundparser testNoDeadlockInJobCreation Otherwise, we'll skip the deadlock to prevent issues on the CI. M +66 -4 language/backgroundparser/tests/test_backgroundparser.cpp M +3 -0 language/backgroundparser/tests/test_backgroundparser.h M +5 -1 language/backgroundparser/tests/testlanguagesupport.cpp M +1 -0 language/backgroundparser/tests/testlanguagesupport.h M +5 -1 language/backgroundparser/tests/testparsejob.cpp M +3 -0 language/backgroundparser/tests/testparsejob.h http://commits.kde.org/kdevplatform/64f72d3fad28261f97cff6837526d69f6bb72837 Git commit 8c46e8e765857b9e4d09b78c6896100dc150f964 by Milian Wolff. Committed on 06/09/2016 at 20:17. Pushed by mwolff into branch '5.0'. Release the background parser lock while creating parse jobs. This fixes a deadlock due to lock order inversion. We often elsewhere access the background parser while holding the DUChain lock. Here, we used to lock the background parser and then potentially locked the DUChain. This was desastrous. The patch here now unlocks the background parser while creating the parse job, and relocks it again to insert the job into its internal data structurs. Because the background parser only ever creats jobs from the main thread, and only one at most, this is safe to do. M +16 -1 language/backgroundparser/backgroundparser.cpp M +0 -4 language/backgroundparser/tests/test_backgroundparser.cpp http://commits.kde.org/kdevplatform/8c46e8e765857b9e4d09b78c6896100dc150f964 *** Bug 368375 has been marked as a duplicate of this bug. *** |