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 cli/16440] New: "readline: readline_callback_read_char() called with no handler!" in debugging gdb at startup


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

            Bug ID: 16440
           Summary: "readline: readline_callback_read_char() called with
                    no handler!" in debugging gdb at startup
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: normal
          Priority: P2
         Component: cli
          Assignee: unassigned at sourceware dot org
          Reporter: andreas.from at ericsson dot com

Starting a gdb (all instances of gdb below are of 7.6.1 release build) as:

gdb_release_7.6.1/gdb/gdb --args gdb_7.6.1_release/gdb/gdb

and in a second terminal attaching to the process debugging the second gdb as:

gdb_7.6.1_release/gdb/gdb --pid=XXXX

makes the prompt in the second terminal "hang".

If typing "Enter" the attaching GDB from the second terminal will dump core
diplaying the message

readline: readline_callback_read_char() called with no handler!

but if doing "<Ctrl> + C" then the normal prompt appears and the session seems
ok. (The behaviour seems consistent and appears every time I try.)

If attaching in turn to the gdb in the second terminal, i.e. yet another

gdb_7.6.1_release/gdb/gdb --pid=XXXX

we can find the backtrace looks like this:

06:38:32 â afro:~$ gdb_7.6.1_release/gdb/gdb --pid=4567
GNU gdb (GDB) 7.6.50.20130830-cvs
Copyright (C) 2013 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".
Attaching to process 4567
Reading symbols from /home/afro/build/gdb_7.6.1_release/gdb/gdb...done.
Setting up the environment for debugging gdb.
^CQuit
Reading symbols from /lib/x86_64-linux-gnu/libdl.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libdl.so.2
Reading symbols from /lib/x86_64-linux-gnu/libncurses.so.5...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libncurses.so.5
Reading symbols from /lib/x86_64-linux-gnu/libtinfo.so.5...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libtinfo.so.5
Reading symbols from /lib/x86_64-linux-gnu/libz.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libz.so.1
Reading symbols from /lib/x86_64-linux-gnu/libm.so.6...(no debugging symbols
found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libm.so.6
Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...(no debugging
symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Loaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0...(no
debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
Reading symbols from /lib/x86_64-linux-gnu/libexpat.so.1...(no debugging
symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libexpat.so.1
Reading symbols from /lib/x86_64-linux-gnu/liblzma.so.5...(no debugging symbols
found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/liblzma.so.5
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...(no debugging symbols
found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/x86_64-linux-gnu/libutil.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libutil.so.1
0x00007f8193a29fa0 in poll () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) c
Continuing.

Program received signal SIGABRT, Aborted.
0x00007f8193973037 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007f8193973037 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f8193976698 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x000000000074ec31 in rl_callback_read_char () at
../../gdb/readline/callback.c:116
#3  0x00000000005f96c9 in rl_callback_read_char_wrapper (client_data=0x0) at
../../gdb/gdb/event-top.c:164
#4  0x00000000005f9ab6 in stdin_event_handler (error=0, client_data=0x0) at
../../gdb/gdb/event-top.c:373
#5  0x00000000005f864e in handle_file_event (data=...) at
../../gdb/gdb/event-loop.c:768
#6  0x00000000005f7af7 in process_event () at ../../gdb/gdb/event-loop.c:342
#7  0x00000000005f7bbe in gdb_do_one_event () at ../../gdb/gdb/event-loop.c:406
#8  0x00000000006f45fa in execute_command (p=0x227117e "1", from_tty=0) at
../../gdb/gdb/top.c:487
#9  0x00000000004e5047 in execute_control_command (cmd=0x227a020) at
../../gdb/gdb/cli/cli-script.c:422
#10 0x00000000004e53cf in execute_control_command (cmd=0x23b51e0) at
../../gdb/gdb/cli/cli-script.c:546
#11 0x00000000004e54b8 in execute_control_command_untraced (cmd=0x23b51e0) at
../../gdb/gdb/cli/cli-script.c:594
#12 0x00000000004e559a in if_command (arg=0x1ff6123 "", from_tty=0) at
../../gdb/gdb/cli/cli-script.c:640
#13 0x00000000004e154b in do_cfunc (c=0x1f4d420, args=0x1ff6123 "", from_tty=0)
at ../../gdb/gdb/cli/cli-decode.c:113
#14 0x00000000004e466f in cmd_func (cmd=0x1f4d420, args=0x1ff6123 "",
from_tty=0) at ../../gdb/gdb/cli/cli-decode.c:1888
#15 0x00000000006f45d5 in execute_command (p=0x1ff6131 "w are not fully
compatible with wrapping into an 'if' block.", from_tty=0) at
../../gdb/gdb/top.c:479
#16 0x00000000006f4877 in command_loop () at ../../gdb/gdb/top.c:582
#17 0x00000000006f4286 in read_command_file (stream=0x222a080) at
../../gdb/gdb/top.c:322
#18 0x00000000004e757c in script_from_file (stream=0x222a080, file=0x1eedab0
"/home/efroand/repos/gdb_build_foss_7.6.1_release/gdb/gdb-gdb.gdb") at
../../gdb/gdb/cli/cli-script.c:1645
#19 0x0000000000551428 in source_gdb_script_for_objfile (objfile=0x20e1d10,
file=0x222a080, filename=0x1eedab0
"/home/efroand/repos/gdb_build_foss_7.6.1_release/gdb/gdb-gdb.gdb") at
../../gdb/gdb/auto-load.c:532
#20 0x0000000000551a89 in auto_load_objfile_script_1 (objfile=0x20e1d10,
realname=0x1eeda60 "/home/efroand/repos/gdb_build_foss_7.6.1_release/gdb/gdb",
language=0x893d60 <script_language_gdb>) at ../../gdb/gdb/auto-load.c:794
#21 0x0000000000551aff in auto_load_objfile_script (objfile=0x20e1d10,
language=0x893d60 <script_language_gdb>) at ../../gdb/gdb/auto-load.c:815
#22 0x0000000000551bee in load_auto_scripts_for_objfile (objfile=0x20e1d10) at
../../gdb/gdb/auto-load.c:847
#23 0x0000000000551c25 in auto_load_new_objfile (objfile=0x20e1d10) at
../../gdb/gdb/auto-load.c:868
#24 0x0000000000631c62 in observer_new_objfile_notification_stub (data=0x551bff
<auto_load_new_objfile>, args_data=0x7fff217867a0) at ./observer.inc:304
#25 0x00000000006315e2 in generic_observer_notify (subject=0x2034540,
args=0x7fff217867a0) at ../../gdb/gdb/observer.c:167
#26 0x0000000000631cf4 in observer_notify_new_objfile (objfile=0x20e1d10) at
./observer.inc:329
#27 0x00000000005bc007 in symbol_file_add_with_addrs (abfd=0x20415f0,
add_flags=6, addrs=0x0, flags=0, parent=0x0) at ../../gdb/gdb/symfile.c:1157
#28 0x00000000005bc0b8 in symbol_file_add_from_bfd (abfd=0x20415f0,
add_flags=6, addrs=0x0, flags=0, parent=0x0) at ../../gdb/gdb/symfile.c:1196
#29 0x00000000005bc10c in symbol_file_add (name=0x212ab80
"/home/efroand/repos/gdb_build_foss_7.6.1_release/gdb/gdb", add_flags=6,
addrs=0x0, flags=0) at ../../gdb/gdb/symfile.c:1210
#30 0x00000000005bc19b in symbol_file_add_main_1 (args=0x212ab80
"/home/efroand/repos/gdb_build_foss_7.6.1_release/gdb/gdb", from_tty=1,
flags=0) at ../../gdb/gdb/symfile.c:1235
#31 0x00000000005bc147 in symbol_file_add_main (args=0x212ab80
"/home/efroand/repos/gdb_build_foss_7.6.1_release/gdb/gdb", from_tty=1) at
../../gdb/gdb/symfile.c:1226
#32 0x00000000005d1cd0 in attach_command_post_wait (args=0x1f636b0 "4550",
from_tty=1, async_exec=0) at ../../gdb/gdb/infcmd.c:2430
#33 0x00000000005d1e23 in attach_command_continuation (args=0x1fe91d0, err=0)
at ../../gdb/gdb/infcmd.c:2507
#34 0x000000000057b75e in do_my_continuations_1 (pmy_chain=0x7fff217869e8,
err=0) at ../../gdb/gdb/continuations.c:59
#35 0x000000000057b7e2 in do_my_continuations (list=0x1f8c9b0, err=0) at
../../gdb/gdb/continuations.c:83
#36 0x000000000057b8d1 in do_all_inferior_continuations (err=0) at
../../gdb/gdb/continuations.c:125
#37 0x00000000005fa8ed in inferior_event_handler (event_type=INF_EXEC_COMPLETE,
client_data=0x0) at ../../gdb/gdb/inf-loop.c:77
#38 0x00000000005d78e7 in fetch_inferior_event (client_data=0x0) at
../../gdb/gdb/infrun.c:2841
#39 0x00000000005faaca in fetch_inferior_event_wrapper (client_data=0x0) at
../../gdb/gdb/inf-loop.c:145
#40 0x00000000005edcda in catch_errors (func=0x5faab2
<fetch_inferior_event_wrapper>, func_args=0x0, errstring=0x8bfff8 "",
mask=RETURN_MASK_ALL) at ../../gdb/gdb/exceptions.c:524
#41 0x00000000005fa838 in inferior_event_handler (event_type=INF_REG_EVENT,
client_data=0x0) at ../../gdb/gdb/inf-loop.c:53
#42 0x00000000004a42e9 in handle_target_event (error=0, client_data=0x0) at
../../gdb/gdb/linux-nat.c:4624
#43 0x00000000005f864e in handle_file_event (data=...) at
../../gdb/gdb/event-loop.c:768
#44 0x00000000005f7af7 in process_event () at ../../gdb/gdb/event-loop.c:342
#45 0x00000000005f7b99 in gdb_do_one_event () at ../../gdb/gdb/event-loop.c:394
#46 0x00000000005f7c0f in start_event_loop () at ../../gdb/gdb/event-loop.c:431
#47 0x00000000005f96f3 in cli_command_loop () at ../../gdb/gdb/event-top.c:177
#48 0x00000000005ef92f in current_interp_command_loop () at
../../gdb/gdb/interps.c:331
#49 0x00000000005f0b68 in captured_command_loop (data=0x0) at
../../gdb/gdb/main.c:260
#50 0x00000000005edcda in catch_errors (func=0x5f0b4d <captured_command_loop>,
func_args=0x0, errstring=0x8bd4d4 "", mask=RETURN_MASK_ALL) at
../../gdb/gdb/exceptions.c:524
#51 0x00000000005f1fd7 in captured_main (data=0x7fff21787000) at
../../gdb/gdb/main.c:1060
#52 0x00000000005edcda in catch_errors (func=0x5f0e04 <captured_main>,
func_args=0x7fff21787000, errstring=0x8bd4d4 "", mask=RETURN_MASK_ALL) at
../../gdb/gdb/exceptions.c:524
#53 0x00000000005f200d in gdb_main (args=0x7fff21787000) at
../../gdb/gdb/main.c:1069
#54 0x000000000045d34a in main (argc=2, argv=0x7fff21787108) at
../../gdb/gdb/gdb.c:34
(gdb) 


My .gdbinit file looks like this:

set remotetimeout 10000
set auto-load safe-path /
set target-async on
set pagination off
set debug serial 1
set debug remote 1


Let me know if you'd want some other debug info on this!

-- 
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]