Ah, thanks. Yes, you are right.
I tried to install the glibc source this way but the original version that caused the segfault is not available anymore from apt sources:

[root@lab002109-flip-server install]$ apt install glibc-source                                       
Reading package lists... Done                                                                        
Building dependency tree... Done                                                                     
Reading state information... Done                                                                    
The following package was automatically installed and is no longer required:                                                                                                                               
  linux-image-5.10.0-8-amd64                                                                         
Use 'apt autoremove' to remove it.                                                                   
The following NEW packages will be installed:                                                        
  glibc-source                                                                                       
0 upgraded, 1 newly installed, 0 to remove and 36 not upgraded.                                      
Need to get 18.6 MB of archives.                                                                     
After this operation, 24.7 MB of additional disk space will be used.                                 
Err:1 http://deb.debian.org/debian bullseye/main amd64 glibc-source all 2.31-13+deb11u3              
  404  Not Found [IP: 192.168.67.50 3128]                                                            
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/glibc-source_2.31-13%2bdeb11u3_all.deb  404  Not Found [IP: 192.168.67.50 3128]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?  

So I did 'apt update' and got a new version:
Before 'apt update':

glibc-source/stable 2.31-13+deb11u3 all                                                              
  GNU C Library: sources                                                                             

After 'apt update && apt install glibc-source'

glibc-source/stable,stable-updates,now 2.31-13+deb11u5 all [installed]
  GNU C Library: sources       

But this one as expected will not match the core file:

[root@lab002109-flip-server ~]$ gdb /usr/local/src/git/kamailio-master/src/kamailio /core.1623683
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 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"...
BFD: warning: /usr/local/src/git/kamailio-master/src/kamailio has a section extending past end of file
BFD: warning: /usr/local/src/git/kamailio-master/src/kamailio has a section extending past end of file
BFD: warning: /usr/local/src/git/kamailio-master/src/kamailio has a section extending past end of file
BFD: warning: /usr/local/src/git/kamailio-master/src/kamailio has a section extending past end of file
"0x7fff311c6900s": not in executable format: file format not recognized

warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
[New LWP 1623683]
Core was generated by `/usr/local/src/git/kamailio-master/src/kamailio -m 991 -f /usr/local/etc/kamail'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007ff7a83db734 in ?? ()
(gdb) bt
#0  0x00007ff7a83db734 in ?? ()
#1  0x00007ff7a8331071 in ?? ()
#2  0x00000000639c5b13 in ?? ()
#3  0x00007ffcc028806c in ?? ()
#4  0x00007ff7a8435430 in ?? ()
#5  0x00007ffcc02881b0 in ?? ()
#6  0x0000000000000000 in ?? ()

I suppose I can get the original glibc source and instruct gdb to use it but for now, since indeed it was updated I will assume it is a glibc bug that should be solved by now.
So I will close this issue and add the installation of glibc-source in my deployment procedure to not get into this situation anymore.
Thanks.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3316/1358786962@github.com>