Odd problem building current 8u snapshot

Holger Hoffstätte holger at applied-asynchrony.com
Wed Jun 26 17:55:34 UTC 2019


On 6/26/19 1:55 PM, Severin Gehwolf wrote:
> Hi Holger,
> 
> I don't seem to be able to reproduce this with a clean jdk8u tree on
> Fedora 29. Have you considered removing the 'build' directory and start
> over with configure and make?

Yes, obviously. :)

> And it succeeds for me. Note, this produces zipped (external) debug
> info files. I suppose one workaround could perhaps be to pass
> '--disable-zip-debuginfo' to configure. Though, that's old-school and
> I'm using --with-native-debug-symbols=internal for my developmeent
> work.

Both of these options do the trick, but that's not really why I posted,
since they change the problem. I suspected that --disable-zip-debuginfo
would work (it does), and --with-native-debug-symbols=internal works
because it circumvents all the symlinking & zipping business in the first
place. But that's not happens by default. If external debug info is
somehow broken then --with-native-debug-symbols=internal should just be
the default.

That being said, I spent a few hours trying to figure out what is
going on (thanks for the LOG_LEVEL=debug hint) but ultimately failed.

>>   (/tmp/shenandoah-jdk8/build/linux-x86_64-normal-server-release/jdk/lib/amd64/server/libjsig.diz.tmp)
> 
> This seems to be the clue. For some reason the zip invocation fails for
> you. As the build fails the stale symlink sticks around. For my build

The zip invocation is actually not the actual problem, but rather that there
is never any libjsig.debuginfo copied to the amd64 parent dir; only the .diz file
is ever copied, and for some reason the rules you quoted (in Import.gmk)
nevertheless create a stale symlink. All this changes with the above mentioned
options.

> the sequence of commands look like this from (LOG=debug):
> 
> /usr/bin/mkdir -p /disk/openjdk/upstream-sources/openjdk8u/build/linux-x86_64-normal-server-release/jdk/lib/amd64/server

The interesting parts are actually right before this, where things are copied
into server's amd64 parent directory. By default no libjsig.debuginfo ever shows up,
so the error following from the stale symlink is actually what I'd expect.
I'm at a loss why you cannot reproduce this.

> Here are the steps done in Import.gmk[1]:
>    $(INSTALL_LIBRARIES_HERE)/server/%.diz: $(INSTALL_LIBRARIES_HERE)/%.diz
>          $(MKDIR) -p $(@D)
>          $(RM) $@
>          $(RM) $@.tmp $(basename $@).debuginfo
>          $(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
>          $(CD) $(@D) && $(ZIP) -q -y $@.tmp $(basename $(@F)).debuginfo     <--- Line 189
>          $(RM) $(basename $@).debuginfo
>          $(MV) $@.tmp $@

The only way I can make those rules work is by changing #188 to symlink .diz
instead of .debuginfo (as I did manually) and disabling #189.
In a last-ditch effort I tried reverting [1] but that didn't help either,
so the problem must be somewhere else.

Anyway, I'm not going to pursue this further; in the future I'll simply build
explicitly without or with internal debug info.

thanks,
Holger

[1] http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/0ef29304c2b4


More information about the jdk8u-dev mailing list