fluent-bit: Fluent-Bit Crashes when using opentelemetry logs output (version 2.0.6)
Bug Report
Fluent bit crashes when using the opentelemetry output plugin, but only with logs. If the dummy input is omitted, it will not crash
fluent-bit-fluent-bit-1 | Fluent Bit v2.0.6
fluent-bit-fluent-bit-1 | * Copyright (C) 2015-2022 The Fluent Bit Authors
fluent-bit-fluent-bit-1 | * Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
fluent-bit-fluent-bit-1 | * https://fluentbit.io
fluent-bit-fluent-bit-1 |
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] Configuration:
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] flush time | 1.000000 seconds
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] grace | 5 seconds
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] daemon | 0
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] ___________
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] inputs:
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] node_exporter_metrics
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] dummy
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] ___________
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] filters:
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] ___________
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] outputs:
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] opentelemetry.0
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] ___________
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] collectors:
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [fluent bit] version=2.0.6, commit=211f841fe2, pid=1
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [debug] [engine] coroutine stack size: 24576 bytes (24.0K)
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [storage] created root path /fluent-bit/run/buffer
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [storage] ver=1.3.0, type=memory+filesystem, sync=normal, checksum=off, max_chunks_up=128
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [storage] backlog input plugin: storage_backlog.2
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [cmetrics] version=0.5.7
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [ctraces ] version=0.2.5
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [input:node_exporter_metrics:node_exporter_metrics.0] initializing
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [input:node_exporter_metrics:node_exporter_metrics.0] storage_strategy='memory' (memory only)
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [debug] [node_exporter_metrics:node_exporter_metrics.0] created event channels: read=21 write=22
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [input:node_exporter_metrics:node_exporter_metrics.0] path.procfs = /proc
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [input:node_exporter_metrics:node_exporter_metrics.0] path.sysfs = /sys
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [input:dummy:dummy.1] initializing
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [input:dummy:dummy.1] storage_strategy='memory' (memory only)
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [debug] [dummy:dummy.1] created event channels: read=23 write=24
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ warn] [input:dummy:dummy.1] data is incomplete. Use default string.
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [input:storage_backlog:storage_backlog.2] initializing
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [input:storage_backlog:storage_backlog.2] storage_strategy='memory' (memory only)
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [debug] [storage_backlog:storage_backlog.2] created event channels: read=25 write=26
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [ info] [input:storage_backlog:storage_backlog.2] queue memory limit: 95.4M
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [debug] [opentelemetry:opentelemetry.0] created event channels: read=27 write=28
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [debug] [router] match rule node_exporter_metrics.0:opentelemetry.0
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [debug] [router] match rule dummy.1:opentelemetry.0
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:58] [debug] [router] match rule storage_backlog.2:opentelemetry.0
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:59] [ info] [http_server] listen iface=0.0.0.0 tcp_port=2020
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:59] [ info] [sp] stream processor started
fluent-bit-fluent-bit-1 | [2022/12/06 22:05:59] [debug] [input chunk] update output instances with new chunk size diff=26
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [task] created task=0x7fad3003e420 id=0 OK
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram0
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram1
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram2
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram3
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram4
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram5
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram6
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram7
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram8
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram9
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram10
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram11
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram12
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram13
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram14
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: ram15
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: loop0
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: loop1
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: loop2
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: loop3
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: loop4
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: loop5
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: loop6
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: loop7
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input:node_exporter_metrics:node_exporter_metrics.0] skip device: vda1
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input chunk] update output instances with new chunk size diff=48502
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [debug] [input chunk] update output instances with new chunk size diff=26
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [engine] caught signal (SIGSEGV)
fluent-bit-fluent-bit-1 | [2022/12/06 22:06:00] [engine] caught signal (SIGSEGV)
fluent-bit-fluent-bit-1 | #0 0x7fad3710c5bd in ???() at ???:0
fluent-bit-fluent-bit-1 | #1 0x7fad3710eed0 in ???() at ???:0
fluent-bit-fluent-bit-1 | #2 0x561d83f05f7b in flb_calloc() at include/fluent-bit/flb_mem.h:88
fluent-bit-fluent-bit-1 | #3 0x561d83f0ab9e in flush_to_otel() at plugins/out_opentelemetry/opentelemetry.c:668
fluent-bit-fluent-bit-1 | #4 0x561d83f0aed9 in process_logs() at plugins/out_opentelemetry/opentelemetry.c:762
fluent-bit-fluent-bit-1 | #5 0x561d83f0bb4c in cb_opentelemetry_flush() at plugins/out_opentelemetry/opentelemetry.c:992
fluent-bit-fluent-bit-1 | #6 0x561d83b2b4ca in output_pre_cb_flush() at include/fluent-bit/flb_output.h:524
fluent-bit-fluent-bit-1 | #7 0x561d84564b06 in co_init() at lib/monkey/deps/flb_libco/amd64.c:117
fluent-bit-fluent-bit-1 | #8 0xffffffffffffffff in ???() at ???:0
fluent-bit-fluent-bit-1 exited with code 139
Steps to reproduce
run docker-compose up with the following files
docker-compose.yml
version: "3.7"
services:
fluent-bit:
image: fluent/fluent-bit:2.0.6
volumes:
- ./fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf
depends_on:
- opentelemetry
opentelemetry:
image: otel/opentelemetry-collector-contrib
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "1889:1888" # pprof extension
- "8893:8888" # Prometheus metrics exposed by the collector
- "8894:8889" # Prometheus exporter metrics
- "13134:13133" # health_check extension
- "4322:4317" # OTLP gRPC receiver
- "4323:4318" # OTLP http receiver
- "55680:55679" # zpages extension
fluent-bit.conf
[SERVICE]
Parsers_File /fluent-bit/etc/parsers.conf
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_Port 2020
Health_Check On
storage.path /fluent-bit/run/buffer
storage.metrics on
Log_Level debug
[INPUT]
Name node_exporter_metrics
Tag node_metrics
Scrape_interval 2
[INPUT]
Name dummy
Tag dummy.log
Rate 1
Dummy {"key": ["val1", 1, 2.3], "key2": "val2"}
[OUTPUT]
Name opentelemetry
Match *
Host opentelemetry
Port 4318
Metrics_uri /v1/metrics
Logs_uri /v1/logs
Traces_uri /v1/traces
Log_response_payload True
Tls Off
Tls.verify Off
otel-collector-config.yaml
receivers:
otlp:
protocols:
grpc:
include_metadata: true
http:
include_metadata: true
processors:
batch:
resource:
attributes:
- key: host.name
value: "fluent bit"
action: upsert
exporters:
logging:
verbosity: detailed
sampling_initial: 5
sampling_thereafter: 200
service:
telemetry:
logs:
level: "debug"
encoding: json
metrics:
level: detailed
pipelines:
metrics/multi:
receivers: [otlp]
processors: [resource, batch]
exporters: [logging]
logs:
receivers: [otlp]
processors: [resource, batch]
exporters: [logging]
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (7 by maintainers)
Taking a look
Using the helm chart @Syn3rman with 2.0.8 and the following config
this causes crashes
It is hard coded but I will open a PR to move it to config param