On Mon, 2 Mar 2026 09:41:03 GMT, Frederic Thevenet <[email protected]> 
wrote:

>> jdk.test.lib.Platform.isMusl() may return false on Alpine linux, where it 
>> should return true.
>> This means that the jtreg tests is is used to guard will incorrectly fail.
>> This happens when tests deliberately clobber the  PATH and `ldd` can no 
>> longer be found. This PR uses a full path for `ldd` instead to work around 
>> the issue.
>
> Frederic Thevenet has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Print stack trace

This is fine.

I briefly wondered how the preexisting code worked without explicit waitFor(), 
since reading from the child stdout races the ldd process. But we just waited 
in readLine() until either a full line was printed by the child, or until the 
child ends and breaks the stdout pipe.

But as I wrote, the old code never reaped the child, so it would zombify. 
Running isMusl() 100 times should have accrued 100 zombies. @fthevenet just for 
fun, can you test that? They usually get re-parented to systemd or init and 
cleaned out after some time.

Now we autoclose, that solves the Zombies, too.

----

How many tests do we manually disable with this function? All of those tests 
will now run on Alpine. We might see new problems. That is not a reason not to 
fix it, but we should remember this patch when new Alpine problems appear. 

@MBaesken FYI.

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

Marked as reviewed by stuefe (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/29923#pullrequestreview-3875521022

Reply via email to