Azure Blob crashing
Bug Report
Describe the bug During initialization of the azure blob plugin with the following configuration, fluent bit crashes.
To Reproduce
Crashes during initialization.
- Example log message if applicable:
"[2024/10/17 15:25:20] [ info] [sp] stream processor started
[2024/10/17 15:25:20] [ info] [output:azure_blob:azure_blob.0] initializing worker
[2024/10/17 15:25:20] [ info] upload time: 5
[2024/10/17 15:25:20] [ info] [output:azure_blob:azure_blob.0] worker #0 started
[2024/10/17 15:25:22] [debug] [input:blob:blob.0] scanning path /home/xzgxlj/Desktop/ddc-fluentbit/bin/*
[2024/10/17 15:25:22] [debug] [input:blob:blob.0] blob scan add: /home/xzgxlj/Desktop/ddc-fluentbit/bin/azure_config.conf, inode 39813057
[2024/10/17 15:25:22] [debug] [input:blob:blob.0] blob scan add: /home/xzgxlj/Desktop/ddc-fluentbit/bin/fluent-bit, inode 39813054
[2024/10/17 15:25:22] [debug] [input:blob:blob.0] blob scan add: /home/xzgxlj/Desktop/ddc-fluentbit/bin/input_files.db, inode 39813056
[2024/10/17 15:25:24] [debug] [input:blob:blob.0] scanning path /home/xzgxlj/Desktop/ddc-fluentbit/bin/*
[2024/10/17 15:25:24] [debug] [input:blob:blob.0] blob scan add: /home/xzgxlj/Desktop/ddc-fluentbit/bin/azure_config.conf, inode 39813057
[2024/10/17 15:25:24] [debug] [input:blob:blob.0] blob scan add: /home/xzgxlj/Desktop/ddc-fluentbit/bin/fluent-bit, inode 39813054
[2024/10/17 15:25:24] [debug] [input:blob:blob.0] blob scan add: /home/xzgxlj/Desktop/ddc-fluentbit/bin/input_files.db, inode 39813056
[2024/10/17 15:25:25] [engine] caught signal (SIGSEGV)
#0 0x557633794c75 in sqlite3_clear_bindings() at lib/sqlite-amalgamation-3450200/sqlite3.c:90035
#1 0x55763342049d in azb_db_file_get_next_stale() at plugins/out_azure_blob/azure_blob_db.c:520
#2 0x557633408fb6 in cb_azb_blob_file_upload() at plugins/out_azure_blob/azure_blob.c:736
#3 0x5576331a051e in sched_timer_coro_cb_run() at include/fluent-bit/flb_scheduler.h:283
#4 0x5576339311ea in co_init() at lib/monkey/deps/flb_libco/amd64.c:117
#5 0xffffffffffffffff in ???() at ???:0
Aborted"
- Steps to reproduce the problem:
Upload the configuration file used by fluent bit. Also occurs with other files. N/A, set the configuration below.
Expected behavior No crash.
Screenshots
Your Environment
- Version used: 3.2.0 (master) *Configuration:
[SERVICE] log_level debug flush 3
[INPUT] name blob path /home/user/Desktop/bin/files/* database_file input_files.db upload_success_action suffix upload_success_suffix .done
[OUTPUT] name azure_blob match * endpoint http://127.0.0.1:10000 path output container_name test shared_key account_name devstoreaccount1 emulator_mode true
- Environment name and version (e.g. Kubernetes? What version?): N/A
- Server type and version: N/A
- Operating System and version: Ubuntu 22, QNX7.1
- Filters and plugins: See configuration
Additional context
hi @LACrea, can you clarify what you mean by:
Upload the configuration file used by fluent bit. Also occurs with other files. N/A, set the configuration below.
What's your working directory? i.e. where the database_file is being created.
Are you doing any other operation over the database_file (input_files.db) when starting Fluent Bit?
Hi José,
We added the database configuration which resolves the crash.
I would recommend that mandatory configuration fields are checked during initialization and report errors as opposed to crashing fluent bit.
@LACrea thanks for the report, we will make sure to update the code (cc: @leonardo-albertovich )
Hi @LACrea could you please clarify your config to reproduce? I've tried deleting the db file and not configuring the parameter, but it still not crashing. We appreciate your report and help to troubleshoot this.
Hi Lucas, I believe this was fixed with https://github.com/fluent/fluent-bit/commit/8f1fd00d07e676b74d33c0c26a121a0bf654383e and https://github.com/fluent/fluent-bit/commit/aadaf1c071c41198c08f5214708d4ee8ecd07f47. Let us know if that's not the case.