-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qemu-arm-static 2.8 and Java+Maven setup not working #18
Comments
Similar bug on aarch64 (arm64): https://bugs.linaro.org/show_bug.cgi?id=3259 that bug summary:
|
@slamont - are you still seeing this issue? |
We still see the problem in our production setup. But we have a workaround and stop the investigation. The workaround for us, is to limit Docker to use only 1 cpu (--cpuset-cpus="0") which could means that this problem is related to Multi-thread in qemu. I'll update the test repository with the latest 2.8.4 and will add 2.9.1 to see if it change anything. |
Test repo is now upgraded. While testing the modifications, the workaround worked for all versions. Without the workaround, 2.8 and 2.9 fails. The test now run twice by version, first is with the workaround (--cpuset-cpus="0") the second is without it. |
Thanks @slamont . Stuart Monteith has this report from the Linaro bug tracker at https://bugs.linaro.org/show_bug.cgi?id=3259#c4
There's also a bug report on Launchpad at https://bugs.launchpad.net/qemu/+bug/1659901 with this comment from rdicroce:
|
The rdicroce report above also identifies when the build broke:
|
http://lists.nongnu.org/archive/html/qemu-devel/2014-03/msg01665.html gives a perspective from 2014 as to how threading in Java is not going to be easy to support in QEMU. Peter Maydell wrote then, referring to another Java crash in QEMU:
|
I'm seeing this manifest in an arm chroot env, on opensuse host
where
Do I understand that this is, in fact, a qemu issue? Given @vielmetti 's last comment, is there a fix available/planned? |
As reported in multiarch/qemu-user-static#18 this can solve (or reduce) isssues with running Java code, especially javac and maven in qemu ARM emulation. Change-type: patch Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
As reported in multiarch/qemu-user-static#18 this can solve (or reduce) isssues with running Java code, especially javac and maven in qemu ARM emulation. Change-type: patch Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
I experienced the similar issue when installing Java on the QEMU environment. SIGSEGV (core dump) java -Xmx64m -jar $JAR -storepass "$storepass" Here is the reproducer script.
Do you know how to avoid this error? |
If you force docker to use only one CPU of should do the trick.
That's what we did and we are using it in our build environment without
issue. It's slower than I would've liked, but it does the job.
I'm currently not at work, so I don't have the exact docker command. Let me
know if you need it.
Also, I don't know if it changes anything, but since Java 8_191 there seems
to be a better support of the containers for the JVM. So, maybe the CPU
trick can be avoided, I don't know.
Sylvain Lamontagne
Le jeu. 7 mars 2019 13:01, Jun Aruga <notifications@github.com> a écrit :
… I experienced the similar issue when installing Java on the QEMU
environment.
SIGSEGV (core dump) java -Xmx64m -jar $JAR -storepass "$storepass"
https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1818631
Here is the reproducer script.
https://github.com/junaruga/ubuntu-arm-java-sigsegv
$ docker run --rm --privileged multiarch/qemu-user-static:register --reset
$ docker build --rm -t sample -f Dockerfile-arm64 .
Do you know how to avoid this error?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABeXXSCSC3OMjlI5mcVO-S2Gcslb-EKHks5vUVPcgaJpZM4MAJF->
.
|
Hi @slamont Thanks for your info and your help!
I want to know the exact docker commend. Because I assumed the command is
But below commands still show same error.
https://github.com/junaruga/ubuntu-arm-java-sigsegv/tree/feature/one-cpu |
Hi @junaruga, just adding So, we have a Docker image built from a Debian Jessie Arm filesystem, with qemu-arm-static 2.7 and run our container with |
@slamont thank you for the info.
What is the actual commands you executed on the Debian system? I tried to see the environment to check the version of qemu with
But it seems the
I could not check the version by myself. |
QEMU 2.7 and 2.8 are quite old versions -- we think we fixed the java segfaults in upstream QEMU in about the 2.12 release. Is it possible for you to try this with a more recent QEMU release, like 3.1 or the (about to be released) 4.0 ? |
@pm215 - the place to introduce new versions is in the toolchains used for cross-development on systems like Travis CI. We'd need to dig into the base containers used to do cross-builds (often embedded in Dockerfiles and base layers) and identify how to tip the ecosystem forwards towards a newer release. It looks like this particular repo has a toolchain path that gets a 3.1 release and pushes it into Alpine via a Fedora RPM and rpm2cpio (a somewhat esoteric path). Has QEMU 3.1 been bundled for Debian distribution? |
I might find a part using the old version QEMU v2.12.0 in the container "ubuntu-debootstrap" that I was using. I sent pull-request to use the latest qemu-user-static here. |
For debian-debootstrap, here is the pull-request. |
@slamont I was success to run java on my environment with ubuntu-debootstrap bionic by above pull-request to ubuntu-debootstrap repository to update qemu to 3.1.0! https://github.com/junaruga/ubuntu-arm-java-sigsegv
I assume you are trying to use
Because below trigger file to create the new container images does not include jessie (removed it) by multiarch/debian-debootstrap@184214f . But debian sid using qemu 3.1.0.
So, if you can use sid, you do not see the java issue on your side, I think we can close this ticket. |
Looks related to docker/for-mac#3646 |
@vielmetti this issue still happens on your environment? |
Yes @junaruga - the particular circumstance is that Docker has a new feature No need to reopen this ticket, but it provides useful context for people working on the other. Basically the working strategy is if you find QEMU 2.8 in the wild, or embedded into a container image, you should root it out and replace it with something newer. |
@vielmetti sure, thanks for the explanation. By the way, for ubuntu-core, here is the pull-request to update qemu. |
Thanks @junaruga - appreciated. I'll do some searching through github and try to find other images with QEMU 2.8 that should be updated. |
The ubuntu-core changes for a newer QEMU have been merged. |
Hi,
We have systems that would stop working if we want to use the qemu-arm-static v2.8.0 that is used in this project.
I've created a project to demonstrate the problem.
I'm not quite sure where the problem is to be honest, is it with Docker, qemu or Java ? I don't know for sure. But what I do know, is that it was working with 2.5, 2.6 and 2.7 and stopped working with 2.8
The demonstration project linked above is a very simplified version of what we use and was created specifically to help the debugging of this issue. So feel free to clone it and let me know if you need more information.
The Dockerfile start from "multiarch/debian-debootstrap:armhf-jessie" and simply add oracle-java and maven. The qemu-arm-static binaries are overridden using volume bind (-v).
The test.sh will take care of everything to demonstrate the problem
The text was updated successfully, but these errors were encountered: