Summary: | Dead-lock in QML/JS plugin (dead-lock in QmlJS::Cache) | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Kevin Funk <kfunk> |
Component: | Language Support: QML/JavaScript | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | grave | CC: | steckdenis |
Priority: | NOR | Keywords: | release_blocker |
Version: | git master | ||
Target Milestone: | 5.0.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevelop/0ac761ce294b2ad9f3846c6dfc91872da673e795 | Version Fixed In: | 5.0.0 |
Sentry Crash Report: |
Description
Kevin Funk
2016-05-25 15:04:34 UTC
Hi, For what I see in the stack trace, QmlJS::Cache calls "qmlplugindump" to import a binary QML plugin, and "qmlplugindump" somehow hangs (even though a maximum delay of 3 seconds is given to QProcess::waitForFinished). The problem is that QmlJS::Cache holds a mutex during that hang, which prevents other QmlJS parse jobs from modifying the cache (adding new files to it). The parse jobs therefore hang too, while holding the global KDevelop background mutex. This in turn hangs every parse job. I know how to possibly fix this issue (and prevent a 3-second hang if qmlplugindump is slow), but do you have an example project against which I could test my fix? (on my computer, qmljs's testsuite passes 100%). I would like to have a zip with all the files you have open (and that produce the error), because QmlJS::Cache is used for inter-file imports and uses project-wide structures. Git commit 8389fb2330207b2fa04627d47eb754342f1adc85 by Denis Steckelmacher. Committed on 18/06/2016 at 09:42. Pushed by dsteckelmacher into branch 'master'. qmljs: Don't hold locks while performing filesystem accesses or calling qmlplugindump This commit reduces the impact of a slow qmlplugindump executable, which reduces or fixes bug #363509. REVIEW: 128227 M +14 -7 languages/qmljs/duchain/cache.cpp http://commits.kde.org/kdevelop/8389fb2330207b2fa04627d47eb754342f1adc85 Git commit 0ac761ce294b2ad9f3846c6dfc91872da673e795 by Kevin Funk, on behalf of Denis Steckelmacher. Committed on 18/06/2016 at 13:55. Pushed by kfunk into branch '5.0'. qmljs: Don't hold locks while performing filesystem accesses or calling qmlplugindump This commit reduces the impact of a slow qmlplugindump executable, which reduces or fixes bug #363509. REVIEW: 128227 (cherry picked from commit 8389fb2330207b2fa04627d47eb754342f1adc85) M +14 -7 languages/qmljs/duchain/cache.cpp http://commits.kde.org/kdevelop/0ac761ce294b2ad9f3846c6dfc91872da673e795 |