salt
salt copied to clipboard
[BUG] minion using multiprocessing will leek pipe fd
Description While minion config multiprocessing is True, parent process will leek fd, because multiprocessing using popen. In class SubprocessList , it's function cleanup need to add proc.join() if using multiprocessing , to clean parent process fd(pipe).
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
- Community Wiki
- Salt’s Contributor Guide
- Join our Community Slack
- IRC on LiberaChat
- Salt Project YouTube channel
- Salt Project Twitch channel
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!
@liangyihong I see join getting called here: https://github.com/saltstack/salt/blob/3006.x/salt/utils/process.py#L1175
@liangyihong I see join getting called here: https://github.com/saltstack/salt/blob/3006.x/salt/utils/process.py#L1175
@dwoz Sorry, that was a typo. It need to add proc.close() to clean parent process fd(pipe).In python3, package multiprocessing/popen_fork.py, the class Popen need call close() to clean parent pipe fd.
@liangyihong I see join getting called here: https://github.com/saltstack/salt/blob/3006.x/salt/utils/process.py#L1175
@dwoz Sorry, that was a typo. It need to add proc.close() to clean parent process fd(pipe).In python3, package multiprocessing/popen_fork.py, the class Popen need call close() to clean parent pipe fd.
Makes sense, thanks.
Fixed by #66778