Describe the question/issue
With the ECS Fargate (v1.4) oftelny is getting the [engine] caught signal (SIGSEGV) issue even when task has enough time for the proper shutdown(grace period 30sec).
Configuration
Fluent Bit Log Output
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.482369276] [debug] [upstream] KA connection #138 to my_cluster-id.eu-west-2.es.amazonaws.com:443 is connected |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06] [engine] caught signal (SIGSEGV) |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.468995880] [ info] [task] emitter/emitter_for_multiline.0 has 0 pending task(s): |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.469030681] [ info] [task] emitter/emitter_for_rewrite_tag has 1 pending task(s): |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.469078429] [ info] [task] task_id=0 still running on route(s): opensearch/Application |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.469141540] [ info] [input:storage_backlog:storage_backlog.4] register emitter.6/1-1772723585.218186378.flb |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.468654247] [ info] [engine] pending chunk count: memory=0, filesystem=1; grace_timer=1 |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.468759761] [ info] [task] tcp/tcp.0 has 0 pending task(s): |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.468815348] [ info] [task] forward/forward.1 has 0 pending task(s): |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.468861331] [ info] [task] forward/forward.2 has 0 pending task(s): |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.468908097] [ info] [task] forward/forward.3 has 0 pending task(s): |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.468941921] [ info] [task] storage_backlog/storage_backlog.4 has 0 pending task(s): |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.464083642] [ warn] [engine] service will shutdown in max 30 seconds |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.464160522] [debug] [engine] task 0 already scheduled to run, not re-scheduling it. |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.464195606] [ info] [engine] pausing all inputs.. |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.464252128] [ info] [input] pausing tcp.0 |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.464314715] [ info] [input] pausing forward.1 |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.464386504] [ info] [input] pausing forward.2 |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.464434241] [debug] [input:forward:forward.3] thread pause instance |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.464569260] [ info] [input] pausing storage_backlog.4 |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.464641587] [ info] [input] pausing emitter_for_multiline.0 |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.464690687] [ info] [input] pausing emitter_for_rewrite_tag |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06.464761710] [debug] [input:forward:forward.3] thread pause instance |
log_router |
| March 5, 2026, 19:13 |
[2026/03/05 15:13:06] [engine] caught signal (SIGTERM) |
|
Fluent Bit Version Info
| March 5, 2026, 19:12 |
Fluent Bit v4.2 – Direct Routes Ahead |
log_router |
| March 5, 2026, 19:12 |
Celebrating 10 Years of Open, Fluent Innovation! |
log_router |
| March 5, 2026, 19:12 |
AWS for Fluent Bit Container Image Version 3.2.0 |
|
Cluster Details
AWS Fargate is used
Application Details
The following Fluent Bit configuration is used(s3 part removed for the better visibility)
[SERVICE]
Flush 5
Grace 30
Daemon Off
Parsers_File /parsers.conf
storage.path /var/log/flb-storage/
storage.sync normal
storage.checksum On
storage.max_chunks_up 512
storage.backlog.mem_limit 10M
storage.backlog.flush_on_shutdown On
scheduler.base 10
scheduler.cap 60
Log_Level debug
[Input]
Name forward
unix_path /var/run/fluent.sock
Mem_Buf_Limit 75MB
threaded true
storage.type memory
[FILTER]
name multiline
Match firelens
multiline.key_content log
mode partial_message
[FILTER]
Name grep
Match firelens
Regex log ^{
[FILTER]
Name parser
Match firelens
Key_Name log
Parser docker
[FILTER]
Name expect
Match firelens
key_exists LogType
action warn
[FILTER]
Name rewrite_tag
Match firelens
Rule $LogType ^(.*) $LogType false
Emitter_Name emitter_for_rewrite_tag
Emitter_Storage.type memory
Emitter_Mem_Buf_Limit 100M
[FILTER]
Name modify
Match Integration
Rename @t t
Rename @m m
Rename @i i
Rename @tr tr
Rename @sp sp
Rename @@ti ti
[FILTER]
Name modify
Match BookingRequests
Rename @t t
Rename @m m
Rename @i i
Rename @tr tr
Rename @sp sp
Rename @@ti ti
[OUTPUT]
Name opensearch
Alias Application
Match Application
Host ${OS_HOST}
Port ${OS_PORT}
AWS_Auth On
AWS_Region ${OS_AWS_REGION}
tls On
Index ${INDEX_PREFIX}-application
Include_Tag_Key Off
Suppress_Type_Name On
Trace_Error On
Trace_Output On
retry_limit 10
workers 1
Buffer_Size 1MB
storage.total_limit_size 1G
[OUTPUT]
Name opensearch
Alias Audit
Match Audit
Host ${OS_HOST}
Port ${OS_PORT}
AWS_Auth On
AWS_Region ${OS_AWS_REGION}
tls On
Index ${INDEX_PREFIX}-audit
Include_Tag_Key Off
Suppress_Type_Name On
Trace_Error On
Trace_Output On
retry_limit 10
workers 1
Buffer_Size 1MB
storage.total_limit_size 500M
Steps to reproduce the issue
Seems when the JSON file is not properly formatted or it doesn't have the json format at all, it throws an error like
[debug] [yyjson->msgpack] read error code=6 msg=unexpected character, expected a JSON value pos=0, but after adding the grep filter to check only files starting with {, it disappears from the logs. But even so the issue persist wihtout that kind of warnings.
With the newer(3.2.3) version, it's the same, but with the aws-for-fluent-bit:2.32.2 version, we haven't had a problem.
Within one ECS task I have 2 containers - this fluent and my application. My application is shutting down gracefully, but the fluent with the 139 exit code.
The only way to workaround this which I have found was storage.type = memory usage.
Describe the question/issue
With the ECS Fargate (v1.4) oftelny is getting the
[engine] caught signal (SIGSEGV)issue even when task has enough time for the proper shutdown(grace period 30sec).Configuration
Fluent Bit Log Output
Fluent Bit Version Info
Cluster Details
AWS Fargate is used
Application Details
The following Fluent Bit configuration is used(s3 part removed for the better visibility)
[SERVICE]
Flush 5
Grace 30
Daemon Off
Parsers_File /parsers.conf
storage.path /var/log/flb-storage/
storage.sync normal
storage.checksum On
storage.max_chunks_up 512
storage.backlog.mem_limit 10M
storage.backlog.flush_on_shutdown On
scheduler.base 10
scheduler.cap 60
Log_Level debug
[Input]
Name forward
unix_path /var/run/fluent.sock
Mem_Buf_Limit 75MB
threaded true
storage.type memory
[FILTER]
name multiline
Match firelens
multiline.key_content log
mode partial_message
[FILTER]
Name grep
Match firelens
Regex log ^{
[FILTER]
Name parser
Match firelens
Key_Name log
Parser docker
[FILTER]
Name expect
Match firelens
key_exists LogType
action warn
[FILTER]
Name rewrite_tag
Match firelens
Rule $LogType ^(.*) $LogType false
Emitter_Name emitter_for_rewrite_tag
Emitter_Storage.type memory
Emitter_Mem_Buf_Limit 100M
[FILTER]
Name modify
Match Integration
Rename @t t
Rename @m m
Rename @i i
Rename @tr tr
Rename @sp sp
Rename @@ti ti
[FILTER]
Name modify
Match BookingRequests
Rename @t t
Rename @m m
Rename @i i
Rename @tr tr
Rename @sp sp
Rename @@ti ti
[OUTPUT]
Name opensearch
Alias Application
Match Application
Host ${OS_HOST}
Port ${OS_PORT}
AWS_Auth On
AWS_Region ${OS_AWS_REGION}
tls On
Index ${INDEX_PREFIX}-application
Include_Tag_Key Off
Suppress_Type_Name On
Trace_Error On
Trace_Output On
retry_limit 10
workers 1
Buffer_Size 1MB
storage.total_limit_size 1G
[OUTPUT]
Name opensearch
Alias Audit
Match Audit
Host ${OS_HOST}
Port ${OS_PORT}
AWS_Auth On
AWS_Region ${OS_AWS_REGION}
tls On
Index ${INDEX_PREFIX}-audit
Include_Tag_Key Off
Suppress_Type_Name On
Trace_Error On
Trace_Output On
retry_limit 10
workers 1
Buffer_Size 1MB
storage.total_limit_size 500M
Steps to reproduce the issue
Seems when the JSON file is not properly formatted or it doesn't have the json format at all, it throws an error like
[debug] [yyjson->msgpack] read error code=6 msg=unexpected character, expected a JSON value pos=0, but after adding the grep filter to check only files starting with {, it disappears from the logs. But even so the issue persist wihtout that kind of warnings.With the newer(3.2.3) version, it's the same, but with the aws-for-fluent-bit:2.32.2 version, we haven't had a problem.
Within one ECS task I have 2 containers - this fluent and my application. My application is shutting down gracefully, but the fluent with the 139 exit code.
The only way to workaround this which I have found was storage.type = memory usage.