Skip to content

Commit

Permalink
lib: do not forget to initialize TLS keys for output plugins (#1862)
Browse files Browse the repository at this point in the history
I noticed that unit tests for macOS were failing on Travis CI with
the following error message.

    No output has been received in the last 10m0s, this potentially
    indicates a stalled build or something wrong with the build itself.

It turned out that we introduced a new TLS variable in 30d271e,
but never added a code path to initialized it. This was causing
runtime test programs to deadlock on flb_start().

This should fix it.

Signed-off-by: Fujimoto Seiji <fujimoto@clear-code.com>
  • Loading branch information
Fujimoto Seiji authored and edsiper committed Jan 13, 2020
1 parent a1b5344 commit 5f2662b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flb_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ int flb_start(flb_ctx_t *ctx)
struct mk_event *event;
struct flb_config *config;

pthread_once(&flb_lib_once, flb_thread_prepare);
pthread_once(&flb_lib_once, flb_init_env);

config = ctx->config;
ret = mk_utils_worker_spawn(flb_lib_worker, config, &tid);
Expand Down

0 comments on commit 5f2662b

Please sign in to comment.