ChimeraTK / ChimeraTK/ControlSystemAdapter-DoocsAdapter

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

Open
#24 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

umbrella
Dominant language
C++
Stars
0
Forks
1
Avg merge
23h 29m
Merged PRs (30d)
1

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by locating the static ZMQSubscriptionManager and Application instances and tracing their destruction and accessor unsubscribe paths during an unexpected DOOCS server shutdown. Done means shutdown no longer crashes from callbacks or unsubscribe calls when rpcbind is unavailable or a history variable type has changed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.