SIGSEGV on Loki output when using $TAG for labels #3290
Closed
Description
Bug Report
Describe the bug
If I use $TAG in labels for loki output, I get SIGSEGV
I have tried docker and 'native' app, 1.7.2 and 1.7.0. In any case result is the same.
If I replace
To Reproduce
- sample config:
[INPUT]
Name dummy
Tag testapp
[OUTPUT]
Name loki
Match *
host lokihost
labels job=$TAG
-
Steps to reproduce the problem:
fluent-bit -c sample.conf -
Sample output:
Fluent Bit v1.7.2
* Copyright (C) 2019-2021 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io
[2021/03/26 12:29:18] [ info] [engine] started (pid=1)
[2021/03/26 12:29:18] [ info] [storage] version=1.1.1, initializing...
[2021/03/26 12:29:18] [ info] [storage] in-memory
[2021/03/26 12:29:18] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2021/03/26 12:29:18] [ info] [output:loki:loki.0] configured, hostname=lokihost:3100
[2021/03/26 12:29:18] [ info] [sp] stream processor started
[2021/03/26 12:29:23] [engine] caught signal (SIGSEGV)
#0 0x5630ec26cc4a in flb_ra_get_kv_pair() at src/flb_record_accessor.c:613
#1 0x5630ec26e83c in flb_mp_accessor_keys_remove() at src/flb_mp.c:450
#2 0x5630ec2ccc02 in pack_record() at plugins/out_loki/loki.c:819
#3 0x5630ec2cd396 in loki_compose_payload() at plugins/out_loki/loki.c:1035
#4 0x5630ec2cd456 in cb_loki_flush() at plugins/out_loki/loki.c:1062
#5 0x5630ec2464da in output_pre_cb_flush() at include/fluent-bit/flb_output.h:466
#6 0x5630ec6e4fc6 in co_init() at lib/monkey/deps/flb_libco/amd64.c:117
#7 0xffffffffffffffff in ???() at ???:0
Expected behavior
to work
Your Environment
- Version used:1.7.2
- Configuration: included above ^
- Operating System and version: Ubuntu20.04 or docker image
- Filters and plugins: loki output