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

[data-compaction][leo_object_storage] elements in pid_pairs may leak when the exec time of a compaction|diagnose is too short #521

Closed
mocchira opened this issue Nov 16, 2016 · 1 comment

Comments

@mocchira
Copy link
Member

https://github.com/leo-project/leo_object_storage/blob/1.3.0/src/leo_compact_fsm_controller.erl#L694
As erlang:monitor is called in async according to its document,
so there is a possibility that a process which was supposed to be monitored died before getting to be monitored so that the controller process couldn't get a 'DOWN' message and the leak happened.

I believe that erlang:spawn_monitor will solve but just in case also initialize pid_pairs to empty when starting a compaction|diagnose

@yosukehara
Copy link
Member

LGTM, thanks.

@yosukehara yosukehara changed the title [leo_object_storage] elements in pid_pairs may leak when the exec time of a compaction|diagnose is too short [data-compaction][leo_object_storage] elements in pid_pairs may leak when the exec time of a compaction|diagnose is too short Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants