Execution problems with Atomic Operations on OpenJDK10 for ARM5 Soft Float

bren at juanantonio.info bren at juanantonio.info
Thu Apr 5 03:30:57 UTC 2018


Hi David,

Many thanks for the comments.

In relation to the ARMV5 support, in the past Oracle released a version 
for Mindstorms:
http://www.oracle.com/technetwork/java/embedded/downloads/javase/javaseemeddedev3-1982511.html

but if you observe that release was Java 8.

For Java 9, we could build JDK and JRI (Java Runtime Images)
https://github.com/ev3dev-lang-java/openjdk-ev3/releases/tag/v0.4.5

I wish with your local path suggestion, we could build OpenJDK 10.
Later, we will try with OpenJDK11.

I have to see how to automate the whole process on Travis CI.

Cheers

Juan Antonio

El 2018-04-05 04:23, David Holmes escribió:
> On 5/04/2018 11:26 AM, bren at juanantonio.info wrote:
>> Good night David,
>> 
>> It is the first time that I report a Bug on OpenJDK and I didn´t 
>> receive any notification so I didn´t know the status of the Issue that 
>> I reported.
> 
> Sorry about that. You should have received some form of notification.
> 
>> Many thanks with the link about the Platforms supported:
>> http://www.oracle.com/technetwork/java/javase/documentation/jdk10certconfig-4417031.html 
>> We will try to do Compilation with the solution.
>> 
>> --- a/src/hotspot/cpu/arm/vm_version_arm_32.cpp
>> +++ b/src/hotspot/cpu/arm/vm_version_arm_32.cpp
>> @@ -298,6 +298,15 @@
>>       FLAG_SET_DEFAULT(UseUnalignedAccesses, false);
>>     }
>> 
>> + if (arm_arch() == 5) {
>> + if (FLAG_IS_DEFAULT(AssumeMP)) {
>> + FLAG_SET_DEFAULT(AssumeMP, false);
>> + else if (AssumeMP) {
>> + warning("AssumeMP can not be true for ARMv5 as there is only 
>> uniprocessor support");
>> + FLAG_SET_DEFAULT(AssumeMP, false);
>> + }
>> + }
>> +
>>     _is_initialized = true;
>>   }
>> 
>> Runtime workaround: java -XX:-AssumeMP
>> 
>> In our case, I would like to continue maintaining this support for the 
>> Device.
>> What is the advice that you could give us?
> 
> You would have to keep the local copy of your source code patched and
> produce your own builds. But if you also try to update with the
> mainline OpenJDK code then you will very soon hit problems. In fact
> I'd be very surprised if this works today, even if it builds, as we
> have not provided any updates to ARM32 in a long time. The only
> supported way to run on ARM32 is using the Zero interpreter as Adrian
> replied.
> 
>> What is AssumeMP?
> 
> Assume Multi-Processor.
> 
> When running on a MP system the VM has to use and generate code that
> provides the correct level of atomicity and memory consistency - none
> of which is necessary on a uniprocessor system. MP systems are the
> norm and in the rare case we issue the additional memory
> synchronization instructions they should be no-ops on a uniprocessor,
> so we are heading towards stripping out uniprocessor support and only
> build in MP support so that we don't need dynamic checks through the
> code to see if we are MP or not. Switching AssumeMP to true was the
> first step in that process (and avoided problems where the VM may be
> started with only one processor available but then had additional ones
> added later.)
> 
> In any case there has never been any support for ARMv5 multiprocessors.
> 
> Cheers,
> David
> 
>> For education, this device is pretty interesting for the whole Java 
>> community, this is the reason.
> 
> 
>> I will inform with the results.
>> 
>> Many thanks in advance.
>> 
>> Cheers
>> 
>> Juan Antonio
>> 
>> El 2018-04-05 00:12, David Holmes escribió:
>>> Hi,
>>> 
>>> This was already reported as:
>>> 
>>> https://bugs.openjdk.java.net/browse/JDK-8200580
>>> 
>>> to which I have responded and closed the bug as this is not a
>>> supported platform.
>>> 
>>> As per the bug report this may be due to the change to AssumeMP to be
>>> true, but there is no MP support for ARMv5.
>>> 
>>> David
>>> 
>>> On 4/04/2018 8:29 PM, bren at juanantonio.info wrote:
>>>> Good morning,
>>>> 
>>>> Mi name is Juan Antonio Breña Moral, I am developing a set of Java 
>>>> libraries for Lego Mindstorms EV3, an ARM5 robotics device and 
>>>> recently, we build OpenJDK 9 with success but with OpenJDK 10, we 
>>>> have found some problems when we execute some Java programs.
>>>> 
>>>> Repository to build OpenJDK 9/10 for ARM5 Soft Float:
>>>> https://github.com/ev3dev-lang-java/openjdk-ev3
>>>> 
>>>> To test the JVM, I am using the following repo to test the VM:
>>>> https://github.com/ev3dev-lang-java/vmbenchmarks
>>>> 
>>>> And this is the output with the error:
>>>> 
>>>> robot at ev3dev:~$ java -jar benchmarks.jar -f 1
>>>> WARNING: An illegal reflective access operation has occurred
>>>> WARNING: Illegal reflective access by org.openjdk.jmh.util.Utils 
>>>> (file:/home/robot/benchmarks.jar) to field java.io.Console.cs
>>>> WARNING: Please consider reporting this to the maintainers of 
>>>> org.openjdk.jmh.util.Utils
>>>> WARNING: Use --illegal-access=warn to enable warnings of further 
>>>> illegal reflective access operations
>>>> WARNING: All illegal access operations will be denied in a future 
>>>> release
>>>> =============== DEBUG MESSAGE: Atomic load(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic store(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic load(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> [thread 4430 also had an error]
>>>> [error occurred during error reporting ((null)), id 0xe0000000]
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic store(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> 
>>>> [error occurred during error reporting (printing fatal error 
>>>> message), id 0xe0000000]
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic store(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> 
>>>> [error occurred during error reporting (printing type of error), id 
>>>> 0xe0000000]
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic store(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> 
>>>> [error occurred during error reporting (printing stack bounds), id 
>>>> 0xe0000000]
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic store(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> 
>>>> [error occurred during error reporting (printing native stack), id 
>>>> 0xe0000000]
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic store(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> 
>>>> [error occurred during error reporting (printing Java stack), id 
>>>> 0xe0000000]
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic store(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> 
>>>> [error occurred during error reporting (printing target Java thread 
>>>> stack), id 0xe0000000]
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic store(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> 
>>>> [error occurred during error reporting (printing siginfo), id 
>>>> 0xe0000000]
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic store(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> 
>>>> [error occurred during error reporting (CDS archive access warning), 
>>>> id 0xe0000000]
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic store(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> 
>>>> [error occurred during error reporting (printing register info), id 
>>>> 0xe0000000]
>>>> 
>>>> =============== DEBUG MESSAGE: Atomic store(jlong) unsupported on 
>>>> this platform ================
>>>> 
>>>> 
>>>> [Too many errors, abort]
>>>> Aborted
>>>> 
>>>> I think that in OpenJDK10 changed something in compare to OpenJDK9 
>>>> in relation to ARM5 support.
>>>> 
>>>> Any idea?
>>>> 
>>>> Many thanks in advance.
>>>> 
>>>> Cheers
>>>> 
>>>> Juan Antonio
>>>> 



More information about the build-dev mailing list