I compiled the code with -g option, then I started the debugging session. I found how to replicate the crash. Basically it seem to be related with the focus. What I do to obtain the crash is:
1. killall fishd 2. gdb ./fish # fish compilated with -g option 3. run >> in gdb shell 4. start several (from 5 to 10) terminal emulators running fish and switch between them, you will notice than sometimes the focus is gained only after you press a key: For example if you type ls you will end up with just s on the prompt. 5. after some time fishd crashes. You will notice that the terminal emulators will start to disappear as soon as they get the focus. Here is the gdb backtrace: [code]Program received signal SIGSEGV, Segmentation fault. 0x00007ffff78b3dc8 in wcscmp () from /lib/libc.so.6 (gdb) backtrace #0 0x00007ffff78b3dc8 in wcscmp () from /lib/libc.so.6 #1 0x000000000042a377 in input_function_get_code ( name=0x1 <Address 0x1 out of bounds>) at input.c:880 #2 0x000000000042a6d0 in input_try_mapping () at input.c:439 #3 input_readch () at input.c:499 #4 0x0000000000425090 in reader_readline () at reader.c:2587 #5 0x0000000000426aba in read_i (fd=6876720, io=0x0) at reader.c:2463 #6 reader_read (fd=6876720, io=0x0) at reader.c:3329 #7 0x000000000043a80e in main (argc=1, argv=0x7fffffffe778) at fish.c:326[/code] Here is the valgrind backtrace: [code] ==433== Invalid read of size 8 ==433== at 0x42A6C4: input_readch (input.c:439) ==433== by 0x42508F: reader_readline (reader.c:2587) ==433== by 0x426AB9: reader_read (reader.c:2463) ==433== by 0x43A80D: main (fish.c:326) ==433== Address 0x55fa2a8 is 8 bytes inside a block of size 16 free'd ==433== at 0x4C23A18: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==433== by 0x42A557: input_mapping_erase (input.c:565) ==433== by 0x40C0EC: builtin_bind (builtin.c:564) ==433== by 0x4105A1: builtin_run (builtin.c:3837) ==433== by 0x417119: exec (exec.c:1376) ==433== by 0x420BE5: eval (parser.c:2376) ==433== by 0x4168CA: T.90 (exec.c:802) ==433== by 0x416FB7: exec (exec.c:1227) ==433== by 0x420BE5: eval (parser.c:2376) ==433== by 0x4168CA: T.90 (exec.c:802) ==433== by 0x416FB7: exec (exec.c:1227) ==433== by 0x420BE5: eval (parser.c:2376) ==433== ==433== Invalid read of size 8 ==433== at 0x42A6E1: input_readch (input.c:445) ==433== by 0x42508F: reader_readline (reader.c:2587) ==433== by 0x426AB9: reader_read (reader.c:2463) ==433== by 0x43A80D: main (fish.c:326) ==433== Address 0x55fa2a0 is 0 bytes inside a block of size 16 free'd ==433== at 0x4C23A18: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==433== by 0x42A557: input_mapping_erase (input.c:565) ==433== by 0x40C0EC: builtin_bind (builtin.c:564) ==433== by 0x4105A1: builtin_run (builtin.c:3837) ==433== by 0x417119: exec (exec.c:1376) ==433== by 0x420BE5: eval (parser.c:2376) ==433== by 0x4168CA: T.90 (exec.c:802) ==433== by 0x416FB7: exec (exec.c:1227) ==433== by 0x420BE5: eval (parser.c:2376) ==433== by 0x4168CA: T.90 (exec.c:802) ==433== by 0x416FB7: exec (exec.c:1227) ==433== by 0x420BE5: eval (parser.c:2376) ==433== ==433== Invalid read of size 8 ==433== at 0x42A5A1: input_exec_binding (input.c:379) ==433== by 0x42A7AF: input_readch (input.c:454) ==433== by 0x42508F: reader_readline (reader.c:2587) ==433== by 0x426AB9: reader_read (reader.c:2463) ==433== by 0x43A80D: main (fish.c:326) ==433== Address 0x55fa2a8 is 8 bytes inside a block of size 16 free'd ==433== at 0x4C23A18: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==433== by 0x42A557: input_mapping_erase (input.c:565) ==433== by 0x40C0EC: builtin_bind (builtin.c:564) ==433== by 0x4105A1: builtin_run (builtin.c:3837) ==433== by 0x417119: exec (exec.c:1376) ==433== by 0x420BE5: eval (parser.c:2376) ==433== by 0x4168CA: T.90 (exec.c:802) ==433== by 0x416FB7: exec (exec.c:1227) ==433== by 0x420BE5: eval (parser.c:2376) ==433== by 0x4168CA: T.90 (exec.c:802) ==433== by 0x416FB7: exec (exec.c:1227) ==433== by 0x420BE5: eval (parser.c:2376) ==433== ==433== Invalid read of size 8 ==433== at 0x42A78A: input_readch (input.c:500) ==433== by 0x42508F: reader_readline (reader.c:2587) ==433== by 0x426AB9: reader_read (reader.c:2463) ==433== by 0x43A80D: main (fish.c:326) ==433== Address 0x55fa2a0 is 0 bytes inside a block of size 16 free'd ==433== at 0x4C23A18: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==433== by 0x42A557: input_mapping_erase (input.c:565) ==433== by 0x40C0EC: builtin_bind (builtin.c:564) ==433== by 0x4105A1: builtin_run (builtin.c:3837) ==433== by 0x417119: exec (exec.c:1376) ==433== by 0x420BE5: eval (parser.c:2376) ==433== by 0x4168CA: T.90 (exec.c:802) ==433== by 0x416FB7: exec (exec.c:1227) ==433== by 0x420BE5: eval (parser.c:2376) ==433== by 0x4168CA: T.90 (exec.c:802) ==433== by 0x416FB7: exec (exec.c:1227) ==433== by 0x420BE5: eval (parser.c:2376) ==433== ==433== Invalid read of size 8 ==433== at 0x42A5A1: input_exec_binding (input.c:379) ==433== by 0x42A7F7: input_readch (input.c:524) ==433== by 0x42508F: reader_readline (reader.c:2587) ==433== by 0x426AB9: reader_read (reader.c:2463) ==433== by 0x43A80D: main (fish.c:326) ==433== Address 0x55fa2a8 is 8 bytes inside a block of size 16 free'd ==433== at 0x4C23A18: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==433== by 0x42A557: input_mapping_erase (input.c:565) ==433== by 0x40C0EC: builtin_bind (builtin.c:564) ==433== by 0x4105A1: builtin_run (builtin.c:3837) ==433== by 0x417119: exec (exec.c:1376) ==433== by 0x420BE5: eval (parser.c:2376) ==433== by 0x4168CA: T.90 (exec.c:802) ==433== by 0x416FB7: exec (exec.c:1227) ==433== by 0x420BE5: eval (parser.c:2376) ==433== by 0x4168CA: T.90 (exec.c:802) ==433== by 0x416FB7: exec (exec.c:1227) ==433== by 0x420BE5: eval (parser.c:2376) ==433==[/code] I'm not expert in debugging with gdb and valgrind. I'm still learning how to do it so if you have suggestions please post. ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
