← Back to team overview

openjdk team mailing list archive

Bug#944738: Bug#944738: jlink: Hash of module differs to expected hash recorded in java.base

 

On Mon, Sep 21, 2020 at 10:49:24PM -0700, tony mancill wrote:
> [...]
> 
> One other thing I wanted to mention is what I'm using for a test case:
> 
>   jlink --add-modules java.desktop --output test
> 
> This fails, complaining about the hash of java.xml recorded in
> java.base.  But other invocations of jlink are successful with the

That is super-weird; this command works fine for me.

Things to check (again, just trying to think of obvious things that
I might well do wrong myself ;-): what is the output of

jlink describe debian/openjdk-11-jdk-headless/usr/lib/jvm/java-14-openjdk-amd64/jmods/java.base.jmod | grep java.xml
sha256sum debian/openjdk-14-jdk-headless/usr/lib/jvm/java-14-openjdk-amd64/jmods/java.xml.jmod

(run in the build directory)?  Do these hashes match those in the
error message that you're seeing with the failing jlink command?

Which jlink are you using when you run your test command?
(/usr/bin/jlink is a symlink to /etc/alternatives/jlink - where does
that point?)

> patched build.  For example, the following is fine:
> 
>   jlink --add-modules java.base --output test
> 
> As does java.compiler and 32 others.  So 34 are okay and 38 of them are
> failing.  The "good" vs. "fail" modules are attached in case it sparks
> inspiration for someone.  I will take a look at the output of the
> non-parallelized build in the (GMT-7) morning.
> 
> So there are approximately 50/50 odds that your test case is working
> (hence the confusion), because the strip-determinism patch is only be
> causing problems for a subset of modules.

There's nothing obvious to me in this list.  It's just a mystery...
In my build, the SHA-256 hashes in java.base.jmod exactly match the
SHA-256 hashes of the jmod files themselves.

> Thank you for the ideas.  I will keep working on it.

Could you perhaps make your openjdk-*_*.debian.tar.xz available
somewhere so that I can try it on my machine, and see if there's a
difference between machines?  (I can get the .orig.tar.gz from the
mirrors.)

Best wishes,

   Julian


Follow ups

References