D18245: [DrKonqi] Create QApplication in a scope to fix possible deadlock

2019-01-14 Thread Christoph Roick
croick created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
croick requested review of this revision.

REVISION SUMMARY
  Observed with a crashing KDevelop:
  If the QApplication is destructed after cleanup of the DrKonqi
  backend, somehow a DrKonqi-thread of the QDBusConnection may be
  blocked by the debuggee (poll() being stuck according to strace).
  Since DrKonqi then cannot quit, KCrash continues waiting, leading
  to a deadlock. The situation may be disentangled by externally
  sending SIGSTOP to the debuggee.
  
  Cleaning up the QApplication first and afterwards the backend
  omits the deadlock.

TEST PLAN
  - let kdevelop crash to fire up DrKonqi
  - close DrKonqi again
  - watch state of crashed kdevelop process

REPOSITORY
  R871 DrKonqi

BRANCH
  scopedqapp

REVISION DETAIL
  https://phabricator.kde.org/D18245

AFFECTED FILES
  src/main.cpp

To: croick
Cc: plasma-devel, sukalyanbanga, jraleigh, GB_2, ragreen, Pitel, ZrenBot, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D18245: [DrKonqi] Create QApplication in a scope to fix possible deadlock

2019-01-15 Thread Christoph Roick
croick added a comment.


  **GDB**
  Actually the problem is about joining threads at the end of `main()`. After 
being stuck and `kill -SIGSTOP $(pidof kdevelop)`, DrKonqi turns out to be here:
  
#0  0x7fbf18adbf6d in __pthread_timedjoin_ex () from 
/usr/lib/libpthread.so.0
#1  0x7fbf0aee0a01 in ?? () from /usr/lib/dri/i965_dri.so
#2  0x7fbf0aee1299 in ?? () from /usr/lib/dri/i965_dri.so
#3  0x7fbf0aedc76a in ?? () from /usr/lib/dri/i965_dri.so
--Type  for more, q to quit, c to continue without paging--c
#4  0x7fbf0ae66374 in ?? () from /usr/lib/dri/i965_dri.so
#5  0x7fbf0aed83ff in ?? () from /usr/lib/dri/i965_dri.so
#6  0x7fbf0bd4b04c in ?? () from /usr/lib/libGLX_mesa.so.0
#7  0x7fbf0bd37822 in ?? () from /usr/lib/libGLX_mesa.so.0
#8  0x7fbf0bd378a9 in ?? () from /usr/lib/libGLX_mesa.so.0
#9  0x7fbf0bd379fe in ?? () from /usr/lib/libGLX_mesa.so.0
#10 0x7fbf18d893e2 in XCloseDisplay () from /usr/lib/libX11.so.6
#11 0x7fbf144b8fe2 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#12 0x7fbf1448e33a in QXcbConnection::~QXcbConnection() () from 
/usr/lib/libQt5XcbQpa.so.5
#13 0x7fbf1448f5f7 in QXcbIntegration::~QXcbIntegration() () from 
/usr/lib/libQt5XcbQpa.so.5
#14 0x7fbf1448f6fa in QXcbIntegration::~QXcbIntegration() () from 
/usr/lib/libQt5XcbQpa.so.5
#15 0x7fbf1a0c5f29 in QGuiApplicationPrivate::~QGuiApplicationPrivate() 
() from /usr/lib/libQt5Gui.so.5
#16 0x7fbf1a6c370a in QApplicationPrivate::~QApplicationPrivate() () 
from /usr/lib/libQt5Widgets.so.5
#17 0x7fbf19d2e1cf in QObject::~QObject() () from 
/usr/lib/libQt5Core.so.5
#18 0x7fbf19cfed10 in QCoreApplication::~QCoreApplication() () from 
/usr/lib/libQt5Core.so.5
#19 0x7fbf1a6c5852 in QApplication::~QApplication() () from 
/usr/lib/libQt5Widgets.so.5
#20 0x558afb850900 in main (argc=, argv=) 
at /home/christoph/Software/kde/kde/workspace/drkonqi/src/main.cpp:148
  
  **strace**
  
  - `$ kill -SIGSEGV $(pidof kdevelop)`
  - let DrKonqi fire up
  - `$ strace -fp $(pidof drkonqi)`
- `strace: Process 9554 attached with 4 threads`
  - close the DrKonqi dialog
  
  strace output:
  
