<table><tr><td style="">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><p><strong>GDB</strong><br />
Actually the problem is about joining threads at the end of <tt style="background: #ebebeb; font-size: 13px;">main()</tt>. After being stuck and <tt style="background: #ebebeb; font-size: 13px;">kill -SIGSTOP $(pidof kdevelop)</tt>, DrKonqi turns out to be here:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">#0 0x00007fbf18adbf6d in __pthread_timedjoin_ex () from /usr/lib/libpthread.so.0
#1 0x00007fbf0aee0a01 in ?? () from /usr/lib/dri/i965_dri.so
#2 0x00007fbf0aee1299 in ?? () from /usr/lib/dri/i965_dri.so
#3 0x00007fbf0aedc76a in ?? () from /usr/lib/dri/i965_dri.so
--Type <RET> for more, q to quit, c to continue without paging--c
#4 0x00007fbf0ae66374 in ?? () from /usr/lib/dri/i965_dri.so
#5 0x00007fbf0aed83ff in ?? () from /usr/lib/dri/i965_dri.so
#6 0x00007fbf0bd4b04c in ?? () from /usr/lib/libGLX_mesa.so.0
#7 0x00007fbf0bd37822 in ?? () from /usr/lib/libGLX_mesa.so.0
#8 0x00007fbf0bd378a9 in ?? () from /usr/lib/libGLX_mesa.so.0
#9 0x00007fbf0bd379fe in ?? () from /usr/lib/libGLX_mesa.so.0
#10 0x00007fbf18d893e2 in XCloseDisplay () from /usr/lib/libX11.so.6
#11 0x00007fbf144b8fe2 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#12 0x00007fbf1448e33a in QXcbConnection::~QXcbConnection() () from /usr/lib/libQt5XcbQpa.so.5
#13 0x00007fbf1448f5f7 in QXcbIntegration::~QXcbIntegration() () from /usr/lib/libQt5XcbQpa.so.5
#14 0x00007fbf1448f6fa in QXcbIntegration::~QXcbIntegration() () from /usr/lib/libQt5XcbQpa.so.5
#15 0x00007fbf1a0c5f29 in QGuiApplicationPrivate::~QGuiApplicationPrivate() () from /usr/lib/libQt5Gui.so.5
#16 0x00007fbf1a6c370a in QApplicationPrivate::~QApplicationPrivate() () from /usr/lib/libQt5Widgets.so.5
#17 0x00007fbf19d2e1cf in QObject::~QObject() () from /usr/lib/libQt5Core.so.5
#18 0x00007fbf19cfed10 in QCoreApplication::~QCoreApplication() () from /usr/lib/libQt5Core.so.5
#19 0x00007fbf1a6c5852 in QApplication::~QApplication() () from /usr/lib/libQt5Widgets.so.5
#20 0x0000558afb850900 in main (argc=<optimized out>, argv=<optimized out>) at /home/christoph/Software/kde/kde/workspace/drkonqi/src/main.cpp:148</pre></div>
<p><strong>strace</strong></p>
<ul class="remarkup-list">
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">$ kill -SIGSEGV $(pidof kdevelop)</tt></li>
<li class="remarkup-list-item">let DrKonqi fire up</li>
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">$ strace -fp $(pidof drkonqi)</tt><ul class="remarkup-list">
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">strace: Process 9554 attached with 4 threads</tt></li>
</ul></li>
<li class="remarkup-list-item">close the DrKonqi dialog</li>
</ul>
<p>strace output:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">.
.
.
[pid 9556] poll([{fd=7, events=POLLIN}, {fd=8, events=POLLIN}], 2, -1 <unfinished ...>
[pid 9554] <... poll resumed> ) = 1 ([{fd=3, revents=POLLOUT}])
[pid 9554] writev(3, [{iov_base="<\0\2\0\20\0@\0106\0\2\0\17\0@\10\206\6\2\0\10\0@\10\4\0\2\0\7\0@\10"..., iov_len=124}], 1) = 124
[pid 9554] futex(0x55aa7e92a300, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 9555] <... poll resumed> ) = 1 ([{fd=3, revents=POLLIN}])
[pid 9555] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\22\08\3\7\0@\10\7\0@\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 64
[pid 9555] poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 9555] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\t\58\3\7\0@\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
[pid 9555] poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 9555] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\10\08\3\25\332I\0H\1\0\0\7\0@\10\0\0\0\0\233\3\225\1L\2)\1\20\0\0\3"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 108
[pid 9555] poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 9555] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\21\08\3\7\0@\10\7\0@\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 928
[pid 9555] poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 9555] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\241 ;\3\21\0@\10Q\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
[pid 9555] close(4) = 0
[pid 9555] futex(0x55aa7e92a300, FUTEX_WAKE_PRIVATE, 2147483647) = 1
[pid 9555] madvise(0x7f5dab453000, 8368128, MADV_DONTNEED) = 0
[pid 9555] exit(0) = ?
[pid 9555] +++ exited with 0 +++
[pid 9554] <... futex resumed> ) = 0
[pid 9554] futex(0x55aa7e92a2b0, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 9554] poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLIN|POLLOUT}])
[pid 9554] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\34\0<\3H\1\0\0\204\1\0\0\33\332I\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
[pid 9554] writev(3, [{iov_base=".\0\2\0\3\0@\10_\0\2\0\f\0@\10", iov_len=16}], 1) = 16
[pid 9554] poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
[pid 9554] writev(3, [{iov_base="<\27\2\0\0\0@\10+\0\1\0", iov_len=12}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 12
[pid 9554] poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 9554] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\34\0<\3H\1\0\0\266\1\0\0\35\332I\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
[pid 9554] poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
[pid 9554] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\34\0<\3H\1\0\0\267\1\0\0\35\332I\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 96
[pid 9554] futex(0x55aa7ea93ac8, FUTEX_WAKE_PRIVATE, 2147483647) = 1
[pid 9554] futex(0x7f5da2df59d0, FUTEX_WAIT, 9557, NULL</pre></div>
<p>Afterwards nothing happens, the CPU is (endlessly) busy doing something for kdevelop. Note how poll() in thread 9556 (QDBusConnection) never returned and is finally blocking the other threads.<br />
The FD 7 points to 'anon_inode:[eventfd]'</p>
<ul class="remarkup-list">
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">$ kill -SIGSTOP $(pidof kdevelop)</tt></li>
</ul>
<p>strace output now resumes:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">[pid 9557] <... futex resumed> ) = 0
[pid 9557] futex(0x55aa7ea93a78, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 9557] madvise(0x7f5da25f5000, 8368128, MADV_DONTNEED) = 0
[pid 9557] exit(0) = ?
[pid 9557] +++ exited with 0 +++
[pid 9554] <... futex resumed> ) = 0
[pid 9554] munmap(0x7f5da2df6000, 1310728) = 0
[pid 9554] close(13) = 0
[pid 9554] shutdown(3, SHUT_RDWR) = 0
[pid 9554] close(3) = 0
[pid 9554] write(7, "\1\0\0\0\0\0\0\0", 8) = 8
[pid 9556] <... poll resumed> ) = 1 ([{fd=7, revents=POLLIN}])
.
.
.
[pid 9556] exit(0) = ?
[pid 9556] +++ exited with 0 +++
getpid() = 9554
exit_group(0) = ?
+++ exited with 0 +++</pre></div>
<p><strong>kdevelop</strong><br />
stracing the kdevelop process at the same time shows, that a thread called "QQuickXmlQueryE" is blocked by a read()-syscall also with an eventfd.<br />
Actually all files are directly closed by KCrash, but as far as I understand the epoll mechanism, the epoll instance remains as long as there are processes using it, so close() might not have the desired effect.<br />
Might be that DrKonqi and KDevelop are trying to read from the same file. I cannot tell. <a href="https://patchwork.kernel.org/patch/10413589/" class="remarkup-link" target="_blank" rel="noreferrer">https://patchwork.kernel.org/patch/10413589/</a> is not part of the kernel yet it seems.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R871 DrKonqi</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>To: </strong>croick, sitter, KDevelop<br /><strong>Cc: </strong>plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>