On Wed, 18 Mar 2026 21:06:50 GMT, xeu-giayoei <[email protected]> wrote:

>> This PR fixes a segfault in the jpackage Linux launcher caused by partial 
>> reads/writes when transferring JVM launcher data through a pipe.
>> 
>> It introduced `readFully` and `writeFully` helper functions in 
>> `LinuxLauncher.c` to ensure complete transfer by:
>> - Using a `while` loop to handle partial I/O.
>> - Retrying on `EINTR`.
>
> xeu-giayoei has refreshed the contents of this pull request, and previous 
> commits have been removed. The incremental views will show differences 
> compared to the previous content of the PR. The pull request contains one new 
> commit since the last revision:
> 
>   8380085: jpackage: handle partial pipe read/write in the Linux launcher

Thanks for the feedback. Regarding the reproduction or partial RWs, I suspect 
the issue is sensitive to the system's default pipe buffer capacity and memory 
pressure. In my environment, a write on pipe over 16KiB is truncated as a 
partial write, as shown in the `strace` excerpt in the CR [1].

Since these limits may differ between systems (and kernel configurations), 
increasing the `JAR_COUNT` to a larger number (e.g., 16384) might triggers the 
partial write in environments with larger buffers.

[1] `06:42:45.145883 write(4, 
"h\212\352\252#V\0\0\6\0\0\0\2\0\0\0\310\212\352\252#V\0\08\30\354\252#V\0\0"...,
 102028) = 16384`

-------------

PR Comment: https://git.openjdk.org/jdk/pull/30254#issuecomment-4085946879

Reply via email to