Skip to content

handle failed solver processes#567

Closed
daejunpark wants to merge 2 commits intomainfrom
fix/solver-process-exception
Closed

handle failed solver processes#567
daejunpark wants to merge 2 commits intomainfrom
fix/solver-process-exception

Conversation

@daejunpark
Copy link
Collaborator

@daejunpark daejunpark commented Jul 26, 2025

when an exception is raised in solver subprocesses, their result may not be added to the solver_outputs list. in the current implementation, if all processes fail due to exceptions, it may incorrectly return pass because no error solver outputs are recorded.

this pr adds logic to detect such cases by comparing the number of solver outputs with the number of solver processes. the detection is designed to distinguish these from early exit scenarios.

@daejunpark daejunpark force-pushed the fix/solver-process-exception branch from 35b0b45 to e3b548b Compare July 26, 2025 01:25
@daejunpark daejunpark marked this pull request as ready for review July 26, 2025 01:27
@daejunpark daejunpark requested a review from 0xkarmacoma July 26, 2025 01:27
REVERT_ALL,
f"{funsig}: all paths have been reverted; the setup state or inputs may have been too restrictive.",
)
elif len(ctx.solver_outputs) < len(submitted_futures):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit concerned about relying on the number of solver outputs to infer that an error occured

when an exception is raised in solver subprocesses, their result may not be added to the solver_outputs list

this seems to be the real issue? ideally we want to capture the errors and add failed outputs to ctx.solver_outputs, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally we want to capture the errors and add failed outputs to ctx.solver_outputs, no?

yes, but it needs some more work, as the solver output object currently needs more info that isn't available at some places exceptions occur.

@daejunpark
Copy link
Collaborator Author

superseded by #570

@daejunpark daejunpark closed this Jul 31, 2025
@daejunpark daejunpark deleted the fix/solver-process-exception branch July 31, 2025 01:54
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.

2 participants