Bug 279875 - sockstat: segmentation fault
Summary: sockstat: segmentation fault
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.0-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-06-20 09:42 UTC by Kirill
Modified: 2024-06-24 09:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill 2024-06-20 09:42:55 UTC
Hi.

After upgrade to FreeBSD 14.0 I noticed in /var/log/messages rows like:

Jun 20 01:36:14 servername kernel: pid 74752 (sockstat), jid 1, uid 1003: exited on signal 11 (no core dump - other error)
Jun 20 01:37:41 servername  kernel: pid 75150 (sockstat), jid 1, uid 1003: exited on signal 11 (no core dump - other error)
Jun 20 01:38:51 servername  kernel: pid 75425 (sockstat), jid 1, uid 1003: exited on signal 11 (no core dump - other error)
Jun 20 01:39:15 servername  kernel: pid 75587 (sockstat), jid 1, uid 1003: exited on signal 11 (no core dump - other error)
Jun 20 01:44:02 servername  kernel: pid 76745 (sockstat), jid 1, uid 1003: exited on signal 11 (no core dump - other error)

This happens after our script tries to parse sockstat output, but sometime it crashes. Run sockstat without any arguments give same result. One remark that server processes a lot of connections.

May be backtrace could help you:

Process 46451 stopped
* thread #1, name = 'sockstat.full', stop reason = signal SIGSEGV: invalid address (fault address: 0x18)
    frame #0: 0x00001852b6abe497 sockstat.full`displaysock [inlined] file_compare(a=<unavailable>, b=0x0000000000000000) at sockstat.c:179:38
(lldb) list
(lldb) bt
* thread #1, name = 'sockstat.full', stop reason = signal SIGSEGV: invalid address (fault address: 0x18)
  * frame #0: 0x00001852b6abe497 sockstat.full`displaysock [inlined] file_compare(a=<unavailable>, b=0x0000000000000000) at sockstat.c:179:38
    frame #1: 0x00001852b6abe497 sockstat.full`displaysock [inlined] files_t_RB_FIND(head=<unavailable>, elm=<unavailable>) at sockstat.c:181:1
    frame #2: 0x00001852b6abe48e sockstat.full`displaysock(s=0x000026891e269a40, pos=40) at sockstat.c:1165:10
    frame #3: 0x00001852b6abdc10 sockstat.full`display at sockstat.c:1364:3
    frame #4: 0x00001852b6abcbd8 sockstat.full`main(argc=<unavailable>, argv=<unavailable>) at sockstat.c:1577:2
    frame #5: 0x0000185ada4cbafa libc.so.7`__libc_start1 + 298
    frame #6: 0x00001852b6abb17d sockstat.full`_start at crt1_s.S:83
(lldb)