<table><tr><td style="">croick updated this revision to Diff 52524.<br />croick retitled this revision from "[DrKonqi] Create QApplication in a scope to fix possible deadlock" to "Create QApplication in a scope to work around possible deadlock".<br />croick edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-ugjsunxg4hd53iu/">(Show Details)</a><br />croick added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D18245">View Revision</a></tr></table><br /><div><div><ul class="remarkup-list">
<li class="remarkup-list-item">add comment</li>
</ul></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;">Observed with a crashing KDevelop:<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">If the QApplication is destructed after cleanup o</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">DrKonqi may be blocked by a thread in the debuggee i</span>f the<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);"> DrKonqi</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">backend, somehow a DrKonqi-thread</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">QApplication is destructed after cleanup</span> of the <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">QDBusConnection may be</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">DrKonqi backend.</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">blocked by the debuggee (poll() being stuck according to strace).</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">The backend sends SIGCONT to the debuggee upon destruction.<br />
</span><br />
Since DrKonqi then cannot quit, KCrash continues waiting, leading<div style="padding: 8px 0;">...</div>sending SIGSTOP to the debuggee<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> or waiting with the SIGCONT signal</span>.<div style="padding: 8px 0;">...</div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R871 DrKonqi</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D18245?vs=49450&id=52524">https://phabricator.kde.org/D18245?vs=49450&id=52524</a></div></div><br /><div><strong>BRANCH</strong><div><div>scopedqapp</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D18245">https://phabricator.kde.org/D18245</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/main.cpp</div></div></div><br /><div><strong>To: </strong>croick, sitter, KDevelop<br /><strong>Cc: </strong>dfaure, thiago, ossi, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>