Description of problem: A race condition might be triggered with the socket used by the daemon.py: since it's provided by an external process, it might happen that external process drops the socket before the end of privsep actions. This leads to different issues, among them: - stack trace with "BrokenPipeError: [Errno 32] Broken pipe" - service hanging while trying to read the socket usint Threading - it will hand there forever and ever Version-Release number of selected component (if applicable): python3-oslo-privsep-1.33.3-0.20200310175027.ddde706.el8ost.noarch python-oslo-privsep-lang-1.33.3-0.20200310175027.ddde706.el8ost.noarch How reproducible: Always Steps to Reproduce: 1. Create a socket for oslo_privsep 2. Start running privsep 3. Drop the socket in the middle of the action Actual results: We end with either a BrokenPipe, or a hanging process Expected results: It should fail more gracefully, and really NOT hang forever Additional info: This was detected while working on the following BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1783195
Hello, Looks like to an eventlet issue. Indeed, daemon is an independent process that executes, in privileged mode, the methods passed. Some of those methods make use of libraries like "os" or "threading". Sometimes, those methods are not evenlet safe: the GIL is given to the next user thread and is never returned, that ends in a command timeout. Unless there is a major reason to monkey patch those libraries, I suggest to revert the monkey patched libraries [1][2][3] when the privileged daemon is forked. That will help to prevent this kind of hanging process and those command timeouts. [1] https://review.opendev.org/#/c/740970/ [2] https://review.opendev.org/#/c/747906/ [3] https://review.opendev.org/#/c/747907/
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat OpenStack Platform 16.1.3 bug fix and enhancement advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2020:5413