Skip to content

Commit

Permalink
avoid PTHREAD_CANCEL_ASYNCHRONOUS
Browse files Browse the repository at this point in the history
this leads to crashes sometimes:

    #0  0x00007ffff6f56387 in raise () from /lib64/libc.so.6
    #1  0x00007ffff6f57a78 in abort () from /lib64/libc.so.6
    #2  0x00007ffff43bca95 in __gnu_cxx::__verbose_terminate_handler() () from /lib64/libstdc++.so.6
    #3  0x00007ffff43baa06 in ?? () from /lib64/libstdc++.so.6
    #4  0x00007ffff43baa33 in std::terminate() () from /lib64/libstdc++.so.6
    #5  0x00007ffff43ba631 in __gxx_personality_v0 () from /lib64/libstdc++.so.6
    #6  0x00007ffff41559f4 in ?? () from /lib64/libgcc_s.so.1
    #7  0x00007ffff4155d44 in _Unwind_ForcedUnwind () from /lib64/libgcc_s.so.1
    #8  0x00007ffff6ab0362 in __pthread_unwind () from /lib64/libpthread.so.0
    #9  0x00007ffff6aa88e5 in sigcancel_handler () from /lib64/libpthread.so.0
    #10 <signal handler called>
    #11 0x00007ffff701020d in close () from /lib64/libc.so.6
    #12 0x00007ffff55846ab in ?? () from /omd/sites/mon/lib/libgearman.so.8
    #13 0x00007ffff558476e in ?? () from /omd/sites/mon/lib/libgearman.so.8
    #14 0x00007ffff558d02d in ?? () from /omd/sites/mon/lib/libgearman.so.8
    #15 0x00007ffff558d05e in ?? () from /omd/sites/mon/lib/libgearman.so.8
    #16 0x00007ffff558fe78 in gearman_worker_free () from /omd/sites/mon/lib/libgearman.so.8
    #17 0x00007ffff5e7e319 in gm_free_worker (worker=worker@entry=0x7ffff0386ee8) at common/gearman_utils.c:274
    #18 0x00007ffff5e83f88 in result_worker (data=<optimized out>) at neb_module_naemon/result_thread.c:115
    #19 0x00007ffff6aa9ea5 in start_thread () from /lib64/libpthread.so.0
    #20 0x00007ffff701eb0d in clone () from /lib64/libc.so.6
  • Loading branch information
sni committed Nov 19, 2024
1 parent 39a1cda commit bed158e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neb_module_naemon/result_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void *result_worker( void * data ) {
result_ctx = mod_gm_crypt_init(mod_gm_opt->crypt_key);

pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
pthread_cleanup_push(cancel_worker_thread, (void*) &worker);

set_worker(&worker);
Expand Down

0 comments on commit bed158e

Please sign in to comment.