.
.
.
[pid  9556] poll([{fd=7, events=POLLIN}, {fd=8, events=POLLIN}], 2, -1 

[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 
[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, 

D18245: [DrKonqi] Create QApplication in a scope to fix possible deadlock

2019-01-15 Thread Christoph Roick
croick added a comment.


  Actually, by using `KCrash::setFlags(KCrash::KeepFDs)` in KDevelop, so 
preventing the closing of all FDs, the problem is fixed(?) as well.
  But I think, that the situation should not appear, even for a "misconfigured" 
debuggee.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D18245

To: croick, sitter, #kdevelop
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2019-01-16 Thread Christoph Roick
croick updated this revision to Diff 49607.
croick edited the summary of this revision.
croick edited the test plan for this revision.
croick added a comment.


  - rename queryPtrace to setPtracer
  - add a kdeinit option in crashtest

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=34671&id=49607

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/ptracer.cpp
  src/ptracer.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, 
jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2019-01-16 Thread Christoph Roick
croick updated this revision to Diff 49618.
croick added a comment.


  - use debuggee pid instead of DrKonqi pid for socket name
  - make sure to read/write all bytes from/to socket

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=49607&id=49618

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/ptracer.cpp
  src/ptracer.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, 
jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2019-01-16 Thread Christoph Roick
croick marked 11 inline comments as done.
croick added a comment.


  `read()` and `write()` were assumed to work right away, I added a loop around.

INLINE COMMENTS

> ossi wrote in crashtest.cpp:133
> this addition isn't used or explained anywhere for all i can tell.

It's used to unset the `AlwaysDirectly` flag. It allows testing using with 
direct start and kdeinit start.

> ossi wrote in crashtest.cpp:138
> only if kdeinit was started from the same console, which you cannot assume.
> 
> also, this change wouldn't belong into this patch anyway.

Agreed, I added an option instead and would commit that separately.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D11235

To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, 
jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2019-01-16 Thread Christoph Roick
croick updated this revision to Diff 49649.
croick marked an inline comment as done.
croick added a comment.


  - change order and add comment to kdeinit option in crashtest
  - add warning if debuggee does not respond as expected

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=49618&id=49649

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/ptracer.cpp
  src/ptracer.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, 
jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2019-01-16 Thread Christoph Roick
croick updated this revision to Diff 49651.
croick marked 5 inline comments as done.
croick added a comment.


  - emit warning if no socket is available

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=49649&id=49651

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/ptracer.cpp
  src/ptracer.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, 
jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2019-01-16 Thread Christoph Roick
croick added inline comments.

INLINE COMMENTS

> ossi wrote in ptracer.cpp:65
> you really could just use != here ... ^^

wow...

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D11235

To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, 
jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2019-01-17 Thread Christoph Roick
croick updated this revision to Diff 49705.
croick edited the summary of this revision.
croick added a comment.


  - adjust warning and check for EINTR when polling

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=49651&id=49705

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/ptracer.cpp
  src/ptracer.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, 
jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2019-01-17 Thread Christoph Roick
croick updated this revision to Diff 49710.
croick added a comment.


  - swap lines, declare array for response message where needed

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=49705&id=49710

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/ptracer.cpp
  src/ptracer.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, 
jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2019-01-17 Thread Christoph Roick
croick added a comment.


  > you got the parent-child ordering wrong in the commit message. ^^
  
  What do you mean? The (internal) debugger is a child of the debuggee.
  
$ pstree -pn $(pidof crashtest)
crashtest(17220)─┬─{crashtest}(17221)
 ├─{crashtest}(17222)
 └─drkonqi(17223)─┬─{drkonqi}(17224)
  ├─{drkonqi}(17225)
  ├─{drkonqi}(17231)
  └─gdb(17293)─┬─{gdb}(17294)
   ├─{gdb}(17295)
   └─{gdb}(17296)

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D11235

To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, 
jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2019-01-17 Thread Christoph Roick
croick updated this revision to Diff 49717.
croick added a comment.


  - swap variable declaration

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=49710&id=49717

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/ptracer.cpp
  src/ptracer.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, 
jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11235: Request change of ptrace scope from KCrash

2019-01-25 Thread Christoph Roick
This revision was automatically updated to reflect the committed changes.
Closed by commit R871:9f3cfcff960c: Request change of ptrace scope from KCrash 
(authored by croick).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D11235?vs=49717&id=50215#toc

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=49717&id=50215

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/ptracer.cpp
  src/ptracer.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, 
jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11234: [DrKonqi] Show debug button when KDevelop session is running

2019-01-25 Thread Christoph Roick
croick added a comment.


  A few screenshots:
  
  Before the patch:
  
  - `ShowDebugButton=false` in drkonqirc F6567349: beforepatch_1.png 

  - `ShowDebugButton=true` in drkonqirc F6567353: beforepatch_2.png 
 F6567358: beforepatch_2_german.png 
 Note how the button is just floating.
  
  After the patch:
  
  - `ShowDebugButton=false` in drkonqirc, but with KDevelop running F6567361: 
afterpatch.png 

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D11234

To: croick, #plasma_workspaces, apol, mwolff, #kdevelop
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D18245: [DrKonqi] Create QApplication in a scope to fix possible deadlock

2019-02-22 Thread Christoph Roick
croick added a comment.


  The following steps allow creating the backtraces. Simply attaching to 
KDevelop does not work, since that sends a SIGSTOP to all threads (and releases 
the dead lock). Attaching to DrKonqi after closing the dialog does not work 
since the process already is defunct:
  
  - `kill -SIGSEGV $(pidof kdevelop)`
  - raise DrKonqi dialog
  - `gdb -p $(pidof drkonqi)`, continue execution
  - close DrKonqi dialog
  - CTRL + C in gdb, which now is stuck
  - `kill -SIGSTOP $(pidof kdevelop)`, gdb reacts again, generate backtrace for 
DrKonqi
  - `gdb -p $(pidof kdevelop)`, generate backtrace for KDevelop
  
  Backtrace of DrKonqi:
  
(gdb) info thread
  Id   Target Id   Frame 
  1Thread 0x7f123713bcc0 (LWP 17330) "drkonqi" 
0x7f123b0a6f6d in __pthread_timedjoin_ex () from /usr/lib/libpthread.so.0
* 3Thread 0x7f122700 (LWP 17332) "QDBusConnection" 
0x7f123bc65c21 in poll () from /usr/lib/libc.so.6
  4Thread 0x7f122d866700 (LWP 17333) "drkonqi:disk$0"  
0x7f123b0abafc in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /usr/lib/libpthread.so.0
(gdb) thread apply all bt

Thread 4 (Thread 0x7f122d866700 (LWP 17333)):
#0  0x7f123b0abafc in pthread_cond_wait@@GLIBC_2.3.2 () from 
/usr/lib/libpthread.so.0
#1  0x7f122de63c84 in ?? () from /usr/lib/dri/i965_dri.so
#2  0x7f122de639a8 in ?? () from /usr/lib/dri/i965_dri.so
#3  0x7f123b0a5a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x7f123bc70b23 in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7f122700 (LWP 17332)):
#0  0x7f123bc65c21 in poll () from /usr/lib/libc.so.6
#1  0x7f123a063540 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x7f123a06362e in g_main_context_iteration () from 
/usr/lib/libglib-2.0.so.0
#3  0x7f123c337ce9 in 
QEventDispatcherGlib::processEvents(QFlags) () 
from /usr/lib/libQt5Core.so.5
#4  0x7f123c2e0b2c in 
QEventLoop::exec(QFlags) () from 
/usr/lib/libQt5Core.so.5
#5  0x7f123c124569 in QThread::exec() () from /usr/lib/libQt5Core.so.5
#6  0x7f123d21dba6 in ?? () from /usr/lib/libQt5DBus.so.5
#7  0x7f123c12596c in ?? () from /usr/lib/libQt5Core.so.5
#8  0x7f123b0a5a9d in start_thread () from /usr/lib/libpthread.so.0
#9  0x7f123bc70b23 in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f123713bcc0 (LWP 17330)):
#0  0x7f123b0a6f6d in __pthread_timedjoin_ex () from 
/usr/lib/libpthread.so.0
#1  0x7f122de63a61 in ?? () from /usr/lib/dri/i965_dri.so
#2  0x7f122de642f9 in ?? () from /usr/lib/dri/i965_dri.so
#3  0x7f122de5f72a in ?? () from /usr/lib/dri/i965_dri.so
#4  0x7f122dde9334 in ?? () from /usr/lib/dri/i965_dri.so
#5  0x7f122de5b3bf in ?? () from /usr/lib/dri/i965_dri.so
#6  0x7f122ecee07c in ?? () from /usr/lib/libGLX_mesa.so.0
#7  0x7f122ecda822 in ?? () from /usr/lib/libGLX_mesa.so.0
#8  0x7f122ecda8a9 in ?? () from /usr/lib/libGLX_mesa.so.0
#9  0x7f122ecda9fe in ?? () from /usr/lib/libGLX_mesa.so.0
#10 0x7f123b3543e2 in XCloseDisplay () from /usr/lib/libX11.so.6
#11 0x7f1236c8af52 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#12 0x7f1236c6011a in QXcbConnection::~QXcbConnection() () from 
/usr/lib/libQt5XcbQpa.so.5
#13 0x7f1236c613d7 in QXcbIntegration::~QXcbIntegration() () from 
/usr/lib/libQt5XcbQpa.so.5
#14 0x7f1236c614da in QXcbIntegration::~QXcbIntegration() () from 
/usr/lib/libQt5XcbQpa.so.5
#15 0x7f123c6abed9 in QGuiApplicationPrivate::~QGuiApplicationPrivate() 
() from /usr/lib/libQt5Gui.so.5
#16 0x7f123ccaa6fa in QApplicationPrivate::~QApplicationPrivate() () 
from /usr/lib/libQt5Widgets.so.5
#17 0x7f123c31386f in QObject::~QObject() () from 
/usr/lib/libQt5Core.so.5
#18 0x7f123c2e42b0 in QCoreApplication::~QCoreApplication() () from 
/usr/lib/libQt5Core.so.5
#19 0x7f123ccac842 in QApplication::~QApplication() () from 
/usr/lib/libQt5Widgets.so.5
#20 0x562218057e23 in main ()
  
  Backtrace of KDevelop:
  
(gdb) info thread
  Id   Target Id   Frame 
* 1Thread 0x7fb1d60d8440 (LWP 16624) "kdevelop"
0x7fb1ea770c21 in poll () from /usr/lib/libc.so.6
  2Thread 0x7fb1d531f700 (LWP 16625) "QXcbEventQueue"  
0x7fb1ea770c21 in poll () from /usr/lib/libc.so.6
  3Thread 0x7fb1cf060700 (LWP 16626) "kdevelo:disk$0"  
0x7fb1e99cdafc in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /usr/lib/libpthread.so.0
  4Thread 0x7fb1cd4ae700 (LWP 16627) "QDBusConnection" 
0x7fb1eefc64f9 in _dl_update_slotinfo () from /lib64/ld-linux-x86-64.so.2
  5Thread 0x7fb1c4c8d700 (LWP 16629) "QThread" 
0x7fb1ea770c21 in poll () from /usr/lib/libc.so.6
  6Thread 0x7fb1b784f700 (LWP 16642) "kdev

D18245: [DrKonqi] Create QApplication in a scope to fix possible deadlock

2019-02-22 Thread Christoph Roick
croick added a subscriber: ossi.
croick added a comment.


  I dug in the history of KCrash and realized, that closing all the file 
descriptors was introduced (7bbf112e5e97d40b9a4f9fdd167b064a1019843b 
) to 
make the X11 window disappear.
  Later @ossi added the X11 FD explicitly 
(7ac326ddb05eec296fdfbebd86d0d1320e579063 
), 
but kept closing the FDs by default.
  
  I think keeping the FDs should be the default. However, the only program I 
found that is explicitly setting `KCrash::CrashFlag::KeepFDs` is #falkon 
, the rest seems to be fine without 
(except me with KDevelop).

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D18245

To: croick, sitter, #kdevelop
Cc: ossi, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D18245: [DrKonqi] Create QApplication in a scope to fix possible deadlock

2019-02-24 Thread Christoph Roick
croick added a comment.


  The problem does not seem to be specific to DrKonqi. Once DrKonqi and 
KDevelop are stuck, any Qt program may have problems starting or quitting. A 
minimal example
  
#include 
#include 

int main(int argc, char **argv)
{
QApplication app(argc, argv);
QWidget().show();

return 0;
}
  
  gets stuck as well (sometimes starting like below, sometimes only when 
quitting), as long as KDevelop was not SIGSTOPped.
  
(gdb) info thread
  Id   Target Id  Frame 
* 1Thread 0x736a2f80 (LWP 21781) "testqt" 
0x76a116eb in brk () from /usr/lib/libc.so.6
  2Thread 0x72346700 (LWP 21785) "QXcbEventQueue" 
0x76a0fc21 in poll () from /usr/lib/libc.so.6
  3Thread 0x7fffe9642700 (LWP 21786) "testqt:disk$0"  
0x7690bafc in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /usr/lib/libpthread.so.0
(gdb) thread apply all bt

Thread 3 (Thread 0x7fffe9642700 (LWP 21786)):
#0  0x7690bafc in pthread_cond_wait@@GLIBC_2.3.2 () from 
/usr/lib/libpthread.so.0
#1  0x7fffe9c5ec94 in ?? () from /usr/lib/dri/i965_dri.so
#2  0x7fffe9c5e9b8 in ?? () from /usr/lib/dri/i965_dri.so
#3  0x76905a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x76a1ab23 in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x72346700 (LWP 21785)):
#0  0x76a0fc21 in poll () from /usr/lib/libc.so.6
#1  0x738f5630 in ?? () from /usr/lib/libxcb.so.1
#2  0x738f72db in xcb_wait_for_event () from /usr/lib/libxcb.so.1
#3  0x731f0949 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#4  0x76ed196c in ?? () from /usr/lib/libQt5Core.so.5
#5  0x76905a9d in start_thread () from /usr/lib/libpthread.so.0
#6  0x76a1ab23 in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x736a2f80 (LWP 21781)):
#0  0x76a116eb in brk () from /usr/lib/libc.so.6
#1  0x76a117d1 in sbrk () from /usr/lib/libc.so.6
#2  0x769a63ed in __default_morecore () from /usr/lib/libc.so.6
#3  0x769a2656 in sysmalloc () from /usr/lib/libc.so.6
#4  0x769a3716 in _int_malloc () from /usr/lib/libc.so.6
#5  0x769a4ada in malloc () from /usr/lib/libc.so.6
#6  0x7fffeaaf3377 in ?? () from /usr/lib/libGLX_mesa.so.0
#7  0x7fffeaafba7b in ?? () from /usr/lib/libGLX_mesa.so.0
#8  0x7fffeaae7d09 in ?? () from /usr/lib/libGLX_mesa.so.0
#9  0x7fffeaae3335 in ?? () from /usr/lib/libGLX_mesa.so.0
#10 0x7fffeaae3d4d in ?? () from /usr/lib/libGLX_mesa.so.0
#11 0x73321f5f in ?? () from 
/usr/lib/qt/plugins/xcbglintegrations/libqxcb-glx-integration.so
#12 0x731de99a in QXcbWindow::create() () from 
/usr/lib/libQt5XcbQpa.so.5
#13 0x731c9880 in QXcbIntegration::createPlatformWindow(QWindow*) 
const () from /usr/lib/libQt5XcbQpa.so.5
#14 0x7746a9d8 in QWindowPrivate::create(bool, unsigned long long) 
() from /usr/lib/libQt5Gui.so.5
#15 0x77a888d8 in QWidgetPrivate::create_sys(unsigned long long, 
bool, bool) () from /usr/lib/libQt5Widgets.so.5
#16 0x77a88f30 in QWidget::create(unsigned long long, bool, bool) 
() from /usr/lib/libQt5Widgets.so.5
#17 0x77a96596 in QWidget::setVisible(bool) () from 
/usr/lib/libQt5Widgets.so.5
#18 0x5204 in main (argc=1, argv=0x7fffe578) at testqt.cpp:7
  
  
  
  > The commit message is nonsense. This problem has nothing to do with D-Bus. 
That's a red herring, because the QDBusConnection thread only exits after all 
open QDBusConnections close (including QDBusMessages holding them). The problem 
appears to be the XCB thread, stuck waiting for something, somehow, inside 
XCloseDisplay.
  
  So truly no DBus in this case. It really seems to be a problem with the 
graphics library, which could be the reason why this problem does not seem to 
be common.
  
  ---
  
  > The patch is innocuous. I don't see *how* it can solve anything, though, 
because I don;'t know what DrKonqu::cleanup does.
  
  One of the things that `DrKonqi::cleanup()` does is sending SIGCONT to the 
debuggee to finish it. I just checked: Not sending the signal makes DrKonqi 
quit entirely.
  I will add a comment in the code and change the commit message. The patch 
still remains a workaround though.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D18245

To: croick, sitter, #kdevelop
Cc: dfaure, thiago, ossi, plasma-devel, jraleigh, GB_2, ragreen, Pitel, 
ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D18245: [DrKonqi] Create QApplication in a scope to fix possible deadlock

2019-02-24 Thread Christoph Roick
croick added a comment.


  In D18245#418656 , @thiago wrote:
  
  > This last backtrace does not show anything stuck. Thread 1 was actively 
running, in fact (it's inside of malloc).
  >
  > Also note your testcase has no window, since the widget is destroyed before 
app.exec().
  
  
  But it actually is stuck. That's the backtrace after CTRL+C in gdb of the 
stuck example and sending SIGSTOP to KDevelop.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D18245

To: croick, sitter, #kdevelop
Cc: dfaure, thiago, ossi, plasma-devel, jraleigh, GB_2, ragreen, Pitel, 
ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D18245: [DrKonqi] Create QApplication in a scope to fix possible deadlock

2019-02-24 Thread Christoph Roick
croick added a comment.


  A backtrace where it gets stuck in the destructor of QApplication.
  
(gdb) info thread
  Id   Target Id  Frame 
* 1Thread 0x736a2f80 (LWP 6015) "testqt"  
0x76906f6d in __pthread_timedjoin_ex () from /usr/lib/libpthread.so.0
  3Thread 0x7fffe9642700 (LWP 6026) "testqt:disk$0"   
0x7690bafc in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /usr/lib/libpthread.so.0
  4Thread 0x7fffe8e41700 (LWP 6027) "QDBusConnection" 
0x76a0fc21 in poll () from /usr/lib/libc.so.6
(gdb) thread apply all bt

Thread 4 (Thread 0x7fffe8e41700 (LWP 6027)):
#0  0x76a0fc21 in poll () from /usr/lib/libc.so.6
#1  0x75e81540 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x75e8162e in g_main_context_iteration () from 
/usr/lib/libglib-2.0.so.0
#3  0x770e3ce9 in 
QEventDispatcherGlib::processEvents(QFlags) () 
from /usr/lib/libQt5Core.so.5
#4  0x7708cb2c in 
QEventLoop::exec(QFlags) () from 
/usr/lib/libQt5Core.so.5
#5  0x76ed0569 in QThread::exec() () from /usr/lib/libQt5Core.so.5
#6  0x73108ba6 in ?? () from /usr/lib/libQt5DBus.so.5
#7  0x76ed196c in ?? () from /usr/lib/libQt5Core.so.5
#8  0x76905a9d in start_thread () from /usr/lib/libpthread.so.0
#9  0x76a1ab23 in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7fffe9642700 (LWP 6026)):
#0  0x7690bafc in pthread_cond_wait@@GLIBC_2.3.2 () from 
/usr/lib/libpthread.so.0
#1  0x7fffe9c5ec94 in ?? () from /usr/lib/dri/i965_dri.so
#2  0x7fffe9c5e9b8 in ?? () from /usr/lib/dri/i965_dri.so
#3  0x76905a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x76a1ab23 in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x736a2f80 (LWP 6015)):
#0  0x76906f6d in __pthread_timedjoin_ex () from 
/usr/lib/libpthread.so.0
#1  0x7fffe9c5ea71 in ?? () from /usr/lib/dri/i965_dri.so
#2  0x7fffe9c5f309 in ?? () from /usr/lib/dri/i965_dri.so
#3  0x7fffe9c5a73a in ?? () from /usr/lib/dri/i965_dri.so
#4  0x7fffe9be4344 in ?? () from /usr/lib/dri/i965_dri.so
#5  0x7fffe9c563cf in ?? () from /usr/lib/dri/i965_dri.so
#6  0x7fffeaafb07c in ?? () from /usr/lib/libGLX_mesa.so.0
#7  0x7fffeaae7822 in ?? () from /usr/lib/libGLX_mesa.so.0
#8  0x7fffeaae78a9 in ?? () from /usr/lib/libGLX_mesa.so.0
#9  0x7fffeaae79fe in ?? () from /usr/lib/libGLX_mesa.so.0
#10 0x75cc03e2 in XCloseDisplay () from /usr/lib/libX11.so.6
#11 0x731f1f52 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#12 0x731c711a in QXcbConnection::~QXcbConnection() () from 
/usr/lib/libQt5XcbQpa.so.5
#13 0x731c83d7 in QXcbIntegration::~QXcbIntegration() () from 
/usr/lib/libQt5XcbQpa.so.5
#14 0x731c84da in QXcbIntegration::~QXcbIntegration() () from 
/usr/lib/libQt5XcbQpa.so.5
#15 0x77455ed9 in QGuiApplicationPrivate::~QGuiApplicationPrivate() 
() from /usr/lib/libQt5Gui.so.5
#16 0x77a546fa in QApplicationPrivate::~QApplicationPrivate() () 
from /usr/lib/libQt5Widgets.so.5
#17 0x770bf86f in QObject::~QObject() () from 
/usr/lib/libQt5Core.so.5
#18 0x770902b0 in QCoreApplication::~QCoreApplication() () from 
/usr/lib/libQt5Core.so.5
#19 0x77a56842 in QApplication::~QApplication() () from 
/usr/lib/libQt5Widgets.so.5
#20 0x5221 in main (argc=1, argv=0x7fffe578) at testqt.cpp:6

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D18245

To: croick, sitter, #kdevelop
Cc: dfaure, thiago, ossi, plasma-devel, jraleigh, GB_2, ragreen, Pitel, 
ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D18245: Create QApplication in a scope to work around possible deadlock

2019-02-25 Thread Christoph Roick
croick updated this revision to Diff 52524.
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".
croick edited the summary of this revision.
croick added a comment.


  - add comment

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18245?vs=49450&id=52524

BRANCH
  scopedqapp

REVISION DETAIL
  https://phabricator.kde.org/D18245

AFFECTED FILES
  src/main.cpp

To: croick, sitter, #kdevelop
Cc: dfaure, thiago, ossi, plasma-devel, jraleigh, GB_2, ragreen, Pitel, 
ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D18245: Create QApplication in a scope to work around possible deadlock

2019-02-25 Thread Christoph Roick
croick added a comment.


  In D18245#418708 , @thiago wrote:
  
  > I repeat: there's no indication in the backtrace that it is stuck. What's 
your evidence that it is? You wrote an application that shows nothing and never 
exits. Now it showed nothing and didn't exit. That's not stuck, that's the 
expected behaviour.
  
  
  It normally does exit, I never call `app.exec()`. It does not exit if we have 
the deadlock situation between KDevelop and DrKonqi however. But it doesn't 
matter, I found glxgears is a better example for 
https://bugs.freedesktop.org/show_bug.cgi?id=109777.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D18245

To: croick, sitter, #kdevelop
Cc: dfaure, thiago, ossi, plasma-devel, jraleigh, GB_2, ragreen, Pitel, 
ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D9892: cmake: Use the official CMake variable for building as a static plugin.

2018-01-21 Thread Christoph Roick
croick added inline comments.

INLINE COMMENTS

> CMakeLists.txt:69
> +if (PLASMA_ENABLED)
> +install(DIRECTORY styles/Plasma DESTINATION 
> ${KDE_INSTALL_QMLDIR}/org/kde/kirigami.2/styles)
> +endif()

When trying to install it using kdesrc-build, it complains about not finding 
the specified directory.  I assume its supposed to be available?

REPOSITORY
  R169 Kirigami

REVISION DETAIL
  https://phabricator.kde.org/D9892

To: mart, #kirigami, lepagevalleeemmanuel
Cc: croick, apol, plasma-devel, davidedmundson, mart, hein


D10195: DrKonqi: Enable DBus-Interface for debugging with KDevelop

2018-01-30 Thread Christoph Roick
croick edited the test plan for this revision.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D10195

To: croick, #kdevelop, #plasma_workspaces
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D10195: DrKonqi: Enable DBus-Interface for debugging with KDevelop

2018-01-30 Thread Christoph Roick
croick created this revision.
croick added a reviewer: KDevelop.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
croick requested review of this revision.

REVISION SUMMARY
  - register a DBus service to make it work at all
  - service name unique by debuggee pid
  - switch hierarchy of adaptor and launcher
- a single adaptor keeps track of multiple launchers
- the debugger should provide a unique identification
  - only works with a corresponding patch in KDevelop

TEST PLAN
  - apply KDevelop patch and start a new KDevelop session "test"
  - enable the DrKonqi debug button
  - enable ptrace
  - start a kde program (kate for instance)
  - start "drkonqi --dialog --appname kate --pid "
  - check Debug options: gdb, KDevelop (GDB) - test, KDevelop (LLDB) - test
  - start another KDevelop session "test2" -> additional debug options are now 
available
  - end session "test2" -> additional options vanished again
  - select "KDevelop (GDB) - test" -> KDevelop raises, DrKonqi buttons are 
disabled
  - use the GDB console to detach the process and end GDB
  - DrKonqi buttons are reenabled again

REPOSITORY
  R871 DrKonqi

BRANCH
  kdevelopdbus

REVISION DETAIL
  https://phabricator.kde.org/D10195

AFFECTED FILES
  src/README
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/debuggermanager.cpp
  src/debuggermanager.h

To: croick, #kdevelop
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D10195: DrKonqi: Enable DBus-Interface for debugging with KDevelop

2018-01-30 Thread Christoph Roick
croick added a reviewer: Plasma: Workspaces.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D10195

To: croick, #kdevelop, #plasma_workspaces
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D10195: DrKonqi: Enable DBus-Interface for debugging with KDevelop

2018-03-06 Thread Christoph Roick
This revision was automatically updated to reflect the committed changes.
Closed by commit R871:2c0f0449a560: DrKonqi: Enable DBus-Interface for 
debugging with KDevelop (authored by croick).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D10195?vs=26227&id=28877#toc

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10195?vs=26227&id=28877

REVISION DETAIL
  https://phabricator.kde.org/D10195

AFFECTED FILES
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/debuggermanager.cpp
  src/debuggermanager.h

To: croick, #kdevelop, #plasma_workspaces, mwolff
Cc: mwolff, ngraham, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11234: [DrKonqi] Show debug button when KDevelop session is running

2018-03-11 Thread Christoph Roick
croick created this revision.
croick added reviewers: Plasma: Workspaces, apol, mwolff.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
croick requested review of this revision.

REVISION SUMMARY
  - independently of the config setting in drkonqirc propose debugging with 
KDevelop if a session is available
  - default debugger is only displayed if ShowDebugButton=true in [DrKonqi]
  - button is the first action button to be displayed
  - fix adding/removing of the button to the button box

TEST PLAN
  - set ShowDebugButton=false, have no KDevelop session running
  - force a crash (using src/tests/crashtest for instance)
  - DrKonqi shows no debug button
  - start a KDevelop session
  - the button appears with the KDevelop session selectable
  - quit DrKonqi, set ShowDebugButton=true
  - crash again, the button now always is visible, including the default 
debugger as a selection

REPOSITORY
  R871 DrKonqi

BRANCH
  nicebutton

REVISION DETAIL
  https://phabricator.kde.org/D11234

AFFECTED FILES
  src/drkonqidialog.cpp

To: croick, #plasma_workspaces, apol, mwolff
Cc: plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2018-03-11 Thread Christoph Roick
croick created this revision.
croick added reviewers: Plasma: Workspaces, Frameworks.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
croick requested review of this revision.

REVISION SUMMARY
  - In Linux recent kernels only allow attaching of processes to a debugger, if
- the right to attach to processes is enabled system-wide
- the debugger is a child process of the debuggee
- or the debuggee grants access by a call to prctl(PR_SET_PTRACER, 
debugger_pid, 0, 0, 0);
  - DrKonqi cannot do this directly, so it will ask the debuggee to do so by a 
socket connection.
  - When the debugger has finished, the access is requested back to DrKonqi to 
allow internal backtraces again.

TEST PLAN
  - try to attach the debugged process to gdb or KDevelop by using the debug 
button: operation will not be permitted
  - apply corresponding patches to KCrash and DrKonqi
  - the process can now be debugged
  - after detaching the process again, a backtrace can be created using the 
DrKonqi dialog as usual

REPOSITORY
  R871 DrKonqi

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/queryptrace.cpp
  src/queryptrace.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks
Cc: plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2018-03-11 Thread Christoph Roick
croick updated this revision to Diff 29249.
croick added a comment.


  - remove superfluous include

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=29247&id=29249

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/queryptrace.cpp
  src/queryptrace.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks
Cc: plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2018-03-11 Thread Christoph Roick
croick added inline comments.

INLINE COMMENTS

> crashtest.cpp:138
>  
> -  //start drkonqi directly so that drkonqi's output goes to the console
> -  KCrash::CrashFlags flags = KCrash::AlwaysDirectly;

That reasoning does not seem to be true. The output can still be read when 
started "normally".

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D11235

To: croick, #plasma_workspaces, #frameworks
Cc: plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D11234: [DrKonqi] Show debug button when KDevelop session is running

2018-03-29 Thread Christoph Roick
croick added a comment.


  bump

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D11234

To: croick, #plasma_workspaces, apol, mwolff
Cc: plasma-devel, ragreen, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2018-03-30 Thread Christoph Roick
croick updated this revision to Diff 30979.
croick added a comment.


  - update socket file location

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=29249&id=30979

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/queryptrace.cpp
  src/queryptrace.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks
Cc: plasma-devel, ragreen, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D11234: [DrKonqi] Show debug button when KDevelop session is running

2018-04-27 Thread Christoph Roick
croick added a comment.


  I know that DrKonqi hardly pops up these days. But still, if this button 
became more popular, then D11235  and 
D11236  might get some attention as well...

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D11234

To: croick, #plasma_workspaces, apol, mwolff
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2018-05-22 Thread Christoph Roick
croick updated this revision to Diff 34670.
croick added a comment.


  - add license text
  - use `QDir::tempPath()`
  - ifdefs to definition

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=30979&id=34670

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/queryptrace.cpp
  src/queryptrace.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks
Cc: maximilianocuria, adridg, plasma-devel, ragreen, Pitel, ZrenBot, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2018-05-22 Thread Christoph Roick
croick marked 6 inline comments as done.
croick added a comment.


  Thank you for your comments, totally forgot about licensing.

INLINE COMMENTS

> maximilianocuria wrote in queryptrace.cpp:26
> Please honour TMPDIR or, even better, use QTemporaryDir (this will also make 
> the generated path unpredictable), and create the socket inside.

QTemporaryDir will not work, since the location is set in KCrash.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D11235

To: croick, #plasma_workspaces, #frameworks
Cc: maximilianocuria, adridg, plasma-devel, ragreen, Pitel, ZrenBot, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D11235: [DrKonqi] Request change of ptrace scope from KCrash

2018-05-22 Thread Christoph Roick
croick updated this revision to Diff 34671.
croick marked an inline comment as done.
croick added a comment.


  - check size of socket path

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11235?vs=34670&id=34671

BRANCH
  ptracer

REVISION DETAIL
  https://phabricator.kde.org/D11235

AFFECTED FILES
  src/CMakeLists.txt
  src/debuggerlaunchers.cpp
  src/debuggerlaunchers.h
  src/queryptrace.cpp
  src/queryptrace.h
  src/tests/crashtest/crashtest.cpp

To: croick, #plasma_workspaces, #frameworks
Cc: maximilianocuria, adridg, plasma-devel, ragreen, Pitel, ZrenBot, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D11234: [DrKonqi] Show debug button when KDevelop session is running

2019-06-08 Thread Christoph Roick
croick updated this revision to Diff 59394.
croick added a comment.


  Rebase to current master

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11234?vs=29245&id=59394

BRANCH
  nicebutton

REVISION DETAIL
  https://phabricator.kde.org/D11234

AFFECTED FILES
  src/drkonqidialog.cpp

To: croick, #plasma_workspaces, apol, mwolff, #kdevelop
Cc: plasma-devel, LeGast00n, ericadams, jraleigh, GB_2, ragreen, Pitel, 
ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, 
apol, mart


D18245: Create QApplication in a scope to work around possible deadlock

2019-06-08 Thread Christoph Roick
croick updated this revision to Diff 59395.
croick added a comment.


  Rebase to current master

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18245?vs=52524&id=59395

BRANCH
  scopedqapp

REVISION DETAIL
  https://phabricator.kde.org/D18245

AFFECTED FILES
  src/main.cpp

To: croick, sitter, #kdevelop
Cc: dfaure, thiago, ossi, plasma-devel, LeGast00n, ericadams, jraleigh, GB_2, 
ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D11234: [DrKonqi] Show debug button when KDevelop session is running

2019-06-11 Thread Christoph Roick
croick updated this revision to Diff 59627.
croick marked 5 inline comments as done.
croick added a comment.


  - Fix code style.
  - Save state of the debug button in a member variable.
  - Resize the dialog after inserting/removing the debug button.

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11234?vs=59394&id=59627

BRANCH
  nicebutton

REVISION DETAIL
  https://phabricator.kde.org/D11234

AFFECTED FILES
  src/drkonqidialog.cpp
  src/drkonqidialog.h

To: croick, #plasma_workspaces, apol, mwolff, #kdevelop, sitter
Cc: plasma-devel, LeGast00n, ericadams, jraleigh, GB_2, ragreen, Pitel, 
ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, 
apol, mart


D11234: [DrKonqi] Show debug button when KDevelop session is running

2019-06-11 Thread Christoph Roick
croick added a comment.


  Thanks for looking into this :D
  
  Past self obviously still had to read the style guide and tried not to change 
header files.
  I took your commit cc640cea 
 as 
an example to resize the dialog after inserting or deleting the button.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D11234

To: croick, #plasma_workspaces, apol, mwolff, #kdevelop, sitter
Cc: plasma-devel, LeGast00n, ericadams, jraleigh, GB_2, ragreen, Pitel, 
ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, 
apol, mart


D11234: [DrKonqi] Show debug button when KDevelop session is running

2019-07-08 Thread Christoph Roick
croick updated this revision to Diff 61377.
croick added a comment.


  - more style fixes
  - do not adjustSize after adding the button, since that is redundant now

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11234?vs=59627&id=61377

BRANCH
  nicebutton

REVISION DETAIL
  https://phabricator.kde.org/D11234

AFFECTED FILES
  src/drkonqidialog.cpp
  src/drkonqidialog.h

To: croick, #plasma_workspaces, apol, mwolff, #kdevelop, sitter
Cc: kossebau, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, 
Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D11234: [DrKonqi] Show debug button when KDevelop session is running

2019-07-08 Thread Christoph Roick
croick marked 2 inline comments as done.
croick added a comment.


  In D11234#492200 , @sitter wrote:
  
  > Could you explain your thinking behind the adjustSize call please? The way 
I see it the window should scale up as necessary if the size hints are properly 
set (which they should be on master).
  
  
  That's true, but only since your latest commits. Before, the text of the 
report button was cut off (in german for example) once the debug button got 
activated. I removed the call again.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D11234

To: croick, #plasma_workspaces, apol, mwolff, #kdevelop, sitter
Cc: kossebau, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, 
Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D11234: [DrKonqi] Show debug button when KDevelop session is running

2019-07-09 Thread Christoph Roick
This revision was automatically updated to reflect the committed changes.
Closed by commit R871:95b6b8b613c2: Show debug button when KDevelop session is 
running (authored by croick).

REPOSITORY
  R871 DrKonqi

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11234?vs=61377&id=61456

REVISION DETAIL
  https://phabricator.kde.org/D11234

AFFECTED FILES
  src/drkonqidialog.cpp
  src/drkonqidialog.h

To: croick, #plasma_workspaces, apol, mwolff, #kdevelop, sitter
Cc: kossebau, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, 
Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D11234: [DrKonqi] Show debug button when KDevelop session is running

2019-07-09 Thread Christoph Roick
croick added a comment.


  Thanks for your review. It was the last in a series of patches and I'll try 
to advertise the whole "Debug your KDE application with KDevelop"-feature 
somewhere.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D11234

To: croick, #plasma_workspaces, apol, mwolff, #kdevelop, sitter
Cc: kossebau, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, 
Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D18245: Create QApplication in a scope to work around possible deadlock

2019-07-09 Thread Christoph Roick
croick abandoned this revision.
croick added a comment.


  I can no longer reproduce the deadlock, so I'll abandon this.

REPOSITORY
  R871 DrKonqi

REVISION DETAIL
  https://phabricator.kde.org/D18245

To: croick, sitter, #kdevelop
Cc: dfaure, thiago, ossi, plasma-devel, LeGast00n, jraleigh, fbampaloukas, 
GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart