# File-store core dumping on specific pcap

**URL:** <https://forum.suricata.io/t/file-store-core-dumping-on-specific-pcap/2587>\
**Category:** Help\
**Tags:** suricata\
**Created:** [June 23, 2022, 11:13am UTC](https://forum.suricata.io/t/file-store-core-dumping-on-specific-pcap/2587 "2022-06-23T11:13:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sheru](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/sheru/32/1491_2.png) [@Sheru](https://forum.suricata.io/u/Sheru)\
**Post date:** [June 23, 2022, 11:13am UTC](https://forum.suricata.io/t/file-store-core-dumping-on-specific-pcap/2587/1 "2022-06-23T11:13:32Z")

</div>

Hello,

I’m currently experiencing a problem with suricata 6.0.4 and suricata 6.0.5 both built from source.

While playing this pcap ( [BigFlows Pcap](https://tcpreplay.appneta.com/wiki/captures.html#bigflows-pcap) ), suricata will core.

Environment:  
Linux Debian 11

Configuration of build:

```auto
./configure --enable-pie --disable-gccmarch-native --enable-gccprotect --with-libnss-libraries=/usr/lib --with-libnss-includes=/usr/include/nss/ --with-libnspr-libraries=/usr/lib --with-libnspr-includes=/usr/include/nspr --prefix=/usr --sysconfdir=/etc --localstatedir=/var

```

After analyzing the core, this is what I found:

```auto
gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00005555556e874b in CloseFile (file=<optimized out>, file=<optimized out>,
    f=<optimized out>, f=<optimized out>, p=<optimized out>) at output-filedata.c:137
#2 0x00005555556e89f2 in OutputFiledataLogFfc (tv=tv@entry=0x555556adf000,
    td=td@entry=0x7fffc10d5ff0, p=p@entry=0x7fffede84200, ffc=<optimized out>,
    call_flags=8 '\b', file_close=<optimized out>, file_trunc=false, dir=8 '\b')
    at output-filedata.c:218
#3 0x00005555556e8af7 in OutputFiledataLog (tv=0x555556adf000, p=0x7fffede84200,
    thread_data=0x7fffc10d5ff0) at output-filedata.c:253
#4 0x00005555556e7bb4 in OutputLoggerLog (tv=tv@entry=0x555556adf000,
    p=p@entry=0x7fffede84200, thread_data=<optimized out>) at output.c:882
#5 0x00005555556dc478 in FlowWorker (tv=0x555556adf000, p=0x7fffede84200, data=0x7fffcffffab0)
    at flow-worker.c:563
#6 0x00005555557282a2 in TmThreadsSlotVarRun (tv=tv@entry=0x555556adf000,
    p=p@entry=0x7fffede84200, slot=slot@entry=0x555556adf130) at tm-threads.c:117
#7 0x0000555555729e55 in TmThreadsSlotVar (td=0x555556adf000) at tm-threads.c:463
#8 0x00007ffff7d7cfa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#9 0x00007ffff7789eff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

gdb) frame 1
#1 0x00005555556e874b in CloseFile (file=<optimized out>, file=<optimized out>,
    f=<optimized out>, f=<optimized out>, p=<optimized out>) at output-filedata.c:137
137 void *txv = AppLayerParserGetTx(p->proto, f->alproto, f->alstate, file->txid);

```

I’m using file-store configured like this:

```auto
  - file-store:
      version: 2
      enabled: yes

      force-filestore: yes

```

I have reproduced it while playing using:

```auto
suricata -c /etc/suricata/conf/suricata.yaml -r bigFlows.pcap --runmode autofp

```

and while playing the pcap through tirex and suricata run with:

```auto
suricata --af-packet -c /etc/suricata/conf/suricata.yaml --user=<UID> -D 

```

With the following rule (a bit greedy I admit)

```auto
alert http any any -> any any (msg:"FILE store all"; filestore; sid:1; rev:1;)

```

If I disable file-store, I don’t core.

I’m going to continue investigating with valgrind/helgrind to provide further analysis.

---

<div class="post-metadata">

**Author:** ![Jeff\_Lucovsky](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jeff_lucovsky/32/11_2.png) [@Jeff\_Lucovsky](https://forum.suricata.io/u/Jeff_Lucovsky)\
**Post date:** [June 25, 2022, 1:40pm UTC](https://forum.suricata.io/t/file-store-core-dumping-on-specific-pcap/2587/2 "2022-06-25T13:40:57Z")

</div>

> [@Sheru](#):
>
> BigFlows Pcap

Thanks for reporting this; I’ve created an issue in our bug tracking system: [Security #5408: filestore: Segfault with filestore enabled and forced - Suricata - Open Information Security Foundation](https://redmine.openinfosecfoundation.org/issues/5408)

Feel free to add more context/information to the issue.
