Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Daemon not destroying msg_queue and shm when restarting #48

Open
brunnels opened this issue May 9, 2014 · 1 comment
Open

Daemon not destroying msg_queue and shm when restarting #48

brunnels opened this issue May 9, 2014 · 1 comment

Comments

@brunnels
Copy link
Contributor

brunnels commented May 9, 2014

I thought I had reported this issue before but I can't find it now.

To reproduce run in daemon mode and set a low $auto_restart_interval. Every time the daemon restarts it creates a new msg_queue and new shm mallocs for each worker. This will quickly eat up all your memory and the daemon will eventually be unable to restart.

@brunnels
Copy link
Contributor Author

Can reproduce this problem with the PrimeNumbers example. Start it, hit ctrl-c, wait for it all to die, run ipcs and see there was one shm segment created and one message queue created and they are still there, run example and kill it again, run ipcs and see there are now 2 segments and 2 queues.

There is the mechanism in the mediator destruct method to check for pending messages and if none it calls the release method on the via. Even if I comment out the queue message check there the shm segment and queue are not removed.

I'll continue to investigate and find a solution because this is a pain point for me right now as I'm having to babysit the daemon process to ensure it stays running.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant