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

SHM Segment cleanup upon SIGINT (and any other signal) #1386

Closed
yellowhatter opened this issue Sep 9, 2024 · 0 comments
Closed

SHM Segment cleanup upon SIGINT (and any other signal) #1386

yellowhatter opened this issue Sep 9, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@yellowhatter
Copy link
Contributor

Describe the bug

There is a problem around Ctrl-C's SIGINT handling. By default, process terminates upon SIGINT reception without properly executing any cleanups etc - and there is a problem, because we need to properly deref our SHM segments.

Since previous time we had SHM cleanup problem, we switched to a static-helper crate static_init with guaranteed cleanup on exit() call, but that didn't work for SIGINT :(

The solution can be to register signal handlers to perform cleanup, but this is incorrect, since it can interfere with user's signals as signal() API supports only one signal handler to be in place.

To be honest, I think we need to develop some more comprehensive segment cleanup mechanism to cover both SIGINT and SIGTERM cases.To be investigted

To reproduce

It can be reproduced by running any of our SHM examples

System info

Linux
Potentially Windows

@yellowhatter yellowhatter added the bug Something isn't working label Sep 9, 2024
@yellowhatter yellowhatter self-assigned this Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant