fix: subprocess isolate to close timeout-immune tree-sitter hang#1290
Conversation
fe4f8f4 to
69fbd9e
Compare
|
@seroperson In which case does this edge case happen? I assume its only when the PR file size is over 1MB. wdyt? |
It's not exactly about an edge case, but a specifically structured file which makes parser hang regardless of defined timeout. The size doesn't matter. To not disclosure details publicly, they were already sent in DM to the maintainers. |
69fbd9e to
756c26f
Compare
|
can you set |
|
Sorry, my earlier ask was off — I read the budget as per-file, but |
96184fb to
470d199
Compare
470d199 to
6861add
Compare
Closes #1289
Summary
multiprocessing.Pool(processes=1)with a hardSCORING_SUBPROCESS_BUDGET_S = 5.0s wall-clock. On timeout or worker crash the worker is killed and the PR is zero-scored withscoring_method='skipped-isolation-timeout'; the round continues.atexithook (isolated_scoring.shutdown) so themultiprocessingresource_tracker does not log spurious leaked-semaphore warnings.Follow-up to #1276.
Type of Change
Testing
Existing tests cover the subprocess isolation, but I've added several more to ensure timeout hanging works correctly.