Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems: atexit called after zmq static object destruction causes crash, out of date with zproject #1876

Merged
merged 2 commits into from
Mar 7, 2018

Conversation

bluca
Copy link
Member

@bluca bluca commented Mar 7, 2018

Solutions: see commits

See: zeromq/libzmq#2971

bluca added 2 commits March 7, 2018 13:19
Solution: register zsys_shutdown with atexit after initialising the
libzmq context, so that the static objects that may be initialised
(eg: mutex for random init/deinit) will be de-initialised after
zsys_shutdown is called.

Fixes aborts at shutdown caused by invaling pthread_mutex:

    at src/err.cpp:87
    at src/mutex.hpp:103
    at src/ctx.cpp:124
    run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:83
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdee8)
    at ../csu/libc-start.c:325
@jimklimov
Copy link
Member

Existing travis red marks confirmed to be non-issues (a known manual workaround, and a zmq2 test failing since day X).

@jimklimov jimklimov merged commit ec65c1b into zeromq:master Mar 7, 2018
@bluca bluca deleted the atexit branch March 7, 2018 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants