-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
Bug Report
Describe the bug
Fluent Bit crashes with a segmentation fault (SIGSEGV) when a log sent via OTLP/gRPC contains a KeyValue with no value set.
To Reproduce
Send the following log using OpenTelemetry gRPC (protos directory contains OTLP .proto files):
grpcurl -plaintext \
-import-path './protos' \
-proto './protos/opentelemetry/proto/collector/v1/logs/v1/logs_service.proto' \
-d '{
"resourceLogs": [
{
"scopeLogs": [
{
"scope": {},
"logRecords": [
{
"timeUnixNano": "1722904465173450100",
"body": {
"kvlistValue": {
"values": [
{
"key": "key_1"
}
]
}
}
}
]
}
]
}
]
}' \
localhost:4317 opentelemetry.proto.collector.logs.v1.LogsService/ExportFluent Bit crashes with the following stack trace:
Fluent Bit v4.0.5
* Copyright (C) 2015-2025 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io
______ _ _ ______ _ _ ___ _____
| ___| | | | | ___ (_) | / || _ |
| |_ | |_ _ ___ _ __ | |_ | |_/ /_| |_ __ __/ /| || |/' |
| _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| || /| |
| | | | |_| | __/ | | | |_ | |_/ / | |_ \ V /\___ |\ |_/ /
\_| |_|\__,_|\___|_| |_|\__| \____/|_|\__| \_/ |_(_)___/
[2025/08/01 17:56:17] [ info] Configuration:
[2025/08/01 17:56:17] [ info] flush time | 1.000000 seconds
[2025/08/01 17:56:17] [ info] grace | 5 seconds
[2025/08/01 17:56:17] [ info] daemon | 0
[2025/08/01 17:56:17] [ info] ___________
[2025/08/01 17:56:17] [ info] inputs:
[2025/08/01 17:56:17] [ info] opentelemetry
[2025/08/01 17:56:17] [ info] ___________
[2025/08/01 17:56:17] [ info] filters:
[2025/08/01 17:56:17] [ info] ___________
[2025/08/01 17:56:17] [ info] outputs:
[2025/08/01 17:56:17] [ info] stdout.0
[2025/08/01 17:56:17] [ info] ___________
[2025/08/01 17:56:17] [ info] collectors:
[2025/08/01 17:56:17] [ info] [fluent bit] version=4.0.5, commit=d9be919eab, pid=1
[2025/08/01 17:56:17] [debug] [engine] coroutine stack size: 196608 bytes (192.0K)
[2025/08/01 17:56:17] [ info] [storage] ver=1.5.3, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2025/08/01 17:56:17] [ info] [simd ] NEON
[2025/08/01 17:56:17] [ info] [cmetrics] version=1.0.4
[2025/08/01 17:56:17] [ info] [ctraces ] version=0.6.6
[2025/08/01 17:56:17] [ info] [input:opentelemetry:opentelemetry.0] initializing
[2025/08/01 17:56:17] [ info] [input:opentelemetry:opentelemetry.0] storage_strategy='memory' (memory only)
[2025/08/01 17:56:17] [debug] [opentelemetry:opentelemetry.0] created event channels: read=25 write=26
[2025/08/01 17:56:17] [debug] [downstream] listening on 0.0.0.0:4317
[2025/08/01 17:56:17] [ info] [input:opentelemetry:opentelemetry.0] listening on 0.0.0.0:4317
[2025/08/01 17:56:17] [debug] [stdout:stdout.0] created event channels: read=28 write=29
[2025/08/01 17:56:17] [ info] [sp] stream processor started
[2025/08/01 17:56:17] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
[2025/08/01 17:56:17] [ info] [output:stdout:stdout.0] worker #0 started
[2025/08/01 17:56:41] [engine] caught signal (SIGSEGV)
#0 0xacce547f2b6f in otel_pack_kvlist() at plugins/in_opentelemetry/opentelemetry_logs.c:106
#1 0xacce547f2b6f in otlp_pack_any_value() at plugins/in_opentelemetry/opentelemetry_logs.c:167
#2 0xacce547f3537 in binary_payload_to_msgpack() at plugins/in_opentelemetry/opentelemetry_logs.c:530
#3 0xacce547f3537 in opentelemetry_process_logs() at plugins/in_opentelemetry/opentelemetry_logs.c:639
#4 0xacce547f2047 in opentelemetry_prot_handle_ng() at plugins/in_opentelemetry/opentelemetry_prot.c:1272
#5 0xacce548eadcf in flb_http_server_client_activity_event_handler() at src/http_server/flb_http_server.c:225
#6 0xacce5476a3b3 in flb_engine_start() at src/flb_engine.c:1131
#7 0xacce54746de3 in flb_lib_worker() at src/flb_lib.c:835
#8 0xf1bb81ecee9f in ???() at ???:0
#9 0xf1bb81f37b1b in ???() at ???:0
#10 0xffffffffffffffff in ???() at ???:0
Expected behavior
Logs should be successfully received and correctly handled.
Screenshots
N/A
Your Environment
- Version used: v4.0.5
- Configuration:
service:
log_level: trace
pipeline:
inputs:
- name: opentelemetry
port: 4317
outputs:
- name: stdout
match: '*'- Environment name and version (e.g. Kubernetes? What version?): Docker
- Server type and version: N/A
- Operating System and version: fluent/fluent-bit:4.0.5
- Filters and plugins: built-in OpenTelemetry input plugin
Reactions are currently unavailable