You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It crashed in glibc at program start. Most commands are effected.
Reproduce:
docker run --rm -it almalinux:8 bash
almalinux:9 and almalinux:10 work fine though.
GDB couldn't catch the SEGFAULT:
[root@1f9eebb6f557 /]# /gdb/gdb bash
GNU gdb (GDB) 16.2
Copyright (C) 2024 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://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 bash...
warning: Cannot parse .gnu_debugdata section; LZMA support was disabled at compile time
(No debugging symbols found in bash)
(gdb) r
Starting program: /usr/bin/bash
During startup program terminated with signal SIGSEGV, Segmentation fault.
(gdb)
Unable to determine the root cause.
Some attempts:
If run the same VM system without TDX enabled, it works.
Can not debug with GDB directly. However, it can generate core dump. We can see it crashed at __memmove_avx512_unaligned_erms from the dumped core.
(gdb) bt
#0 0x00007dceb90def45 in __memmove_avx512_unaligned_erms ()
from /lib64/libc.so.6
#1 0x00007dceb9050134 in qsort_r () from /lib64/libc.so.6
#2 0x0000572f9c02fcbe in ?? ()
#3 0x0000572f9c02e5ec in main ()
After turning off avx512, it crashed at __memmove_avx_unaligned_erms.
(gdb) bt
#0 0x00007a70a52a7db7 in __memmove_avx_unaligned_erms () from /lib64/libc.so.6
#1 0x00007a70a524fce1 in msort_with_tmp.part () from /lib64/libc.so.6
#2 0x00007a70a5250134 in qsort_r () from /lib64/libc.so.6
#3 0x00005a5dcce2fcbe in ?? ()
#4 0x00005a5dcce2e5ec in main ()
After turning off avx, avx2 and avx512, it doesn't crash any more.
But it also call __memmove_avx512_unaligned_erms under AlmaLinux 9, as well as most other systems, without any error.
AlmaLinux 9 ships with glibc-2.34, AlmaLinux 8 ships with glibc-2.28.
When I compile the glibc-2.28 from source, and install it to AlmaLinux 8, then run the bash again, the segfault disappears.
The issue might be caused by some patches to glibc from AlmaLinux.
It crashed in glibc at program start. Most commands are effected.
Reproduce:
almalinux:9
andalmalinux:10
work fine though.GDB couldn't catch the SEGFAULT:
strace.txt
The text was updated successfully, but these errors were encountered: