[Heaptrack] [Bug 378494] Debugee terminates on any signal

2017-04-07 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=378494 Milian Wolff changed: What|Removed |Added Status|CONFIRMED |RESOLVED Latest Commit|

[Heaptrack] [Bug 378494] Debugee terminates on any signal

2017-04-07 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=378494 --- Comment #9 from Milian Wolff --- heaptrack already depends on pthread (for the timer thread). I also asked a colleague and he confirmed this is safe to do. I'll push it - thanks for the report and helpful test case! -- You are receiving this mail

[Heaptrack] [Bug 378494] Debugee terminates on any signal

2017-04-07 Thread Maksim Golov
https://bugs.kde.org/show_bug.cgi?id=378494 --- Comment #8 from Maksim Golov --- Confirm that it works for my case. One thing to note, the proposed patch introduces a dependency on pthreads, which is probably quite safe in practice, and I'd expect CMake can probe for pthreads being available. I

[Heaptrack] [Bug 378494] Debugee terminates on any signal

2017-04-07 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=378494 --- Comment #7 from Milian Wolff --- Reading up a bit, I think this patch should actually quite safe to do. Can you confirm, considering you seem to have more knowledge around this idiom? If so, then I'd push it to master in the hope that it's not break

[Heaptrack] [Bug 378494] Debugee terminates on any signal

2017-04-07 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=378494 --- Comment #6 from Milian Wolff --- Indeed, that work-arounds this issue: diff --git a/src/track/libheaptrack.cpp b/src/track/libheaptrack.cpp index b21b00b..6df2101 100644 --- a/src/track/libheaptrack.cpp +++ b/src/track/libheaptrack.cpp @@ -30,6 +30

[Heaptrack] [Bug 378494] Debugee terminates on any signal

2017-04-07 Thread Maksim Golov
https://bugs.kde.org/show_bug.cgi?id=378494 --- Comment #5 from Maksim Golov --- What the code in the reproduce does is to ensure that all signals are handled by a single dedicated thread only, and all other threads have them disabled. This ensures that the signals are handled in well-defined man

[Heaptrack] [Bug 378494] Debugee terminates on any signal

2017-04-07 Thread Maksim Golov
https://bugs.kde.org/show_bug.cgi?id=378494 --- Comment #4 from Maksim Golov --- I was not aware of timer thread, must have missed it in my reading of heaptrack code. Likely it has the signals enabled and gets to handle the signal instead of the signal thread. Not sure how this can be addressed,

[Heaptrack] [Bug 378494] Debugee terminates on any signal

2017-04-07 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=378494 --- Comment #3 from Milian Wolff --- ah, I can reproduce the issue with your test code even without heaptrack, when I slightly modify it: at the very start of main, add: auto t = std::thread([]() { while(true) {std::this_thread::sleep_for(std::chrono:

[Heaptrack] [Bug 378494] Debugee terminates on any signal

2017-04-07 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=378494 --- Comment #2 from Milian Wolff --- What's odd is that it does not happen when I disable the timer thread. Stracing the signals syscalls also doesn't reveal anything obvious. I still have no clue what's going on here. -- You are receiving this mail b

[Heaptrack] [Bug 378494] Debugee terminates on any signal

2017-04-07 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=378494 Milian Wolff changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED