Don't hold any lock when QML/JS calls qmlplugindump

Review Request #128227 - Created June 17, 2016 and submitted

Information
Denis Steckelmacher
kdevelop
master
363509
Reviewers
kdevelop

The QML/JS language plugin contains a cache that stores information about known plugin paths, locations of imported files and binary QML modules. When the user imports a binary QML module, qmlplugindump is called in order to list its contents.

This patch slightly reworks how a lock is held and released in order to ensure that no lock is held while calling qmlplugindump. In some cases (bug 363509), it seems that qmlplugindump can hang or take a very long time to respond. If Cache is locked during that time, no other thread can parse any QML file. It may also be possible that other threads are blocked while the global DUChain lock is held, which may completely freeze parsing in any language.

The QML/JS testsuite still runs and passes. I was not able to reproduce the bug, so I encourage anyone having faced the problem to test this patch.

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Milian Wolff
Sven Brauch
Denis Steckelmacher
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 0ac761ce294b2ad9f3846c6dfc91872da673e795 by Kevin Funk on behalf of Denis Steckelmacher to branch 5.0.
Loading...