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

Handle all failures in runWithInputStream #371

Closed
wants to merge 2 commits into from

Conversation

bell-db
Copy link
Contributor

@bell-db bell-db commented Aug 17, 2024

What changes are proposed in this pull request?

This PR precedes #367.

During the investigation of #366, while irrelevant to the root cause, two separate issues are found that can cause the program to be stuck.

  • If there is an OOM, stack overflow, etc in gen.run or readInputStreamToByteArrayWithEnv, the Future thread will fail but the named pipes & protoc are still waiting for the result, causing the entire program to be stuck. This is now fixed in this PR.
  • An attempt to fix the issue with finally failed, because the ordering of fsin.close() and Files.newOutputStream(outputPipe) is crucial. This is now documented in this PR.

@bell-db bell-db marked this pull request as ready for review August 17, 2024 00:06
@bell-db bell-db force-pushed the bell-db/v0.9.7-failure branch from 91c0519 to 07ee8a7 Compare August 20, 2024 18:12
@bell-db
Copy link
Contributor Author

bell-db commented Aug 27, 2024

Merged in #367

@bell-db bell-db closed this Aug 27, 2024
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.

1 participant