Your message dated Sun, 03 Aug 2025 16:56:05 -0400
with message-id <[email protected]>
and subject line Closing bug
has caused the Debian Bug report #322966,
regarding gdb somehow gets suspended [by bash?]
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
322966: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=322966
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bash, gdb
Severity: normal
Check this out:
pryzbyj@andromeda:/tmp$ gdb --args ps -ef
GNU gdb 6.3-debian
...
(gdb) break getpwuid
Function "getpwuid" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (getpwuid) pending.
(gdb) r
Starting program: /bin/ps -ef
[2]+ Stopped gdb --args ps -ef
^^^^^^^^^^^^^
pryzbyj@andromeda:/tmp$ fg
gdb --args ps -ef
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Breakpoint 2 at 0xb7f3e508
Pending breakpoint "getpwuid" resolved
Breakpoint 2, 0xb7f3e508 in getpwuid () from /lib/tls/libc.so.6
(gdb)
When gdb got stopped, it wasn't because I hit ^Z. Somehow gdb stopped
itself. I suspect its a bash-3 problem, though I've no evidence to
support that claim. (Reassign at will).
Then there is this:
pryzbyj@andromeda:~$ gdb --args ps -ef
GNU gdb 6.3-debian
...
(gdb) break foo
Function "foo" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (foo) pending.
(gdb) r
Starting program: /bin/ps -ef
[1]+ Stopped gdb --args ps -ef
^^^^^^^^^^^^^
pryzbyj@andromeda:~$ fg
gdb --args ps -ef
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Program received signal SIGTTOU, Stopped (tty output).
0xb7f6095e in write () from /lib/tls/libc.so.6
(gdb)
gdb in fact seems to be getting SIGTTOU .. (now gdbing -p the gdb
process):
Program received signal SIGTTOU, Stopped (tty output).
0xb7edf95e in write () from /lib/tls/libc.so.6
(gdb) bt
#0 0xb7edf95e in write () from /lib/tls/libc.so.6
#1 0xb7e81eef in _IO_file_write () from /lib/tls/libc.so.6
#2 0xb7e8105e in _IO_do_write () from /lib/tls/libc.so.6
#3 0xb7e80ff6 in _IO_do_write () from /lib/tls/libc.so.6
#4 0xb7e81529 in _IO_file_overflow () from /lib/tls/libc.so.6
#5 0xb7e82011 in _IO_file_xsputn () from /lib/tls/libc.so.6
#6 0xb7e76dff in fwrite () from /lib/tls/libc.so.6
#7 0x080836bb in mem_fileopen ()
#8 0x0808305d in ui_file_write ()
#9 0x0808164a in fputc_unfiltered ()
#10 0x08081468 in begin_line ()
#11 0x08081901 in puts_debug ()
#12 0x08081948 in vfprintf_filtered ()
#13 0x08081ad1 in printf_filtered ()
#14 0x080f5717 in new_symfile_objfile ()
#15 0x080f57e9 in symbol_file_add_from_bfd ()
#16 0x0808e375 in _initialize_svr4_solib ()
#17 0x0808e478 in _initialize_svr4_solib ()
#18 0x0807d820 in throw_exception ()
#19 0x0807d871 in catch_exceptions ()
#20 0x0808e51c in _initialize_svr4_solib ()
#21 0x081291e8 in observer_notify_target_changed ()
#22 0x08128fa2 in bcache_memory_used ()
#23 0x08129270 in observer_notify_inferior_created ()
#24 0x08090473 in child_thread_alive ()
#25 0x08077f23 in find_default_create_inferior ()
#26 0x080feefd in kill_if_already_running ()
#27 0x080afaf9 in _initialize_cli_dump ()
#28 0x080b1b4c in cmd_func ()
#29 0x0807dd7d in execute_command ()
#30 0x0810fa2f in async_disable_stdin ()
#31 0x0810fe75 in async_disable_stdin ()
#32 0xb7fcf151 in rl_callback_read_char () from /lib/libreadline.so.4
#33 0x0810f37b in delete_timer ()
#34 0x0810f92a in stdin_event_handler ()
#35 0x0810ec0e in delete_file_handler ()
#36 0x0810e6c9 in standard_macro_lookup ()
#37 0x0810e728 in gdb_do_one_event ()
#38 0x0807d9a1 in catch_exceptions_with_msg ()
#39 0x0807d820 in throw_exception ()
#40 0x0807da00 in catch_errors ()
#41 0x080be544 in _initialize_tui_hooks ()
#42 0x0810c433 in current_interp_command_loop ()
#43 0x080747cb in main ()
(gdb)
--- End Message ---
--- Begin Message ---
Not surprisingly, I cannot reproduce this bug with GDB 16.1:
--8<---------------cut here---------------start------------->8---
(gdb) r
Starting program: /usr/bin/ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 Jul27 ? 00:00:04 /sbin/init
root 124 1 0 Jul27 ? 00:00:00
/usr/lib/systemd/systemd-journald
systemd+ 145 1 0 Jul27 ? 00:00:00
/usr/lib/systemd/systemd-resolved
root 149 1 0 Jul27 ? 00:00:00
/usr/lib/systemd/systemd-udevd
systemd+ 151 1 0 Jul27 ? 00:00:01
/usr/lib/systemd/systemd-networkd
message+ 173 1 0 Jul27 ? 00:00:00 /usr/bin/dbus-daemon
--system --address=systemd: --nofork --nopidfile --systemd-activation
--syslog-only
root 174 1 0 Jul27 ? 00:00:00
/usr/lib/systemd/systemd-logind
root 183 1 0 Jul27 pts/0 00:00:00 /sbin/agetty -o -- \u
--noreset --noclear --keep-baud 115200,57600,38400,9600 - linux
polkitd 185 1 0 Jul27 ? 00:00:09 /usr/lib/polkit-1/polkitd
--no-debug --log-level=notice
root 198 1 0 Jul27 ? 00:00:00 /usr/lib/systemd/systemd
--user
root 200 198 0 Jul27 ? 00:00:00 (sd-pam)
root 3527 0 0 Jul27 pts/1 00:00:00 su -l
root 3529 3527 0 Jul27 pts/1 00:00:00 -bash
root 4400 0 0 Jul28 pts/2 00:00:00 su -l
root 4402 4400 0 Jul28 pts/2 00:00:00 -bash
root 5819 4402 5 20:54 pts/2 00:00:00 gdb --args ps -ef
root 5830 5819 0 20:54 pts/2 00:00:00 /usr/bin/ps -ef
[Inferior 1 (process 5830) exited normally]
--8<---------------cut here---------------end--------------->8---
This bug is 20 years old; GDB has been almost completely rewritten since
then, and I don't recall seeing a similar problem recently.
I'm taking the liberty to close this bug. Feel free reopen if it's
still applicable.
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/
signature.asc
Description: PGP signature
--- End Message ---