This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug guile/17186] New: Crash when spawning REPL server


https://sourceware.org/bugzilla/show_bug.cgi?id=17186

            Bug ID: 17186
           Summary: Crash when spawning REPL server
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: guile
          Assignee: unassigned at sourceware dot org
          Reporter: ludo at gnu dot org

Running the REPL server (which spawns a separate thread) from GDB currently
leads to a crash:

$ gdb --args gdb
GNU gdb (GDB) 7.7.50.20140605-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gdb...done.
(gdb) r
Starting program: /home/ludo/soft/bin/gdb 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: File
"/gnu/store/h8d3hinaiwmvxbhk9g9b67s0bw7v8d3r-guile-2.0.11/lib/libguile-2.0.so.22.7.2-gdb.scm"
auto-loading has been declined by your `auto-load safe-path' set to
"/home/ludo/src/guile/libguile:~/soft/lib:~/.guix-profile/lib:~/.guix-profile/lib/debug:~/src/indes".
To enable execution of this file add
    add-auto-load-safe-path
/gnu/store/h8d3hinaiwmvxbhk9g9b67s0bw7v8d3r-guile-2.0.11/lib/libguile-2.0.so.22.7.2-gdb.scm
line to your configuration file "/home/ludo/.gdbinit".
To completely disable this security protection add
    set auto-load safe-path /
line to your configuration file "/home/ludo/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
    info "(gdb)Auto-loading safe path"
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/gnu/store/hf5kklv837xbfcv6gc7gpsj36l69j3sj-glibc-2.19/lib/libthread_db.so.1".
GNU gdb (GDB) 7.7.50.20140605-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) gu (use-modules (system repl server))
(gdb) gu (spawn-server)
[New Thread 0x7fffef14c700 (LWP 14237)]
memory clobbered before allocated block
#<thread [New Thread 0x7fffee8fb700 (LWP 14238)]

Program received signal SIGABRT, Aborted.
0x00007ffff68cf409 in raise () from
/gnu/store/hf5kklv837xbfcv6gc7gpsj36l69j3sj-glibc-2.19/lib/libc.so.6
(gdb) bt
#0  0x00007ffff68cf409 in raise () from
/gnu/store/hf5kklv837xbfcv6gc7gpsj36l69j3sj-glibc-2.19/lib/libc.so.6
#1  0x00007ffff68d0808 in abort () from
/gnu/store/hf5kklv837xbfcv6gc7gpsj36l69j3sj-glibc-2.19/lib/libc.so.6
#2  0x00007ffff690d294 in __libc_message () from
/gnu/store/hf5kklv837xbfcv6gc7gpsj36l69j3sj-glibc-2.19/lib/libc.so.6
#3  0x00007ffff690d2be in __libc_fatal () from
/gnu/store/hf5kklv837xbfcv6gc7gpsj36l69j3sj-glibc-2.19/lib/libc.so.6
#4  0x00007ffff6918895 in mabort () from
/gnu/store/hf5kklv837xbfcv6gc7gpsj36l69j3sj-glibc-2.19/lib/libc.so.6
#5  0x00007ffff6918948 in checkhdr.part () from
/gnu/store/hf5kklv837xbfcv6gc7gpsj36l69j3sj-glibc-2.19/lib/libc.so.6
#6  0x00007ffff6918d59 in freehook () from
/gnu/store/hf5kklv837xbfcv6gc7gpsj36l69j3sj-glibc-2.19/lib/libc.so.6
#7  0x0000000000550145 in exceptions_state_mc (action=action@entry=CATCH_ITER)
at exceptions.c:190
#8  0x00000000005502b7 in exceptions_state_mc_action_iter () at
exceptions.c:210
#9  0x00000000004ac985 in ioscm_write (port=0xff41a0, data=0x7ffff71f49de,
size=9) at ./guile/scm-ports.c:272
#10 0x00007ffff7178a6d in scm_lfwrite () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#11 0x00007ffff71aa541 in thread_print () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#12 0x00007ffff717df60 in iprin1 () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#13 0x00007ffff717cff9 in scm_prin1 () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#14 0x00007ffff717e281 in scm_write () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#15 0x00000000004af646 in scscm_eval_scheme_string (datap=<optimized out>) at
./guile/scm-safe-call.c:379
#16 0x00000000004af4ba in scscm_safe_call_body (d=0x7fffffffcc60) at
./guile/scm-safe-call.c:64
#17 0x00007ffff71c2d19 in vm_regular_engine () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#18 0x00007ffff713a333 in scm_call_4 () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#19 0x00000000004af505 in gdbscm_with_catch (data=0x7fffffffcc80) at
./guile/scm-safe-call.c:154
#20 0x00007ffff7130aea in c_body () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#21 0x00007ffff71c2d19 in vm_regular_engine () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#22 0x00007ffff713a333 in scm_call_4 () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#23 0x00007ffff713122f in scm_i_with_continuation_barrier () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#24 0x00007ffff71312c5 in scm_c_with_continuation_barrier () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#25 0x00007ffff6e85cb5 in GC_call_with_gc_active (fn=0x7ffff71aa060
<with_guile_trampoline>, client_data=0x7fffffffcc30)
    at pthread_support.c:1270
#26 0x00007ffff71aa731 in with_guile_and_parent () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#27 0x00007ffff6e80002 in GC_call_with_stack_base (fn=<optimized out>,
arg=<optimized out>) at misc.c:1832
#28 0x00007ffff71aaaa8 in scm_with_guile () from
/home/ludo/.guix-profile/lib/libguile-2.0.so.22
#29 0x00000000004af71d in gdbscm_with_guile (func=func@entry=0x4af610
<scscm_eval_scheme_string>, data=data@entry=0x7fffffffccd0)
    at ./guile/scm-safe-call.c:186
#30 0x00000000004af8b9 in gdbscm_safe_eval_string (string=<optimized out>,
display_result=display_result@entry=1)
    at ./guile/scm-safe-call.c:399
#31 0x00000000004a19cd in guile_command (arg=<optimized out>,
from_tty=<optimized out>) at ./guile/guile.c:196
#32 0x000000000060eeeb in execute_command (p=<optimized out>, p@entry=0xb9b6c0
"gu (spawn-server)", from_tty=1) at top.c:461
#33 0x000000000055ab35 in command_handler (command=0xb9b6c0 "gu
(spawn-server)") at event-top.c:433
#34 0x000000000055b114 in command_line_handler (rl=<optimized out>) at
event-top.c:630
#35 0x0000000000655dd0 in rl_callback_read_char () at callback.c:220
#36 0x000000000055ab99 in rl_callback_read_char_wrapper (client_data=<optimized
out>) at event-top.c:167
#37 0x00000000005597a1 in process_event () at event-loop.c:343
#38 0x0000000000559b6a in gdb_do_one_event () at event-loop.c:395
#39 0x0000000000559dbe in start_event_loop () at event-loop.c:432
#40 0x00000000005536e3 in captured_command_loop (data=data@entry=0x0) at
main.c:301
#41 0x00000000005507fa in catch_errors (func=func@entry=0x5536d0
<captured_command_loop>, func_args=func_args@entry=0x0, 
    errstring=errstring@entry=0x717ab2 "", mask=mask@entry=RETURN_MASK_ALL) at
exceptions.c:524
#42 0x00000000005544e6 in captured_main (data=data@entry=0x7fffffffd030) at
main.c:1097
#43 0x00000000005507fa in catch_errors (func=func@entry=0x553aa0
<captured_main>, func_args=func_args@entry=0x7fffffffd030, 
    errstring=errstring@entry=0x717ab2 "", mask=mask@entry=RETURN_MASK_ALL) at
exceptions.c:524
#44 0x00000000005549db in gdb_main (args=args@entry=0x7fffffffd030) at
main.c:1105
#45 0x000000000040b225 in main (argc=<optimized out>, argv=<optimized out>) at
gdb.c:33
(gdb) info threads
  Id   Target Id         Frame 
  3    Thread 0x7fffee8fb700 (LWP 14238) "gdb" GC_generic_malloc_inner
(lb=lb@entry=864, k=k@entry=1) at malloc.c:111
  2    Thread 0x7fffef14c700 (LWP 14237) "gdb" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
* 1    Thread 0x7ffff7fef740 (LWP 14204) "gdb" 0x00007ffff68cf409 in raise ()
   from /gnu/store/hf5kklv837xbfcv6gc7gpsj36l69j3sj-glibc-2.19/lib/libc.so.6

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]