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

Lifetime issues with static instances of ZMQ manager and Application on unexpected doocs server shutdown #24

Open
phako opened this issue May 13, 2019 · 1 comment
Labels
umbrella Meta ticket which just provides a framework for subtickets which together form a bigger task

Comments

@phako
Copy link
Member

phako commented May 13, 2019

If the DOOCS server has a problem (e.g. rpcbind not running, type of variable with history has changed) the destruction order of the static variables in the server causes issues.

It seems that the ZMQSubscriptionManager singleton is destroyed first, causing either:

  • An incoming ZMQ callback to crash because the accessors have not unsubscribed themselves yet
  • A crash in the accessor unsubscribe call because the ZMQSubscriptionManager is already dead

This is only an issue in non-standard exit situations of the server. Orderly shutdown of the doocs server (SIGTERM/INT) works fine.

@mhier
Copy link
Member

mhier commented May 13, 2019

Note: This probably has to be solved on a deeper level in ControlSystemAdapter and/or ApplicationCore. Hence I will mark this as a umbrella ticket.

@mhier mhier added the umbrella Meta ticket which just provides a framework for subtickets which together form a bigger task label May 13, 2019
killenb added a commit that referenced this issue Mar 7, 2023
This allows easier debugging as all lines can be reached. The tsan build uses
"-o1" for performance reasons.
For asan and Debug build we use "-o0", which includes this flag, and for the
release builds we want as much optimisation we can get.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
umbrella Meta ticket which just provides a framework for subtickets which together form a bigger task
Projects
None yet
Development

No branches or pull requests

2 participants