Skip to content

Conversation

@bahaa
Copy link
Contributor

@bahaa bahaa commented Jan 7, 2026

On OS with small process IO buffers (e.g. 4k on Windows), if jextract stderr is larger than the OS buffer, the plugin will hang because the OS will wait for the Java side to consume stderr before allow the subprocess to proceed. The Java side will be blocked on trying to transferring stdout (Buffer Deadlock).

To solve this problem, both transfers from stdout and stderr should happen asynchronously. This PR fixes this.

On OS with small process IO buffers (e.g. 4k on Windows), if jextract
stderr is larger than the OS buffer, the plugin will hang because the OS
will wait for the Java side to consume stderr before allow the subprocess
to proceed. The Java side will be blocked on trying to transferring
stdout (Buffer Deadlock).

To solve this problem, both transfers from stdout and stderr should happen
asynchronously. This PR fixes this.
Copy link
Contributor

@overheadhunter overheadhunter left a comment

Choose a reason for hiding this comment

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

Looks fine, thanks for the fix! 🙌

@overheadhunter overheadhunter merged commit 225338b into coffeelibs:develop Jan 9, 2026
@overheadhunter overheadhunter added this to the next milestone Jan 9, 2026
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