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

diod crashed at shutdown #99

Closed
bjornaxis opened this issue Mar 21, 2024 · 1 comment
Closed

diod crashed at shutdown #99

bjornaxis opened this issue Mar 21, 2024 · 1 comment

Comments

@bjornaxis
Copy link
Contributor

Diod crashes sometimes during shutdown. The cause is different, sometimes it is an assert that is hit and sometimes it is a normal segfault.

The probability for crashing is much higher if diod has open connections accessing files when the shutdown is initiated.

The main cause of this crash is that all the connection threads are detached and not actively shut down from the main thread. When main thread exits it will deallocate all its data structures, and if one of the connection threads are still doing some processing it might access this data after this and thus cause the crash.

The deallocation is done by these lines in diod/diod.c:
diod_fini (ss.srv);
np_srv_destroy (ss.srv);

@garlick
Copy link
Member

garlick commented Dec 31, 2024

Closed by #98

@garlick garlick closed this as completed Dec 31, 2024
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

No branches or pull requests

2 participants