Created attachment 396262 [details] emerge --info dev-util/geany geany starts normally. geany-plugins are enabled use "debugger". After trying to start the debugger on the target, geany segfaults at Program received signal SIGSEGV, Segmentation fault. 0x00007ffff50d6393 in __strchr_sse2 () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff50d6393 in __strchr_sse2 () from /lib64/libc.so.6 #1 0x00007fffec53d10a in on_read_from_gdb () from /usr/lib64/geany/debugger.so #2 0x00007ffff5f197a5 in g_io_unix_dispatch () from /usr/lib64/libglib-2.0.so.0 #3 0x00007ffff5ec47b9 in g_main_dispatch () from /usr/lib64/libglib-2.0.so.0 #4 0x00007ffff5ec5527 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 #5 0x00007ffff5ec5717 in g_main_context_iterate () from /usr/lib64/libglib-2.0.so.0 #6 0x00007ffff5ec5b44 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0 #7 0x00007ffff783f063 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0 #8 0x00000000004be497 in main () So i think this bug is different than #535876
Created attachment 396264 [details] emerge --info dev-util/geany-plugins
Created attachment 396266 [details] xz compressed core dump geany file 1/3
Created attachment 396268 [details] xz compressed core dump geany file 2/3
Created attachment 396270 [details] xz compressed core dump geany file 3/3
recreate the xz file cat core-dump.tar.xz.aa core-dump.tar.xz.ab core-dump.tar.xz.ac > core-dump.tar.xz tar -xJf core-dump.tar.xz
Here is an additional backtrace with debug symbols on Program received signal SIGSEGV, Segmentation fault. 0x00007ffff50d6393 in __strchr_sse2 () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff50d6393 in __strchr_sse2 () from /lib64/libc.so.6 #1 0x00007fffec53d10a in on_read_from_gdb (src=0xe9f780, cond=G_IO_IN, data=0x0) at /var/tmp/portage/dev-util/geany-plugins-1.23/work/geany-plugins-1.23/debugger/src/dbm_gdb.c:585 #2 0x00007ffff5f197a5 in g_io_unix_dispatch () from /usr/lib64/libglib-2.0.so.0 #3 0x00007ffff5ec47b9 in g_main_dispatch () from /usr/lib64/libglib-2.0.so.0 #4 0x00007ffff5ec5527 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 #5 0x00007ffff5ec5717 in g_main_context_iterate () from /usr/lib64/libglib-2.0.so.0 #6 0x00007ffff5ec5b44 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0 #7 0x00007ffff783f063 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0 #8 0x00000000004be497 in main (argc=1, argv=0x7fffffffe1c8) at main.c:1216
In line /var/tmp/portage/dev-util/geany-plugins-1.23/work/geany-plugins-1.23/debugger/src/dbm_gdb.c:585 (gdb) fr 1 #1 0x00007fffec53d10a in on_read_from_gdb (src=0xe9f780, cond=G_IO_IN, data=0x0) at /var/tmp/portage/dev-util/geany-plugins-1.23/work/geany-plugins-1.23/debugger/src/dbm_gdb.c:585 585 *(strchr(thread_id, '\"')) = '\0'; (gdb) p/x thread_id $1 = 0x0 print line $2 = (gchar *) 0xd0bdf0 "^error,msg=\"Invalid argument: &\"" Obviously strstr did return 0. The documentation of strstr tells http://www.cplusplus.com/reference/cstring/strchr/ Return Value A pointer to the first occurrence of character in str. --> If the character is not found, the function returns a null pointer. From my understanding of that source, maybe the gdb version in gentoo behaves different and doesnt accept a needed argument. From the error message, maybe gdb refuses to start as a sub process with "&" ...
Here is the surrounding code segement else if (g_str_has_prefix (line, "^error")) { GList *lines, *iter; char *msg; /* removing read callback (will pulling all output left manually) */ g_source_remove(gdb_id_out); /* set debugger stopped if is running */ if (DBS_STOPPED != debug_get_state()) { gchar *thread_id = strstr(line + strlen(line) + 1,"thread-id=\""); -----> SEGFAULT HERE *(strchr(thread_id, '\"')) = '\0'; dbg_cbs->set_stopped(atoi(thread_id)); }
I guess the source of the error must be somewhere in fuction static gboolean run() (line 716). It queues up the arguments for gdb but i cant figure out what argument is the reason. But on the other hand, the not checked pointer in line 585 is a dealbreaker too.
I just build geany from git and the plugins. These exact crash happens at origin git://github.com/geany/geany commit 308041da8d0f7ee938a075cae5d84d90da91c5eb Merge: 7b17db6 be2b280 Author: Colomban Wendling <ban@herbesfolles.org> origin git://github.com/geany/geany-plugins commit c12f0d33c96b6a6fd3a3dc7a876d45311d84a086 Author: Jiří Techet <techet@gmail.com> Date: Fri Feb 6 15:44:48 2015 +0100 too.
Comment on attachment 396266 [details] xz compressed core dump geany file 1/3 Core dumps are useful only when you have the exact same binaries. Please attach a full gdb backtrace instead.
Comment on attachment 396268 [details] xz compressed core dump geany file 2/3 Core dumps are useful only when you have the exact same binaries. Please attach a full gdb backtrace instead.
Comment on attachment 396270 [details] xz compressed core dump geany file 3/3 Core dumps are useful only when you have the exact same binaries. Please attach a full gdb backtrace instead.
Created attachment 401880 [details, diff] patches to fix two crashes in the debugger plugin The first patch fixes the crash "Attempt to unlock mutex that was not locked" crash when the debugger gets activated The second patch fixes the crash when the debugger starts (this bugreport). Source of the first patch: https://github.com/geany/geany-plugins/pull/156 Source of the second patch: https://bugs.launchpad.net/ubuntu/+source/geany-plugins/+bug/1354747
Created attachment 401882 [details, diff] patch 0001
Created attachment 401884 [details, diff] patch 0002
We should check if geany-plugins-1.25 has these bugs fixed and perhaps do a stable request right after the 30 days testing period is over. @reporter: Thank you very much for the detailed research and sorry it took so long for us to pick up on this bug.
This issue ( https://github.com/geany/geany-plugins/pull/174 ) and the other ( https://github.com/geany/geany-plugins/pull/156 ) both are parents of the tag 1.25, so these shoudl be fixed in 1.25. I might be worth pulling those patches out into 1.24-r2, though, since the -plugins package is so big there’s a chance 1.25 might break other things for people?
this should be fixed in 1.25 (now going to stable)