Repository navigation
[windows] tell a spawned analysis worker the pid its orchestrator knows it by - #2269
Open
jeremydubreil wants to merge 1 commit into
Open
jeremydubreil wants to merge 1 commit into
jeremydubreil wants to merge 1 commit into
Conversation
jeremydubreil
force-pushed
the
windows-worker-pids
branch
from
October 26, 2026 10:39
125dd68 to
4ea6e01
Compare
jeremydubreil
marked this pull request as ready for review
October 26, 2026 11:01
jeremydubreil
force-pushed
the
windows-worker-pids
branch
2 times, most recently
from
October 28, 2026 13:51
62dccf7 to
06c2c45
Compare
jeremydubreil
force-pushed
the
windows-worker-pids
branch
from
October 29, 2026 22:18
06c2c45 to
b55190c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows,
Unix.create_processreturns a process handle rather than a process id. The orchestrator knows each spawned analysis worker by that value and takes locks on its behalf under it, whileProcLockertells the locks a worker owns from the others by comparing it with the worker's own pid. The two never match, so a spawned worker does not recognize the locks taken for it.This PR makes the orchestrator pass the pid it knows a spawned worker by to that worker, which then uses it instead of its own pid. Only workers started with
Unix.create_process(--no-unix-fork, the default on Windows and macOS) are affected; forked workers (--unix-fork, the default on Linux) keep their own pid as before.Testing on Linux, with both
--unix-forkand--no-unix-fork, on WebGoat, WebGoat.NET, OWASP BenchmarkJava and Apache HBase: the reported issues are the same, and the analysis time shows no difference beyond the run-to-run variation.