bash hangs infinitely; related to replace_history_data

Bug #119913 reported by Daniel Hahler
6
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: bash

I had it happen several times on my server that bash hung, when exiting from e.g. a "less" statement, before displaying the prompt again.

I've attached gdb then and it revealed the following backtrace. This was with bash from Feisty (3.2-0ubuntu7).

# gdb -p 10345
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
Attaching to process 10345
Reading symbols from /bin/bash...Reading symbols from /usr/lib/debug/bin/bash...done.
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
done.
termsig_sighandler (sig=11) at ../bash/sig.c:429
429 ../bash/sig.c: No such file or directory.
        in ../bash/sig.c
(gdb) bt
#0 termsig_sighandler (sig=11) at ../bash/sig.c:429
#1 <signal handler called>
#2 0x080ced45 in replace_history_data (which=-1, old=0x0, new=0x0) at ../../../bash/lib/readline/history.c:420
#3 0x080ca3d5 in rl_free_undo_list () at ../../../bash/lib/readline/undo.c:122
#4 0x080c898b in rl_free_line_state () at ../../../bash/lib/readline/signals.c:455
#5 0x080c8fb9 in rl_signal_handler (sig=2) at ../../../bash/lib/readline/signals.c:145
#6 <signal handler called>
#7 _rl_dispatch_subseq (key=13, map=0x14, got_subseq=0) at ../../../bash/lib/readline/readline.c:723
#8 0x080ba105 in _rl_dispatch (key=13, map=0x14) at ../../../bash/lib/readline/readline.c:687
#9 0x080ba41c in readline_internal_char () at ../../../bash/lib/readline/readline.c:519
#10 0x080ba7a5 in readline (
    prompt=0x8296708 "\001\033[1;31m\002root\001\033[1;31m\002@\001\033[0;32m\002h170368 \001\001\033[0;31m\002[es:1] \002\001\0
33[0;33m\002[scr:1] \001\033[1;31m\002{ \001\033[0;32m\002/etc/monit\001\033[1;31m\002 }\r\n#\001\033[0m\002 ") at ../../../bash
/lib/readline/readline.c:545
#11 0x080683d1 in yy_readline_get () at ../bash/parse.y:1213
#12 0x08064098 in shell_getc (remove_quoted_newline=1) at ../bash/parse.y:1942
#13 0x0806538a in read_token (command=<value optimized out>) at ../bash/parse.y:2562
#14 0x0806898d in yyparse () at ../bash/parse.y:2208
#15 0x080ee0a4 in _DYNAMIC ()
#16 0x080ee084 in _DYNAMIC ()
#17 0x080ee06c in _DYNAMIC ()
#18 0x00000000 in ?? ()
(gdb)

Revision history for this message
Mika Fischer (zoop) wrote :

Hi Daniel,

do you still experience this bug?

Any ideas as to how it can be reproduced?

Thanks,
 Mika

Changed in bash:
status: New → Incomplete
Revision history for this message
Daniel Hahler (blueyed) wrote :

I have not experienced this again and could not reproduce it reliably back then.

Currently this server is running bash 3.2-0ubuntu10 (still Feisty).
Maybe it has been fixed in one of the updates.. since I'm using a rather advanced custom prompt, something in there might have triggered a corner case - I've hoped that providing a backtrace would help to find this.

Revision history for this message
Jayson Rowe (jayson.rowe) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in bash:
status: Incomplete → Invalid
Revision history for this message
Muneeb Siddiqui (bella1220) wrote :

In addition to the aforementioned offers, we extend coupon rewards to those who join our Telegram channel. This feature underscores our dedication to delivering value to our community members and ensuring they feel appreciated. https://www.casino-hera.com/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.