Unable to build Client/Server variant for OpenJDK-11 on ARMv7-A

David Holmes david.holmes at oracle.com
Wed Oct 13 21:48:17 UTC 2021


Hi John,

On 14/10/2021 3:20 am, John Cummings wrote:
> Thank you both for the responses!
> 
> I am now using the https://github.com/openjdk/jdk11u-dev/ 
> <https://github.com/openjdk/jdk11u-dev/> tree that you linked and I have 
> trimmed down my cxxflags and cflags to just -O2 and -pipe, and added 

I would not mess with the optimisation level. The crash looks like the 
wrong instruction is being used, possibly due to the forced optimisation 
level.

David
-----

> --with-debug-level=fastdebug. I've tried with zero build, which still 
> works, but server, client still crash immediately, but now they also 
> give me an assert internal error:
> 
> Server:
> 
> #
> # To suppress the following error report, specify this argument
> # after -XX: or in .hotspotrc:  SuppressErrorAt=/assembler_arm.hpp:240
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  Internal Error 
> (/home/johnc/Documents/openjdk/jdk11u-dev/src/hotspot/cpu/arm/assembler_arm.hpp:240), 
> pid=1467, tid=1468
> #  assert(_disp == 0 && (_shift_imm >> 5) == 0) failed: encoding constraint
> #
> # JRE version:  (11.0.14) (fastdebug build )
> # Java VM: OpenJDK Server VM (fastdebug 
> 11.0.14-internal+0-adhoc.johnc.jdk11u-dev, mixed mode, serial gc, linux-)
> # Core dump will be written. Default location: 
> /usr/lib/jvm/jdk11/server/jdk/bin/core
> #
> 
> Client:
> 
> #
> # To suppress the following error report, specify this argument
> # after -XX: or in .hotspotrc:  SuppressErrorAt=/assembler_arm.hpp:240
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  Internal Error 
> (/home/johnc/Documents/openjdk/jdk11u-dev/src/hotspot/cpu/arm/assembler_arm.hpp:240), 
> pid=1296, tid=1297
> #  assert(_disp == 0 && (_shift_imm >> 5) == 0) failed: encoding constraint
> #
> # JRE version:  (11.0.14) (fastdebug build )
> # Java VM: OpenJDK Client VM (fastdebug 
> 11.0.14-internal+0-adhoc.johnc.jdk11u-dev, mixed mode, serial gc, linux-)
> # Core dump will be written. Default location: 
> /usr/lib/jvm/jdk11/client/jre/bin/core
> #
> 
> And if it helps, here's the output of -Xlog:all on the client fastdebug 
> build
> 
> # ./java -Xlog:all
> [0.012s][info][os] Use of CLOCK_MONOTONIC is supported
> [0.012s][info][os] Use of pthread_condattr_setclock is supported
> [0.012s][info][os] Relative timed-wait using pthread_cond_timedwait is 
> associated with CLOCK_MONOTONIC
> [0.012s][info][os] HotSpot is running with glibc 2.18, NPTL 2.18
> [0.013s][info][os] SafePoint Polling address: 0xb6f03000
> [0.016s][info][biasedlocking] Aligned thread 0xb5f17160 to 0xb5f17400
> [0.016s][info][os,thread    ] Thread attached (tid: 1484, pthread id: 
> 3054040160).
> [0.018s][info][os           ] attempting shared library load of 
> /usr/lib/jvm/jdk11/client/jdk/lib/libzip.so
> [0.019s][info][os           ] shared library load of 
> /usr/lib/jvm/jdk11/client/jdk/lib/libzip.so was successful
> [0.020s][info][class,path   ] bootstrap loader class 
> path=/usr/lib/jvm/jdk11/client/jdk/lib/modules
> [0.020s][info][class,path   ] opened: 
> /usr/lib/jvm/jdk11/client/jdk/lib/modules
> [0.020s][info][class,load   ] opened: 
> /usr/lib/jvm/jdk11/client/jdk/lib/modules
> [0.020s][info][pagesize     ] CodeCache:  min=160K max=32M 
> base=0xb3d5f000 page_size=4K size=32M
> [0.022s][info][os,cpu       ] CPU:total 2 (initial active 2) (ARMv7), vfp
> [0.022s][info][os,cpu       ]
> /proc/cpuinfo:
> [0.022s][info][os,cpu       ] Processor : ARMv7 Processor rev 4 (v7l)
> processor       : 0
> BogoMIPS        : 1810.43
> 
> processor       : 1
> BogoMIPS        : 1823.53
> 
> Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 
> tls vfpv4 idiva idivt
> CPU implementer : 0x41
> CPU architecture: 7
> CPU variant     : 0x0
> CPU part        : 0xc07
> CPU revision    : 4
> 
> Hardware        : sun7i
> Revision        : 0000
> Serial          : 07c1120f5552484880758685165166cb
> [0.022s][info][os,cpu       ] Online cpus:
> [0.022s][info][os,cpu       ] 0-1
> [0.022s][info][os,cpu       ] Offline cpus:
> [0.023s][info][os,cpu       ]
> [0.024s][info][startuptime  ] StubRoutines generation 1, 0.0007363 secs
> [0.025s][info][pagesize     ] Heap:  min=6M max=200M base=0xa7400000 
> page_size=2M size=200M
> [0.025s][info][pagesize     ] Card Table:  min=409601B max=409601B 
> base=0xb3c7a000 page_size=4K size=404K
> [0.064s][info][gc           ] Using Serial
> [0.065s][info][cds          ] UseSharedSpaces: Specified shared archive 
> not found.
> [0.068s][info][startuptime  ] Genesis, 0.0438007 secs
> [0.068s][info][startuptime  ] TemplateTable initialization, 0.0001120 secs
> 
> 
> 
> I am also still trying to build the mainline jdk as suggested, but I am 
> currently facing some difficulties with that as the toolchain I was 
> using before did not meet the minimum requirements for gcc (toolchain is 
> 4.8.5) and I am trying to get one working with a newer gcc. I was also 
> unable to use the builds you have linked, as the system's glibc I'm 
> using (2.18) is also too outdated to run those.
> 
> 
> 
> 
> ------------------------------------------------------------------------
> *From:* David Holmes <david.holmes at oracle.com>
> *Sent:* Sunday, October 10, 2021 6:22 PM
> *To:* Aleksey Shipilev <shade at redhat.com>; John Cummings 
> <JohnC at synel-americas.com>; build-dev at openjdk.java.net 
> <build-dev at openjdk.java.net>
> *Subject:* Re: Unable to build Client/Server variant for OpenJDK-11 on 
> ARMv7-A
> On 9/10/2021 3:58 pm, Aleksey Shipilev wrote:
>> Hi,
>>
>> This does not look a build issue per se, but rather a Hotspot bug.
> 
> The SIGILL in ThreadGroup.add looks to me like an issue with atomic
> operations as that is the first synchronized method that gets executed
> during VM initialization.
> 
> David
> -----
> 
>> On 10/8/21 7:46 PM, John Cummings wrote:
>>> I am using the source from https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhg.openjdk.java.net%2Fjdk%2Fjdk11&data=04%7C01%7CJohnC%40synel-americas.com%7C7c661821d3f5486b0f1a08d98c559ee9%7Cce62291737b444dcb33e6a5ae5e16b70%7C0%7C0%7C637695121667542808%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jyGhwNIDDVhS7utnPcjXqOC2shrtsc7jd7sf3rQK4Io%3D&reserved=0 
> <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhg.openjdk.java.net%2Fjdk%2Fjdk11&data=04%7C01%7CJohnC%40synel-americas.com%7C7c661821d3f5486b0f1a08d98c559ee9%7Cce62291737b444dcb33e6a5ae5e16b70%7C0%7C0%7C637695121667542808%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jyGhwNIDDVhS7utnPcjXqOC2shrtsc7jd7sf3rQK4Io%3D&reserved=0>.
>>
>> This is an extremely old JDK 11 tree. The most actual one is here:
>>    https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenjdk%2Fjdk11u-dev%2F&data=04%7C01%7CJohnC%40synel-americas.com%7C7c661821d3f5486b0f1a08d98c559ee9%7Cce62291737b444dcb33e6a5ae5e16b70%7C0%7C0%7C637695121667542808%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=fOVVWMdwPE681Q%2FqlsoxWU4T8HIekEVcBA8ZDFENqJg%3D&reserved=0 
> <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenjdk%2Fjdk11u-dev%2F&data=04%7C01%7CJohnC%40synel-americas.com%7C7c661821d3f5486b0f1a08d98c559ee9%7Cce62291737b444dcb33e6a5ae5e16b70%7C0%7C0%7C637695121667542808%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=fOVVWMdwPE681Q%2FqlsoxWU4T8HIekEVcBA8ZDFENqJg%3D&reserved=0>
>>
>> FWIW, ARM32 builds from that repo work for me on RPi 4:
>>    https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbuilds.shipilev.net%2Fopenjdk-jdk11-dev%2F&data=04%7C01%7CJohnC%40synel-americas.com%7C7c661821d3f5486b0f1a08d98c559ee9%7Cce62291737b444dcb33e6a5ae5e16b70%7C0%7C0%7C637695121667542808%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=A6i3DI%2BEmzKi2Ol%2FMMFV1w1F%2B6W272yhoy1BoWqHYEk%3D&reserved=0 
> <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbuilds.shipilev.net%2Fopenjdk-jdk11-dev%2F&data=04%7C01%7CJohnC%40synel-americas.com%7C7c661821d3f5486b0f1a08d98c559ee9%7Cce62291737b444dcb33e6a5ae5e16b70%7C0%7C0%7C637695121667542808%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=A6i3DI%2BEmzKi2Ol%2FMMFV1w1F%2B6W272yhoy1BoWqHYEk%3D&reserved=0>
>>
>>> I am at the point where I am unsure where to proceed or what to
>>> change, and haven't been able to
>>> find a solution anywhere thus far to build a client version of
>>> OpenJDK-11. If there's any
>>> additional information I can/should provide, please let me know.
>>
>> Additional things to try:
>>   *) Build fastdebug, trying to see if any VM assert is triggered; pass
>> --with-debug-level=fastdebug to configure
>>   *) Build/test the JDK mainline (https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenjdk%2Fjdk%2F&data=04%7C01%7CJohnC%40synel-americas.com%7C7c661821d3f5486b0f1a08d98c559ee9%7Cce62291737b444dcb33e6a5ae5e16b70%7C0%7C0%7C637695121667542808%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FtvfBXp9aewGzl8lIRQYzBAl6E05tytgZwMF4l4lsR4%3D&reserved=0 
> <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenjdk%2Fjdk%2F&data=04%7C01%7CJohnC%40synel-americas.com%7C7c661821d3f5486b0f1a08d98c559ee9%7Cce62291737b444dcb33e6a5ae5e16b70%7C0%7C0%7C637695121667542808%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FtvfBXp9aewGzl8lIRQYzBAl6E05tytgZwMF4l4lsR4%3D&reserved=0>),
>> trying to see if this is a fixed issue that is missing a 11u backport
>>   *) Trim down --with-extra-cflags and --with-extra-cxxflags, looking
>> for some special flag that triggers the bug
>>
>> There were plenty of ARM32 bugs fixed (backported) in 11u, but I also
>> see some that are only fixed in later JDKs, for example:
>>    https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.openjdk.java.net%2Fbrowse%2FJDK-8222825&data=04%7C01%7CJohnC%40synel-americas.com%7C7c661821d3f5486b0f1a08d98c559ee9%7Cce62291737b444dcb33e6a5ae5e16b70%7C0%7C0%7C637695121667542808%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FC1gnVjYaeqeLxs8W4ZMSbw7enjBH%2Fl81Z2x5%2FUkyLo%3D&reserved=0 
> <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.openjdk.java.net%2Fbrowse%2FJDK-8222825&data=04%7C01%7CJohnC%40synel-americas.com%7C7c661821d3f5486b0f1a08d98c559ee9%7Cce62291737b444dcb33e6a5ae5e16b70%7C0%7C0%7C637695121667542808%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FC1gnVjYaeqeLxs8W4ZMSbw7enjBH%2Fl81Z2x5%2FUkyLo%3D&reserved=0>
>>
> The information contained in this message may be privileged, 
> confidential, and protected from disclosure. If the reader of this 
> message is not the intended recipient, or any employee or agent 
> responsible for delivering this message to the intended recipient, you 
> are hereby notified that any dissemination, distribution, or copying of 
> this communication is strictly prohibited. If you have received this 
> communication in error, please notify us immediately by replying to the 
> message and deleting it from your computer. Thank you.



More information about the build-dev mailing list