Skip to content

Fix CLI nontermination - #3177

Merged
jaschdoc merged 4 commits into
mainfrom
fix-cli-nontermination
Sep 3, 2026
Merged

Fix CLI nontermination#3177
jaschdoc merged 4 commits into
mainfrom
fix-cli-nontermination

Conversation

@jaschdoc

@jaschdoc jaschdoc commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

The background threads spawned by the Analysis API still continue unless the exitProcess function is called. This PR adds a parameterized test that checks for nontermination (with a 1 minute timeout). It then wraps all CLI entry points in a try-catch that manually prints the stack trace in the error case and calls exitProcess to ensure the process halts.

Closes #3120

…cessor

KSP's CLI entry points do not terminate if a processor throws an exception, since the background threads required by the Analysis API are never cleaned up.
That code path is skipped entirely.
The integration tests did not catch it since it loaded the KSP entry point within the same process.
This commit adds a new set of tests that spawn a distinct processor to reproduce the failure
@jaschdoc
jaschdoc force-pushed the fix-cli-nontermination branch from 264957a to 1509bd7 Compare September 3, 2026 09:50
@jaschdoc
jaschdoc marked this pull request as ready for review September 3, 2026 10:41
@jaschdoc
jaschdoc enabled auto-merge September 3, 2026 10:41
@jaschdoc
jaschdoc added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit 96d4d9f Sep 3, 2026
28 checks passed
@jaschdoc
jaschdoc deleted the fix-cli-nontermination branch September 3, 2026 12:11
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

Successfully merging this pull request may close these issues.

KSP process hangs indefinitely when a processor crashes when called from the CLI

2 participants