-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Bug Report
if flb_input_chunk_get_tag() returns -1, its not handled in flb_input_chunk_destroy() resulting in SIGSEGV as shown below
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 29373]
0x00007f0c4dd5a1f5 in XXH3_hashLong_64b_default.constprop.9 () from /lib/libfluent-bit.so
(gdb) bt
#0 0x00007f0c4dd5a1f5 in XXH3_hashLong_64b_default.constprop.9 () at /lib/libfluent-bit.so
#1 0x00007f0c4dd08529 in flb_hash_del_ptr () at /lib/libfluent-bit.so
#2 0x00007f0c4dd0f9bc in flb_input_chunk_destroy () at /lib/libfluent-bit.so
#3 0x00007f0c4dd1d08c in flb_task_destroy () at /lib/libfluent-bit.so
#4 0x00007f0c4dd0fcee in flb_input_chunk_find_space_new_data () at /lib/libfluent-bit.so
#5 0x00007f0c4dd0fdc4 in flb_input_chunk_place_new_chunk () at /lib/libfluent-bit.so
#6 0x00007f0c4dd1047f in flb_input_chunk_append_raw () at /lib/libfluent-bit.so
#7 0x00007f0c4dd7ccf0 in in_lib_collect () at /lib/libfluent-bit.so
#8 0x00007f0c4dd0ef35 in flb_input_collector_fd () at /lib/libfluent-bit.so
#9 0x00007f0c4dd1b104 in flb_engine_start () at /lib/libfluent-bit.so
#10 0x00007f0c4dd061d1 in flb_lib_worker () at /lib/libfluent-bit.so
#11 0x00007f0c5779bea5 in start_thread () at /lib64/libpthread.so.0
#12 0x00007f0c4d9c98dd in clone () at /lib64/libc.so.6
(gdb)
To Reproduce
- Steps to reproduce the problem:
The server is down, so the logs are being stored in disk, after it reaches storage.total_limit_size, when its destroying old chunks, it seg faulting.
I
Expected behavior
should not crash
Your Environment
- Version used: Repository at commit: https://github.com/fluent/fluent-bit/tree/4138b63901868dd5525ef0094dbc366488c92ae4
- Running as a library in centos 7
- 1 input plugin(lib), 1 output plugin(syslog)
- storage.type filesystem
- mem_buf_limit 50M
- storage.total_limit_size 50M
- Flush 1