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

pksubprocess signal race condition #544

Open
robnagler opened this issue Jan 18, 2025 · 0 comments
Open

pksubprocess signal race condition #544

robnagler opened this issue Jan 18, 2025 · 0 comments

Comments

@robnagler
Copy link
Member

The signal handler should collect the signals and waitpid should deliver them. The signal may occur before subprocess.Popen returns, that is, the child (from pksubprocess_test) executes before the parent process has gotten the pid from subprocess. This occurs in parallel test runs. Simplifying the signal handler is better anyway. This will require a change to the way the non-recursive waitpid works. It's ok to poll. The key is making it fast enough that higher level processes (e.g. sirepo job supervisor) do not send their secondary signal before the signal gets to be cascaded. This should be fine. The poll loop can actually be structured so that the check for signals happens every .1 and the ps calls happen every 1 second.

robnagler added a commit that referenced this issue Jan 18, 2025
…tion,

which only shows up when running parallel tests. #554 is not fixed by this
commit.
test.sh also now prints the pid/time, which is helpful for debugging.
robnagler added a commit that referenced this issue Jan 21, 2025
- Added quest.Attr.IS_SINGLETON to enable http.Session 
- documented quest.Attr.
- Fixed pksubprocess_test (hopefully) after discovering #544 race condition,
which only shows up when running parallel tests. #554 is not fixed by this
commit.
- test.sh also now prints the pid/time, which is helpful for debugging.
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

1 participant