fluent-bit icon indicating copy to clipboard operation
fluent-bit copied to clipboard

Crash Output + Forward + TLS + ARM

Open pcasaspere opened this issue 1 year ago • 2 comments

Bug Report

Describe the bug When I use OUTPUT + FORWARD + TLS on my Raspberry Pi armv7, I experience a SIGSEGV error. I've tried to run it with same setup into another system, like ubuntu 24.04 amd64, and it've ran without crash.

To Reproduce Client config

[SERVICE]
    flush        1
    log_level trace    
    parsers_file parsers.conf

[INPUT]
    Name   dummy
    Tag    dummy
    Samples 3
    Dummy {"message": "custom dummy"}
    Flush_on_startup true

[OUTPUT]
    Name          forward
    Match         *
    Host          xxx.xxx.xxx.xxx
    Port          242244
    tls           on
    tls.verify    off
    tls.debug     4

Server config

[SERVICE]
    flush        1
    log_level    info
    parsers_file parsers.conf
    plugins_file plugins.conf

[INPUT]
    Name              forward
    Listen            0.0.0.0
    Port              24224
    Buffer_Chunk_Size 1M
    Buffer_Max_Size   6M
    tls               on
    tls.verify        off
    tls.crt_file      /etc/fluent-bit/certs/server.crt
    tls.key_file      /etc/fluent-bit/certs/server.key
  • Steps to reproduce the problem:
/opt/fluent-bit/bin/fluent-bit -c fluent-bit.conf
Fluent Bit v3.0.3
* Copyright (C) 2015-2024 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

___________.__                        __    __________.__  __          ________  
\_   _____/|  |  __ __   ____   _____/  |_  \______   \__|/  |_  ___  _\_____  \ 
 |    __)  |  | |  |  \_/ __ \ /    \   __\  |    |  _/  \   __\ \  \/ / _(__  < 
 |     \   |  |_|  |  /\  ___/|   |  \  |    |    |   \  ||  |    \   / /       \
 \___  /   |____/____/  \___  >___|  /__|    |______  /__||__|     \_/ /______  /
     \/                     \/     \/               \/                        \/ 

[2024/05/02 19:37:58] [ info] Configuration:
[2024/05/02 19:37:58] [ info]  flush time     | 1.000000 seconds
[2024/05/02 19:37:58] [ info]  grace          | 5 seconds
[2024/05/02 19:37:58] [ info]  daemon         | 0
[2024/05/02 19:37:58] [ info] ___________
[2024/05/02 19:37:58] [ info]  inputs:
[2024/05/02 19:37:58] [ info]      dummy
[2024/05/02 19:37:58] [ info] ___________
[2024/05/02 19:37:58] [ info]  filters:
[2024/05/02 19:37:58] [ info] ___________
[2024/05/02 19:37:58] [ info]  outputs:
[2024/05/02 19:37:58] [ info]      forward.0
[2024/05/02 19:37:58] [ info] ___________
[2024/05/02 19:37:58] [ info]  collectors:
[2024/05/02 19:37:58] [ info] [fluent bit] version=3.0.3, commit=, pid=13380
[2024/05/02 19:37:58] [debug] [engine] coroutine stack size: 24576 bytes (24.0K)
[2024/05/02 19:37:58] [ info] [storage] ver=1.5.2, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2024/05/02 19:37:58] [ info] [cmetrics] version=0.9.0
[2024/05/02 19:37:58] [ info] [ctraces ] version=0.5.1
[2024/05/02 19:37:58] [ info] [input:dummy:dummy.0] initializing
[2024/05/02 19:37:58] [ info] [input:dummy:dummy.0] storage_strategy='memory' (memory only)
[2024/05/02 19:37:58] [debug] [dummy:dummy.0] created event channels: read=21 write=22
[2024/05/02 19:37:58] [trace] [input chunk] update output instances with new chunk size diff=43, records=1, input=dummy.0
[2024/05/02 19:37:58] [debug] [forward:forward.0] created event channels: read=23 write=24
[2024/05/02 19:37:58] [ info] [sp] stream processor started
[2024/05/02 19:37:58] [ info] [output:forward:forward.0] worker #0 started
[2024/05/02 19:37:58] [ info] [output:forward:forward.0] worker #1 started
[2024/05/02 19:37:58] [trace] [task 0x75344d80] created (id=0)
[2024/05/02 19:37:58] [debug] [task] created task=0x75344d80 id=0 OK
[2024/05/02 19:37:58] [debug] [output:forward:forward.0] task_id=0 assigned to thread #0
[2024/05/02 19:37:58] [trace] [input chunk] update output instances with new chunk size diff=43, records=1, input=dummy.0
[2024/05/02 19:37:58] [debug] [output:forward:forward.0] request 43 bytes to flush
[2024/05/02 19:37:58] [trace] [upstream] get new connection for xxx.xxx.xxx.xxxx:242244, net setup:
net.connect_timeout        = 10 seconds
net.source_address         = any
net.keepalive              = enabled
net.keepalive_idle_timeout = 30 seconds
net.max_worker_connections = 0
[2024/05/02 19:37:58] [trace] [net] connection #49 in process to xxx.xxx.xxx.xxxx:242244
[2024/05/02 19:37:58] [trace] [engine] resuming coroutine=0x7524b000
[2024/05/02 19:37:58] [engine] caught signal (SIGSEGV)

Expected behavior I expected run like amd64 arch.

Your Environment

  • Version used: v3.0.3 (client && server)
  • Operating System and version:
  • Client: Raspberry Pi 2 Model B ARMv7 - Debian Bullseye 11.9
  • Server: VPS - Ubuntu Server 24.04 AMD64

pcasaspere avatar May 02 '24 18:05 pcasaspere

I wonder if this is related to https://github.com/fluent/fluent-bit/issues/8785?

patrick-stephens avatar May 03 '24 13:05 patrick-stephens

I have done more testing. I'm not sure if it's the same problem.

This crash only happens when I use TLS or "Shared_Key" on the FORWARD protocol in my output configuration. If I don't use this settings FORWARD work fine.

pcasaspere avatar May 03 '24 13:05 pcasaspere

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

github-actions[bot] avatar Aug 03 '24 01:08 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Aug 17 '24 01:08 github-actions[bot]