Bug 2232345

Summary: My bash randomly crashed
Product: [Fedora] Fedora Reporter: Lukáš Nykrýn <lnykryn>
Component: bashAssignee: Siteshwar Vashisht <svashisht>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: admiller, information, kasal, kdudka, svashisht
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
coredump none

Description Lukáš Nykrýn 2023-08-16 12:16:32 UTC
[root@vm-10-0-186-161 ~]# rpm -q bash
bash-5.2.15-3.fc38.x86_64

[root@vm-10-0-186-161 ~]# coredumpctl dump
           PID: 643 (bash)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 6 (ABRT)
     Timestamp: Wed 2023-08-16 08:08:53 EDT (1min 7s ago)
  Command Line: bash -l
    Executable: /usr/bin/bash
 Control Group: /user.slice/user-0.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-0.slice
       Session: 1
     Owner UID: 0 (root)
       Boot ID: a66af09daeac47b3ad7f9f71accb90e6
    Machine ID: d17087d3994e471a9bc183b2cb45a461
      Hostname: vm-10-0-186-161.hosted.upshift.rdu2.redhat.com
       Storage: /var/lib/systemd/coredump/core.bash.0.a66af09daeac47b3ad7f9f71accb90e6.643.1692187733000000.zst (present)
  Size on Disk: 71.3K
       Package: bash/5.2.15-3.fc38
      build-id: 15780967f1c6ffb422b5832185766bee364d3c71
       Message: Process 643 (bash) of user 0 dumped core.
                
                Module libtinfo.so.6 from rpm ncurses-6.4-3.20230114.fc38.x86_64
                Module bash from rpm bash-5.2.15-3.fc38.x86_64
                Stack trace of thread 643:
                #0  0x00007fb553e48844 __pthread_kill_implementation (libc.so.6 + 0x8e844)
                #1  0x00007fb553df7abe raise (libc.so.6 + 0x3dabe)
                #2  0x00007fb553de090f abort (libc.so.6 + 0x2690f)
                #3  0x00007fb553de160f __libc_message.cold (libc.so.6 + 0x2760f)
                #4  0x00007fb553e52775 malloc_printerr (libc.so.6 + 0x98775)
                #5  0x00007fb553e54b75 _int_free (libc.so.6 + 0x9ab75)
                #6  0x00007fb553e571ce free (libc.so.6 + 0x9d1ce)
                #7  0x000055560b68a095 rl_do_undo (bash + 0xfe095)
                #8  0x000055560b6679e5 readline_internal_teardown (bash + 0xdb9e5)
                #9  0x000055560b6680dc readline (bash + 0xdc0dc)
                #10 0x000055560b5c188c yy_readline_get (bash + 0x3588c)
                #11 0x000055560b5c2018 shell_getc.lto_priv.0 (bash + 0x36018)
                #12 0x000055560b69b5bb read_token.constprop.0 (bash + 0x10f5bb)
                #13 0x000055560b5c6d01 yyparse (bash + 0x3ad01)
                #14 0x000055560b5ca940 parse_command (bash + 0x3e940)
                #15 0x000055560b5cab0c read_command (bash + 0x3eb0c)
                #16 0x000055560b5cad2e reader_loop (bash + 0x3ed2e)
                #17 0x000055560b5be522 main (bash + 0x32522)
                #18 0x00007fb553de1b4a __libc_start_call_main (libc.so.6 + 0x27b4a)
                #19 0x00007fb553de1c0b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x27c0b)
                #20 0x000055560b5bf255 _start (bash + 0x33255)
                ELF object binary architecture: AMD x86-64


Reproducible: Couldn't Reproduce

Comment 1 Lukáš Nykrýn 2023-08-16 12:17:14 UTC
Created attachment 1983604 [details]
coredump

Comment 2 Lukáš Nykrýn 2023-08-16 12:21:02 UTC
With debuginfo installed
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;                                                                        
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007fb553e488b3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007fb553df7abe in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007fb553de090f in __GI_abort () at abort.c:100
#4  0x00007fb553de160f in __libc_message (fmt=fmt@entry=0x7fb553f5b52f "%s\n") at ../sysdeps/posix/libc_fatal.c:150
#5  0x00007fb553e52775 in malloc_printerr (str=str@entry=0x7fb553f5e268 "free(): double free detected in tcache 2") at malloc.c:5651
#6  0x00007fb553e54b75 in _int_free (av=0x7fb553f8ec80 <main_arena>, p=p@entry=0x55560cf6b7f0, have_lock=have_lock@entry=0) at malloc.c:4459
#7  0x00007fb553e571ce in __GI___libc_free (mem=mem@entry=0x55560cf6b800) at malloc.c:3367
#8  0x000055560b68a095 in xfree (string=<optimized out>) at /usr/src/debug/bash-5.2.15-3.fc38.x86_64/xmalloc.c:150
#9  rl_do_undo () at lib/readline/undo.c:265
#10 0x000055560b6679e5 in rl_revert_line (count=<optimized out>, key=<optimized out>) at lib/readline/undo.c:337
#11 rl_revert_line (key=0, count=1) at lib/readline/undo.c:330
#12 readline_internal_teardown (eof=0) at lib/readline/readline.c:545
#13 0x000055560b6680dc in readline_internal () at lib/readline/readline.c:781
#14 readline (prompt=<optimized out>) at lib/readline/readline.c:434
#15 0x000055560b5c188c in yy_readline_get () at ./parse.y:1528
#16 0x000055560b5c2018 in yy_getc () at ./parse.y:1462
#17 shell_getc (remove_quoted_newline=1) at ./parse.y:2393
#18 0x000055560b69b5bb in read_token.constprop.0 (command=0) at ./parse.y:3402
#19 0x000055560b5c6d01 in yylex () at ./parse.y:2890
#20 yyparse () at /usr/src/debug/bash-5.2.15-3.fc38.x86_64/y.tab.c:1854
#21 0x000055560b5ca940 in parse_command () at /usr/src/debug/bash-5.2.15-3.fc38.x86_64/eval.c:349
#22 0x000055560b5cab0c in read_command () at /usr/src/debug/bash-5.2.15-3.fc38.x86_64/eval.c:393
#23 0x000055560b5cad2e in reader_loop () at /usr/src/debug/bash-5.2.15-3.fc38.x86_64/eval.c:139
#24 0x000055560b5be522 in main (argc=2, argv=0x7ffc3644a3b8, env=0x7ffc3644a3d0) at /usr/src/debug/bash-5.2.15-3.fc38.x86_64/shell.c:843