Skip to content

Conversation

@github-actions
Copy link

Automated changes by create-pull-request GitHub action

@github-actions
Copy link
Author

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Oct 26, 2022
seveas pushed a commit that referenced this pull request Nov 7, 2024
The tls variable for out_flush_params is not initialized as the
flb_start function is not called during the dry run. Call flb_init
directly and then shutdown the engine.

configuration test is successful
=================================================================
==63633==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x0001f71b3ac0 in thread T0
    #0 0x103c9f260 in wrap_free+0x98 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x53260)
    #1 0x100179d9c in flb_free flb_mem.h:127
    #2 0x10017f4a0 in flb_output_exit flb_output.c:481
    #3 0x1001cb038 in flb_engine_shutdown flb_engine.c:1119
    #4 0x10010d45c in flb_destroy flb_lib.c:240
    #5 0x100008c40 in flb_main fluent-bit.c:1348
    #6 0x10000c644 in main fluent-bit.c:1456
    #7 0x18f11e0dc  (<unknown module>)

frame #6: 0x000000010017f4a4 fluent-bit`flb_output_exit(config=0x0000000102b00200) at flb_output.c:481:9
   478
   479 	    params = FLB_TLS_GET(out_flush_params);
   480 	    if (params) {
-> 481 	        flb_free(params);
   482 	    }
   483 	}

Signed-off-by: Holger Hans Peter Freyther <[email protected]>
nourdouf pushed a commit that referenced this pull request Sep 15, 2025
Without TLS initialization, we got the following error on macOS:

```
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000100b0defc flb-it-stream_processor`_mk_event_timeout_create(ctx=0x0000000000000000, sec=0, nsec=500000000, data=0x0000600001608460) at mk_event_kqueue.c:222:23
   219         EV_SET(&ke, fd, EVFILT_TIMER, EV_ADD, 0, (sec * 1000) + (nsec / 1000000) , event);
   220     #endif
   221
-> 222         ret = kevent(ctx->kfd, &ke, 1, NULL, 0, NULL);
   223         if (ret < 0) {
   224             close(fd);
   225             mk_libc_error("kevent");
Target 0: (flb-it-stream_processor) stopped.
```

This can be plugged by TLS initialization for eventloop.

Signed-off-by: Hiroshi Hatake <[email protected]>
nourdouf pushed a commit that referenced this pull request Sep 23, 2025
Without TLS initialization, we got the following error on macOS:

```
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000100b0defc flb-it-stream_processor`_mk_event_timeout_create(ctx=0x0000000000000000, sec=0, nsec=500000000, data=0x0000600001608460) at mk_event_kqueue.c:222:23
   219         EV_SET(&ke, fd, EVFILT_TIMER, EV_ADD, 0, (sec * 1000) + (nsec / 1000000) , event);
   220     #endif
   221
-> 222         ret = kevent(ctx->kfd, &ke, 1, NULL, 0, NULL);
   223         if (ret < 0) {
   224             close(fd);
   225             mk_libc_error("kevent");
Target 0: (flb-it-stream_processor) stopped.
```

This can be plugged by TLS initialization for eventloop.

Signed-off-by: Hiroshi Hatake <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants