diff options
author | Tom Hacohen <tom@stosb.com> | 2013-11-05 15:50:23 +0000 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2013-11-05 15:54:15 +0000 |
commit | 18cbd6f59a9c004dc1fe15d17331b3e23e8a6582 (patch) | |
tree | fae8be359aa95c7245a5422685b7854b8b790f4f | |
parent | baadcee049213345b2ef9fc19a12b4d2645e4ab9 (diff) |
wsod: Fixed gdb hangs when generating backtraces.
After a long and hard battle with the gods of bugs I finally fixed
this stupid hang. I had to dig into the gdb source code, and gdb the
hell out of gdb, but it's now solved.
First of all, we should call gdb with -batch which exits automatically.
This however is not enough to fix it. The bug was that gdb was haning
while trying to set attributes on stdin because it was waiting for input.
This is obviously problematic when running in non-interactive mode, so
I had to pipe /dev/zero to stdin to fix it.
While at it, I also fixed the piping of stdout and stderr to be nicer.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/bin/e_sys_main.c | 3 |
3 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,6 @@ | |||
1 | 2013-11-05 Tom Hacohen | ||
2 | * wsod: Fixed gdb hangs when generating backtraces. | ||
3 | |||
1 | 2013-10-07 Mike Blumenkrantz | 4 | 2013-10-07 Mike Blumenkrantz |
2 | 5 | ||
3 | * removed "raise on focus" config option | 6 | * removed "raise on focus" config option |
@@ -234,3 +234,4 @@ Fixes: | |||
234 | * fixed bug where new files could not be created repeatedly | 234 | * fixed bug where new files could not be created repeatedly |
235 | * fixed filemanager spring window closing when dragging from desktop | 235 | * fixed filemanager spring window closing when dragging from desktop |
236 | * fixed catching XWindow closes during DND operations on those windows | 236 | * fixed catching XWindow closes during DND operations on those windows |
237 | * wsod: Fixed gdb hangs when generating backtraces. | ||
diff --git a/src/bin/e_sys_main.c b/src/bin/e_sys_main.c index b48f1c08b..edbb70da4 100644 --- a/src/bin/e_sys_main.c +++ b/src/bin/e_sys_main.c | |||
@@ -168,10 +168,11 @@ main(int argc, | |||
168 | 168 | ||
169 | snprintf(buffer, 4096, | 169 | snprintf(buffer, 4096, |
170 | "%s --pid=%i " | 170 | "%s --pid=%i " |
171 | "-batch " | ||
171 | "-ex 'set logging file %s' " | 172 | "-ex 'set logging file %s' " |
172 | "-ex 'set logging on' " | 173 | "-ex 'set logging on' " |
173 | "-ex 'thread apply all backtrace full' " | 174 | "-ex 'thread apply all backtrace full' " |
174 | "-ex detach -ex quit > /dev/null 2> /dev/null", | 175 | "-ex detach &> /dev/null < /dev/zero", |
175 | cmd, | 176 | cmd, |
176 | pid, | 177 | pid, |
177 | output ?: "e-output.txt"); | 178 | output ?: "e-output.txt"); |