Project

General

Profile

Actions

Bug #1354

closed

coredumps on quitting on OpenBSD

Added by Philipp Buehler over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

2.1dev (rev ff8dae3) on OpenBSD/amd64 5.5

1) hitting ctrl-c (or kill(1) the process)
^C26456 29/12/2014 -- 10:40:24 - (suricata.c:2370) <Notice> (main) -- Signal Received. Stopping engine.
Segmentation fault (core dumped)
#0 PacketPoolGetPacket () at tmqh-packetpool.c:205
205 p->pool = pool;
(gdb) bt
#0 PacketPoolGetPacket () at tmqh-packetpool.c:205
#1 0x000013331c33cd9d in PacketPoolDestroy () at tmqh-packetpool.c:312
#2 0x000013331c3388f9 in main (argc=Variable "argc" is not available.
) at suricata.c:2471

2) requesting shutdown via suricatasc

shutdown

[5574] 29/12/2014 -- 10:43:48 - (suricata.c:2370) <Notice> (main) -- Signal Received. Stopping engine.
#0 PktVarFree (pv=0x6769730064695f65) at pkt-var.c:98
98 if (pv->value != NULL)
(gdb) bt
#0 PktVarFree (pv=0x6769730064695f65) at pkt-var.c:98
#1 0x00000e3205e43cd2 in PacketFree (p=0xe320610be43) at decode.c:93
#2 0x00000e3205f3cd53 in PacketPoolDestroy () at tmqh-packetpool.c:302
#3 0x00000e3205f388f9 in main (argc=Variable "argc" is not available.
) at suricata.c:2471

Startup for all three cases:
/home/suricata/bin/suricata --unix-socket=/tmp/suricata.sock
(Note issue 1353 about unix-socket on this platform)

Actions #1

Updated by Philipp Buehler over 9 years ago

Narrowing down; build a debug version and --enable-gccprotect

#0  0x0000056738cf956f in PacketPoolGetPacket () at tmqh-packetpool.c:189
189             p->pool = pool;
(gdb) bt full
#0  0x0000056738cf956f in PacketPoolGetPacket () at tmqh-packetpool.c:189
        p = (Packet *) 0x56738eadc10
        pool = (PktPool *) 0x56942a1c580
#1  0x0000056738cfaa5e in PacketPoolDestroy () at tmqh-packetpool.c:312
        p = (Packet *) 0x0
        my_pool = (PktPool *) 0x56942a1c580
        __func__ = "PacketPoolDestroy" 
#2  0x0000056738cf55d5 in main (argc=3, argv=0x7f7ffffd31e0) at suricata.c:2471
        suri = {run_mode = 13, pcap_dev = '\0' <repeats 127 times>, sig_file = 0x0, sig_file_exclusive = 0, pid_filename = 0x0,
  regex_arg = 0x0, keyword_info = 0x0, runmode_custom_mode = 0x7f7ffffd3343 "single", user_name = 0x0, group_name = 0x0,
  do_setuid = 0 '\0', do_setgid = 0 '\0', userid = 0, groupid = 0, delayed_detect = 0, rule_reload = 0, disabled_detect = 0,
  daemon = 0, offline = 0, verbose = 0, checksum_validation = -1, start_time = {tv_sec = 1419870248, tv_usec = 831439},
  log_dir = 0x56948d82040 "/home/suricata/var/log/suricata/"}
        de_ctx = (DetectEngineCtx *) 0x56939c9a000
        engine_retval = 0
        global_de_ctx = (DetectEngineCtx *) 0x0
        __FUNCTION__ = "main" 
        __func__ = "main" 

Noteworthy to me: p = (Packet *) 0x0 in frame #1
Actions #2

Updated by Victor Julien over 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Victor Julien
  • Target version set to 2.1beta3
Actions #3

Updated by Victor Julien over 9 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by Philipp Buehler over 9 years ago

I can happily confirm that this resolves this issue. Thanks a lot.

Actions

Also available in: Atom PDF