Bug #2802
closediprep: use_cnt can get desynchronized (SIGABRT)
Description
selks-user@SELKS:~/Downloads$ suricata --build-info
This is Suricata version 4.1.0-dev (rev 8709a20d)
Features: NFQ PCAP_SET_BUFF AF_PACKET HAVE_PACKET_FANOUT LIBCAP_NG LIBNET1.1 HAVE_HTP_URI_NORMALIZE_HOOK PCRE_JIT HAVE_NSS HAVE_LUA HAVE_LUAJIT HAVE_LIBJANSSON TLS MAGIC RUST
SIMD support: none
Atomic intrisics: 1 2 4 8 byte(s)
64-bits, Little-endian architecture
GCC version 6.3.0 20170516, C version 199901
compiled with _FORTIFY_SOURCE=2
L1 cache line size (CLS)=64
thread local storage method: __thread
compiled with LibHTP v0.5.28, linked against LibHTP v0.5.28
Suricata Configuration:
AF_PACKET support: yes
eBPF support: no
XDP support: no
PF_RING support: no
NFQueue support: yes
NFLOG support: no
IPFW support: no
Netmap support: no
DAG enabled: no
Napatech enabled: no
WinDivert enabled: no
Unix socket enabled: yes
Detection enabled: yes
Libmagic support: yes
libnss support: yes
libnspr support: yes
libjansson support: yes
liblzma support: yes
hiredis support: yes
hiredis async with libevent: no
Prelude support: no
PCRE jit: yes
LUA support: yes, through luajit
libluajit: yes
libgeoip: yes
Non-bundled htp: yes
Old barnyard2 support: no
Hyperscan support: yes
Libnet support: yes
liblz4 support: yes
Rust support: yes (default)
Rust strict mode: no
Rust debug mode: no
Rust compiler: rustc 1.30.0 (da5f414c2 2018-10-24)
Rust cargo: cargo 1.30.0 (36d96825d 2018-10-24)
Install suricatasc: yes
Install suricata-update: no
Profiling enabled: no
Profiling locks enabled: no
Development settings:
Coccinelle / spatch: no
Unit tests enabled: no
Debug output enabled: no
Debug validation enabled: no
Generic build parameters:
Installation prefix: /usr
Configuration directory: /etc/suricata/
Log directory: /var/log/suricata/
--prefix /usr
--sysconfdir /etc
--localstatedir /var
--datarootdir /usr/share
Host: x86_64-pc-linux-gnu
Compiler: gcc (exec name) / gcc (real)
GCC Protect enabled: yes
GCC march native enabled: no
GCC Profile enabled: no
Position Independent Executable enabled: yes
CFLAGS -g -O2 -fdebug-prefix-map=/STAMUS/SELKS/Suricata/suricata-2019013001=. -fstack-protector-strong -Wformat -Werror=format-security -I${srcdir}/../rust/gen/c-headers
PCAP_CFLAGS -I/usr/include
SECCFLAGS -fstack-protector -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
selks-user@SELKS:~$ gdb /usr/bin/suricata ./core
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 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:
<http://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 /usr/bin/suricata...(no debugging symbols found)...done.
warning: core file may not match specified executable file.
[New LWP 3069]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `suricata -r /home/selks-user/Downloads/Router+192_168_10_1.pcap -k none -l /hom'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) set logging on
Copying output to gdb.txt.
(gdb) thread apply all bt
Thread 1 (Thread 0x7f9df52f0b80 (LWP 3069)):
#0 GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007f9df059c42a in _GI_abort () at abort.c:89
#2 0x00007f9df0593e67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55cb488b63a8 "!((h->use_cnt_sc_atomic) > 0)", file=file@entry=0x55cb488b63c8 "host.c", line=line@entry=309, function=function@entry=0x55cb488b6418 "HostShutdown") at assert.c:92
#3 0x00007f9df0593f12 in GI_assert_fail (assertion=0x55cb488b63a8 "!((h->use_cnt_sc_atomic_) > 0)", file=0x55cb488b63c8 "host.c", line=309, function=0x55cb488b6418 "HostShutdown") at assert.c:101
#4 0x000055cb48629c21 in ?? ()
#5 0x000055cb48504946 in ?? ()
#6 0x00007f9df05882e1 in __libc_start_main (main=0x55cb48503250, argc=9, argv=0x7fff93e59cd8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff93e59cc8) at ../csu/libc-start.c:291
#7 0x000055cb48505f0a in ?? ()
(gdb) quit
Updated by Peter Manev almost 6 years ago
Investigating and further reproducing it with the provided pcap seems to be Stretch/libgc related as if I use any other OS (LTS/Buster) i can't seem to reproduce it.
Updated by Victor Julien over 5 years ago
- Status changed from New to Assigned
- Assignee set to Victor Julien
- Target version set to TBD
Can you share the pcap and instructions?
Updated by sree hari over 5 years ago
Emailed you the link.
suricata -r /home/selks-user/Downloads/Router+192_168_10_1.pcap -k none -l /home/selks-user/Downloads/ --runmode autofp
Updated by Victor Julien about 5 years ago
- Has duplicate Bug #2913: SIGABRT reading a pcap added
Updated by Carl Smith over 4 years ago
We had the same end result (assert due to host use_cnt invalid during shutdown) with IPREP rules where the host use_cnt was becoming very negative due to unbalanced incr/dec.
That fix is here: https://github.com/OISF/suricata/pull/5296
May not be related.
Updated by Peter Manev almost 3 years ago
This is still an issue and it seems to be triggered only when iprep is used.
Updated by Victor Julien over 2 years ago
- Subject changed from sigabrt core. to iprep: use_cnt can get desynchronized (SIGABRT)
- Status changed from Assigned to In Progress
- Target version changed from TBD to 7.0.0-beta1
- Label Needs backport to 5.0, Needs backport to 6.0 added
Updated by Victor Julien over 2 years ago
- Status changed from In Progress to Closed
Updated by Jeff Lucovsky over 2 years ago
- Copied to Bug #5163: iprep: use_cnt can get desynchronized (SIGABRT) added
Updated by Jeff Lucovsky over 2 years ago
- Copied to Bug #5164: iprep: use_cnt can get desynchronized (SIGABRT) added