Hi, I found 1 GCC optimization issue, but it is not enough.
http://cr.openjdk.java.net/~ysuenaga/openjdk-fc28/gcc8-opt/gdb-before.txt I traced class loading from `modules`. Above log is copy of GDB console in ImageFileReader::verify_location(). The code expects `*next++` increments after referring the value, but it do not so. Thus I fixed the code as following changeset: http://cr.openjdk.java.net/~ysuenaga/openjdk-fc28/gcc8-opt/wip.00/ It passes module name check, but it fails parent (package name) check. GDB log is here: http://cr.openjdk.java.net/~ysuenaga/openjdk-fc28/gcc8-opt/gdb-after.txt I guess the value of parent should be `java/lang`, but it sets to `sun/refrect/generics/factory`. Do you have anything to think about? Thanks, Yasumasa 2018-05-09 17:22 GMT+09:00 Severin Gehwolf <sgehw...@redhat.com>: > Hi, > > Note that slowdebug builds work: > > $ ./build/linux-x86_64-normal-server-slowdebug/images/jdk/bin/java -version > openjdk version "11-internal" 2018-09-25 > OpenJDK Runtime Environment (slowdebug build > 11-internal+0-adhoc.sgehwolf.openjdk-hs) > OpenJDK 64-Bit Server VM (slowdebug build > 11-internal+0-adhoc.sgehwolf.openjdk-hs, mixed mode) > > In summary we have: > > * Build fails with fastdebug/release debug config (-O3) > * Build succeeds with slowdebug (-O0) > * F28 has GCC 8 > * Older GCC-based builds continue to work for fastdebug/release config > > * JDK 10.0.1 builds fine with GCC 8. > > So far showing all symptoms of either a GCC bug or some UB in recent > OpenJDK code which breaks with new optimizations done in GCC 8. > > I'll continue to investigate what it is... > > Cheers, > Severin > > On Wed, 2018-05-09 at 17:03 +0900, Yasumasa Suenaga wrote: >> Hi Thomas, >> >> Build was succeeded with --with-build-jdk=<path/to/jdk11-ea> >> configure >> option, but JDK image does not work as below: >> >> ``` >> [ysuenaga@f4i jdk]$ >> ./build/linux-x86_64-normal-server-fastdebug/images/jdk/bin/java >> --version >> Error occurred during initialization of VM >> java/lang/NoClassDefFoundError: java/lang/Object >> ``` >> >> >> Thanks, >> >> Yasumasa >> >> >> 2018-05-09 14:36 GMT+09:00 Thomas Stüfe <thomas.stu...@gmail.com>: >> > Hi, >> > >> > sorry for quick dropping in. Just wanted to remark that it may be >> > useful to run with --with-build-jdk=<x> with <x> being a good >> > working >> > jdk you trust. It must be close to the source you build - I usually >> > use a clean current release build. >> > >> > This excludes build errors which may be caused by the JDK you are >> > building being faulty (the build uses itself in places). >> > >> > ..Thomas >> > >> > On Wed, May 9, 2018 at 5:46 AM, Yasumasa Suenaga <yasue...@gmail.co >> > m> wrote: >> > > Hi David, >> > > >> > > I uploaded build.log: >> > > http://cr.openjdk.java.net/~ysuenaga/openjdk-fc28/build.log >> > > >> > > Is it enough? >> > > >> > > >> > > Thanks, >> > > >> > > Yasumasa >> > > >> > > >> > > >> > > 2018-05-09 11:17 GMT+09:00 David Holmes <david.hol...@oracle.com> >> > > : >> > > > On 9/05/2018 12:09 PM, Yasumasa Suenaga wrote: >> > > > > >> > > > > Hi David, >> > > > > >> > > > > 2018-05-09 10:48 GMT+09:00 David Holmes <david.holmes@oracle. >> > > > > com>: >> > > > > > >> > > > > > Can you build with LOG=trace to try and see the actual >> > > > > > command that is >> > > > > > failing? >> > > > > >> > > > > >> > > > > I tried it and got following logs. They look good to me. >> > > > >> > > > >> > > > Not enough there for me to comment :) >> > > > > >> > > > > >> > > > > * Creating interim-image >> > > > > >> > > > > + >> > > > > /home/ysuenaga/OpenJDK/jdk/build/linux-x86_64-normal-server- >> > > > > fastdebug/jdk/bin/jlink >> > > > > -J-XX:+UseSerialGC -J-Xms32M -J-Xmx512M -J- >> > > > > XX:TieredStopAtLevel=1 >> > > > > -J-Djlin >> > > > > k.debug=true --module-path >> > > > > >> > > > > /home/ysuenaga/OpenJDK/jdk/build/linux-x86_64-normal-server- >> > > > > fastdebug/support/interim-jmods >> > > > > --endian little --output >> > > > > >> > > > > /home/ysuenaga/OpenJDK/jdk/build/linux-x86_64-normal-server- >> > > > > fastdebug/support/interim-image >> > > > > --disable-plugin generate-jli-classes --add-modules >> > > > > java.base,java.logging >> > > > >> > > > >> > > > So this seems to produce an interim image that won't run - >> > > > correct? I'd be >> > > > scouring the log in the lead up to this to see if anything >> > > > seems to be >> > > > unusual. Can you upload the log to cr.openjdk.java.net? Or >> > > > email me >> > > > directly? >> > > > >> > > > Thanks, >> > > > David >> > > > >> > > > >> > > > > >> > > > > * Command on error: >> > > > > >> > > > > + >> > > > > /home/ysuenaga/OpenJDK/jdk/build/linux-x86_64-normal-server- >> > > > > fastdebug/support/interim-image/bin/java >> > > > > >> > > > > -XX:DumpLoadedClassList=/home/ysuenaga/OpenJDK/jdk/build/linu >> > > > > x-x86_64-normal-server- >> > > > > fastdebug/support/link_opt/classlist.raw >> > > > > -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true -cp >> > > > > >> > > > > /home/ysuenaga/OpenJDK/jdk/build/linux-x86_64-normal-server- >> > > > > fastdebug/support/classlist.jar >> > > > > build.tools.classlist.HelloClasslist >> > > > > >> > > > > Thanks, >> > > > > >> > > > > Yasumasa >> > > > > >> > > > > >> > > > > > David >> > > > > > >> > > > > > >> > > > > > On 9/05/2018 11:39 AM, Yasumasa Suenaga wrote: >> > > > > > > >> > > > > > > >> > > > > > > Hi, >> > > > > > > >> > > > > > > 2018-05-09 0:27 GMT+09:00 Erik Joelsson <erik.joelsson@or >> > > > > > > acle.com>: >> > > > > > > > >> > > > > > > > >> > > > > > > > Hello, >> > > > > > > > >> > > > > > > > Your assessment is looks correct so far. At this point, >> > > > > > > > one would have >> > > > > > > > to >> > > > > > > > start debugging the image to figure out what's wrong >> > > > > > > > with it. Are you >> > > > > > > > able >> > > > > > > > to run the exploded image in >> > > > > > > > ./build/linux-x86_64-normal-server- >> > > > > > > > fastdebug/jdk/bin/java? >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > It works. So I wonder why invalid image was built. >> > > > > > > >> > > > > > > ``` >> > > > > > > $ ./build/linux-x86_64-normal-server- >> > > > > > > fastdebug/jdk/bin/java --version >> > > > > > > openjdk 11-internal 2018-09-25 >> > > > > > > OpenJDK Runtime Environment (fastdebug build >> > > > > > > 11-internal+0-adhoc.ysuenaga.jdk) >> > > > > > > OpenJDK 64-Bit Server VM (fastdebug build >> > > > > > > 11-internal+0-adhoc.ysuenaga.jdk, mixed mode) >> > > > > > > ``` >> > > > > > > >> > > > > > > I'm waiting for Severin's evaluation :-) >> > > > > > > >> > > > > > > >> > > > > > > Thanks, >> > > > > > > >> > > > > > > Yasumasa >> > > > > > > >> > > > > > > >> > > > > > > > Has anyone at Redhat built successfully on Fedora 28 >> > > > > > > > yet? >> > > > > > > > >> > > > > > > > /Erik >> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > On 2018-05-08 06:42, Yasumasa Suenaga wrote: >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > Hi all, >> > > > > > > > > >> > > > > > > > > I tried to build OpenJDK (jdk/jdk) on Fedora 28 x64, >> > > > > > > > > but it failed as >> > > > > > > > > following: >> > > > > > > > > >> > > > > > > > > ``` >> > > > > > > > > [ysuenaga@fc28 jdk]$ make images >> > > > > > > > > Building target 'images' in configuration >> > > > > > > > > 'linux-x86_64-normal-server-fastdebug' >> > > > > > > > > gmake[3]: *** [GenerateLinkOptData.gmk:64: >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > /home/ysuenaga/OpenJDK/jdk/build/linux-x86_64-normal- >> > > > > > > > > server-fastdebug/support/link_opt/classlist] >> > > > > > > > > Error 1 >> > > > > > > > > gmake[2]: *** [make/Main.gmk:448: generate-link-opt- >> > > > > > > > > data] Error 2 >> > > > > > > > > >> > > > > > > > > ERROR: Build failed for target 'images' in >> > > > > > > > > configuration >> > > > > > > > > 'linux-x86_64-normal-server-fastdebug' (exit code 2) >> > > > > > > > > >> > > > > > > > > No indication of failed target found. >> > > > > > > > > Hint: Try searching the build log for '] Error'. >> > > > > > > > > Hint: See doc/building.html#troubleshooting for >> > > > > > > > > assistance. >> > > > > > > > > >> > > > > > > > > make[1]: *** >> > > > > > > > > [/home/ysuenaga/OpenJDK/jdk/make/Init.gmk:305: main] >> > > > > > > > > Error >> > > > > > > > > 2 >> > > > > > > > > make: *** >> > > > > > > > > [/home/ysuenaga/OpenJDK/jdk/make/Init.gmk:186: >> > > > > > > > > images] Error >> > > > > > > > > 2 >> > > > > > > > > ``` >> > > > > > > > > >> > > > > > > > > It seems "interim-image" is not valid: >> > > > > > > > > >> > > > > > > > > ``` >> > > > > > > > > [ysuenaga@fc28 jdk]$ >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > ./build/linux-x86_64-normal-server- >> > > > > > > > > fastdebug/support/interim-image/bin/java >> > > > > > > > > --version >> > > > > > > > > Error occurred during initialization of VM >> > > > > > > > > java/lang/NoClassDefFoundError: java/lang/Object >> > > > > > > > > ``` >> > > > > > > > > >> > > > > > > > > It can succeed on Fedora 27. So I think it causes by >> > > > > > > > > OS. >> > > > > > > > > I've disabled SELinux, and warnings / errors are >> > > > > > > > > nothing in >> > > > > > > > > `journalctl >> > > > > > > > > -a`. >> > > > > > > > > >> > > > > > > > > Do you have any idea to resolve this issue? >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > Thanks, >> > > > > > > > > >> > > > > > > > > Yasumasa >> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > >