Zero crashing on ARM

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Zero crashing on ARM

John Paul Adrian Glaubitz
Hello!

During my tests, I noticed that Zero is crashing on ARM (Debian armel):

(sid_armel-dchroot)glaubitz@abel:~/openjdk/hs$ gdb /home/glaubitz/openjdk/hs/build/linux-arm-normal-zero-release/jdk/bin/java
GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/glaubitz/openjdk/hs/build/linux-arm-normal-zero-release/jdk/bin/java...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/glaubitz/openjdk/hs/build/linux-arm-normal-zero-release/jdk/bin/java
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".
[New Thread 0xb6682470 (LWP 16442)]

Thread 2 "java" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6682470 (LWP 16442)]
OSContainer::init () at /home/glaubitz/openjdk/hs/src/hotspot/os/linux/osContainer_linux.cpp:372
372             memory->set_subsystem_path(base);
(gdb) bt
#0  OSContainer::init () at /home/glaubitz/openjdk/hs/src/hotspot/os/linux/osContainer_linux.cpp:372
#1  0xb6bee5dc in os::pd_init_container_support () at /home/glaubitz/openjdk/hs/src/hotspot/os/linux/os_linux.cpp:4908
#2  0xb67fdf7c in os::init_container_support () at /home/glaubitz/openjdk/hs/src/hotspot/share/runtime/os.hpp:152
#3  Arguments::parse_vm_init_args (java_tool_options_args=java_tool_options_args@entry=0xb6681b64, java_options_args=java_options_args@entry=0xb6681b80,
    cmd_line_args=cmd_line_args@entry=0xb6681e40) at /home/glaubitz/openjdk/hs/src/hotspot/share/runtime/arguments.cpp:2379
#4  0xb67fe1d0 in Arguments::parse (initial_cmd_args=initial_cmd_args@entry=0xb6681e40) at /home/glaubitz/openjdk/hs/src/hotspot/share/runtime/arguments.cpp:4049
#5  0xb6cc97d4 in Threads::create_vm (args=args@entry=0xb6681e40, canTryAgain=canTryAgain@entry=0xb6681dbf) at
/home/glaubitz/openjdk/hs/src/hotspot/share/runtime/thread.cpp:3974
#6  0xb6a98a5c in JNI_CreateJavaVM_inner (args=0xb6681e40, penv=0xb6681e3c, vm=0xb6681e38) at /home/glaubitz/openjdk/hs/src/hotspot/share/prims/jni.cpp:3917
#7  JNI_CreateJavaVM (vm=0xb6681e38, penv=0xb6681e3c, args=0xb6681e40) at /home/glaubitz/openjdk/hs/src/hotspot/share/prims/jni.cpp:4012
#8  0xb6f605a4 in InitializeJVM (ifn=<synthetic pointer>, penv=0xb6681e34, pvm=0xb6681e30) at
/home/glaubitz/openjdk/hs/src/java.base/share/native/libjli/java.c:1478
#9  JavaMain (_args=<optimized out>) at /home/glaubitz/openjdk/hs/src/java.base/share/native/libjli/java.c:411
#10 0xb6f81338 in start_thread () from /lib/arm-linux-gnueabi/libpthread.so.0
#11 0xb6ed10cc in ?? () from /lib/arm-linux-gnueabi/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

It also crashes on SuperH (Debian sh4) but I cannot provide a backtrace in this
case due to limitations of QEMU and GDB on SuperH currently being incomplete. But
I guess that fixing the issue on ARM will also fix the issue on SuperH.

I haven't done any debugging yet, but any input is welcome :).

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: Zero crashing on ARM

Severin Gehwolf
Hi,

It appears that platform has a different format wrt to cgroups. What do
you get when run with os+container debug logging?

/home/glaubitz/openjdk/hs/build/linux-arm-normal-zero-release/jdk/bin/java -Xlog:os+container=debug

Do you see "Incompatible str containing cgroup and memory" messages?
Contents of /proc/self/mountinfo and /proc/self/cgroup would be useful
to know too.

Thanks,
Severin

On Wed, 2017-11-29 at 09:18 +0100, John Paul Adrian Glaubitz wrote:

> Hello!
>
> During my tests, I noticed that Zero is crashing on ARM (Debian armel):
>
> (sid_armel-dchroot)glaubitz@abel:~/openjdk/hs$ gdb /home/glaubitz/openjdk/hs/build/linux-arm-normal-zero-release/jdk/bin/java
> GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git
> Copyright (C) 2016 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "arm-linux-gnueabi".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from /home/glaubitz/openjdk/hs/build/linux-arm-normal-zero-release/jdk/bin/java...(no debugging symbols found)...done.
> (gdb) r
> Starting program: /home/glaubitz/openjdk/hs/build/linux-arm-normal-zero-release/jdk/bin/java
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".
> [New Thread 0xb6682470 (LWP 16442)]
>
> Thread 2 "java" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xb6682470 (LWP 16442)]
> OSContainer::init () at /home/glaubitz/openjdk/hs/src/hotspot/os/linux/osContainer_linux.cpp:372
> 372             memory->set_subsystem_path(base);
> (gdb) bt
> #0  OSContainer::init () at /home/glaubitz/openjdk/hs/src/hotspot/os/linux/osContainer_linux.cpp:372
> #1  0xb6bee5dc in os::pd_init_container_support () at /home/glaubitz/openjdk/hs/src/hotspot/os/linux/os_linux.cpp:4908
> #2  0xb67fdf7c in os::init_container_support () at /home/glaubitz/openjdk/hs/src/hotspot/share/runtime/os.hpp:152
> #3  Arguments::parse_vm_init_args (java_tool_options_args=java_tool_options_args@entry=0xb6681b64, java_options_args=java_options_args@entry=0xb6681b80,
>     cmd_line_args=cmd_line_args@entry=0xb6681e40) at /home/glaubitz/openjdk/hs/src/hotspot/share/runtime/arguments.cpp:2379
> #4  0xb67fe1d0 in Arguments::parse (initial_cmd_args=initial_cmd_args@entry=0xb6681e40) at /home/glaubitz/openjdk/hs/src/hotspot/share/runtime/arguments.cpp:4049
> #5  0xb6cc97d4 in Threads::create_vm (args=args@entry=0xb6681e40, canTryAgain=canTryAgain@entry=0xb6681dbf) at
> /home/glaubitz/openjdk/hs/src/hotspot/share/runtime/thread.cpp:3974
> #6  0xb6a98a5c in JNI_CreateJavaVM_inner (args=0xb6681e40, penv=0xb6681e3c, vm=0xb6681e38) at /home/glaubitz/openjdk/hs/src/hotspot/share/prims/jni.cpp:3917
> #7  JNI_CreateJavaVM (vm=0xb6681e38, penv=0xb6681e3c, args=0xb6681e40) at /home/glaubitz/openjdk/hs/src/hotspot/share/prims/jni.cpp:4012
> #8  0xb6f605a4 in InitializeJVM (ifn=<synthetic pointer>, penv=0xb6681e34, pvm=0xb6681e30) at
> /home/glaubitz/openjdk/hs/src/java.base/share/native/libjli/java.c:1478
> #9  JavaMain (_args=<optimized out>) at /home/glaubitz/openjdk/hs/src/java.base/share/native/libjli/java.c:411
> #10 0xb6f81338 in start_thread () from /lib/arm-linux-gnueabi/libpthread.so.0
> #11 0xb6ed10cc in ?? () from /lib/arm-linux-gnueabi/libc.so.6
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
> (gdb)
>
> It also crashes on SuperH (Debian sh4) but I cannot provide a backtrace in this
> case due to limitations of QEMU and GDB on SuperH currently being incomplete. But
> I guess that fixing the issue on ARM will also fix the issue on SuperH.
>
> I haven't done any debugging yet, but any input is welcome :).
>
> Adrian
>

Reply | Threaded
Open this post in threaded view
|

Re: Zero crashing on ARM

John Paul Adrian Glaubitz
Hi Severin!

On 11/29/2017 11:33 AM, Severin Gehwolf wrote:
> It appears that platform has a different format wrt to cgroups. What do
> you get when run with os+container debug logging?
>
> /home/glaubitz/openjdk/hs/build/linux-arm-normal-zero-release/jdk/bin/java -Xlog:os+container=debug

It doesn't get that far, unfortunately:

(sid_armel-dchroot)glaubitz@abel:~/openjdk/hs$ /home/glaubitz/openjdk/hs/build/linux-arm-normal-zero-release/jdk/bin/java -Xlog:os+container=debug
Segmentation fault
(sid_armel-dchroot)glaubitz@abel:~/openjdk/hs$

> Do you see "Incompatible str containing cgroup and memory" messages?
> Contents of /proc/self/mountinfo and /proc/self/cgroup would be useful
> to know too.

I don't have access to these (it's one of Debian's porterboxes):

(sid_armel-dchroot)glaubitz@abel:~/openjdk/hs$ /proc/self/mountinfo
-bash: /proc/self/mountinfo: Permission denied
(sid_armel-dchroot)glaubitz@abel:~/openjdk/hs$ /proc/self/cgroup
-bash: /proc/self/cgroup: Permission denied
(sid_armel-dchroot)glaubitz@abel:~/openjdk/hs$

Would that cause the problem?

Adrian

--
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: Zero crashing on ARM

John Paul Adrian Glaubitz
On 11/29/2017 12:49 PM, John Paul Adrian Glaubitz wrote:
> I don't have access to these (it's one of Debian's porterboxes):
Here's the /proc data from the emulated sh4 porterbox:

(sid-sh4-sbuild)glaubitz@nofan:/local_scratch/glaubitz/openjdk/hs$ cat /proc/self/mountinfo
216 82 0:48 / /dev/shm rw,relatime shared:138 - tmpfs none rw
225 82 8:5 / /local_scratch rw,relatime shared:33 - ext4 /dev/sda5 rw,data=ordered
232 82 0:4 / /proc rw,nosuid,nodev,noexec,relatime shared:13 - proc proc rw
233 225 0:4 / /local_scratch/sid-sh4-sbuild/proc rw,nosuid,nodev,noexec,relatime shared:13 - proc proc rw
221 82 0:18 / /sys rw,nosuid,nodev,noexec,relatime shared:7 - sysfs sysfs rw
222 225 0:18 / /local_scratch/sid-sh4-sbuild/sys rw,nosuid,nodev,noexec,relatime shared:7 - sysfs sysfs rw
256 82 0:6 / /dev rw,nosuid,relatime shared:2 - devtmpfs udev rw,size=8136004k,nr_inodes=2034001,mode=755
257 225 0:6 / /local_scratch/sid-sh4-sbuild/dev rw,nosuid,relatime shared:2 - devtmpfs udev rw,size=8136004k,nr_inodes=2034001,mode=755
(sid-sh4-sbuild)glaubitz@nofan:/local_scratch/glaubitz/openjdk/hs$ cat /proc/self/cgroup
10:perf_event:/
9:cpuset:/
8:pids:/user.slice/user-0.slice/session-c102.scope
7:net_cls,net_prio:/
6:cpu,cpuacct:/user.slice/user-0.slice/session-c102.scope
5:blkio:/user.slice/user-0.slice/session-c102.scope
4:devices:/user.slice/user-0.slice/session-c102.scope
3:memory:/user.slice/user-0.slice/session-c102.scope
2:freezer:/
1:name=systemd:/user.slice/user-0.slice/session-c102.scope
(sid-sh4-sbuild)glaubitz@nofan:/local_scratch/glaubitz/openjdk/hs$ /local_scratch/glaubitz/openjdk/hs/build/linux-sh-normal-zero-release/jdk/bin/java
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
(sid-sh4-sbuild)glaubitz@nofan:/local_scratch/glaubitz/openjdk/hs$

--
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: Zero crashing on ARM

John Paul Adrian Glaubitz
In reply to this post by John Paul Adrian Glaubitz
On 11/29/2017 09:18 AM, John Paul Adrian Glaubitz wrote:
> During my tests, I noticed that Zero is crashing on ARM (Debian armel):
Will now also test Server and Zero on ARMv7.

Adrian

--
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: Zero crashing on ARM

John Paul Adrian Glaubitz
On 11/29/2017 01:19 PM, John Paul Adrian Glaubitz wrote:
> On 11/29/2017 09:18 AM, John Paul Adrian Glaubitz wrote:
>> During my tests, I noticed that Zero is crashing on ARM (Debian armel):
> Will now also test Server and Zero on ARMv7.

Ok, it's not ARM-specific, crashes on x86_64 as well. Must be related
to the chroot environment. This should definitely be fixed as otherwise
distributions won't be able to build OpenJDK inside a chroot environment.

(sid-amd64-sbuild)root@trlin:/usr/src/hs# gdb /usr/src/hs/build/linux-x86_64-normal-zero-release/jdk/bin/java
GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/src/hs/build/linux-x86_64-normal-zero-release/jdk/bin/java...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/src/hs/build/linux-x86_64-normal-zero-release/jdk/bin/java
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7fe1700 (LWP 116310)]

Thread 2 "java" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fe1700 (LWP 116310)]
OSContainer::init () at /usr/src/hs/src/hotspot/os/linux/osContainer_linux.cpp:374
374             cpuset->set_subsystem_path(base);
(gdb) bt
#0  OSContainer::init () at /usr/src/hs/src/hotspot/os/linux/osContainer_linux.cpp:374
#1  0x00007ffff6d00dca in os::pd_init_container_support () at /usr/src/hs/src/hotspot/os/linux/os_linux.cpp:4908
#2  0x00007ffff690ddfd in os::init_container_support () at /usr/src/hs/src/hotspot/share/runtime/os.hpp:152
#3  Arguments::parse_vm_init_args (java_tool_options_args=java_tool_options_args@entry=0x7ffff7fe0a90, java_options_args=0x7ffff7fe0ac0, cmd_line_args=cmd_line_args@entry=0x7ffff7fe0ef0)
     at /usr/src/hs/src/hotspot/share/runtime/arguments.cpp:2379
#4  0x00007ffff690e101 in Arguments::parse (initial_cmd_args=initial_cmd_args@entry=0x7ffff7fe0ef0) at /usr/src/hs/src/hotspot/share/runtime/arguments.cpp:4049
#5  0x00007ffff6de15cd in Threads::create_vm (args=0x7ffff7fe0ef0, canTryAgain=canTryAgain@entry=0x7ffff7fe0e27) at /usr/src/hs/src/hotspot/share/runtime/thread.cpp:3974
#6  0x00007ffff6babfd1 in JNI_CreateJavaVM_inner (args=<optimized out>, penv=0x7ffff7fe0ee8, vm=0x7ffff7fe0ee0) at /usr/src/hs/src/hotspot/share/prims/jni.cpp:3917
#7  JNI_CreateJavaVM (vm=0x7ffff7fe0ee0, penv=0x7ffff7fe0ee8, args=<optimized out>) at /usr/src/hs/src/hotspot/share/prims/jni.cpp:4012
#8  0x00007ffff7795e34 in InitializeJVM (ifn=<synthetic pointer>, penv=0x7ffff7fe0ee8, pvm=0x7ffff7fe0ee0) at /usr/src/hs/src/java.base/share/native/libjli/java.c:1478
#9  JavaMain (_args=<optimized out>) at /usr/src/hs/src/java.base/share/native/libjli/java.c:411
#10 0x00007ffff79a9517 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007ffff72d782f in clone () from /lib/x86_64-linux-gnu/libc.so.6
(gdb)

--
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: Zero crashing on ARM

John Paul Adrian Glaubitz
On 11/29/2017 01:39 PM, John Paul Adrian Glaubitz wrote:
> On 11/29/2017 01:19 PM, John Paul Adrian Glaubitz wrote:
>> On 11/29/2017 09:18 AM, John Paul Adrian Glaubitz wrote:
>>> During my tests, I noticed that Zero is crashing on ARM (Debian armel):
>> Will now also test Server and Zero on ARMv7.
>
> Ok, it's not ARM-specific, crashes on x86_64 as well. Must be related
> to the chroot environment. This should definitely be fixed as otherwise
> distributions won't be able to build OpenJDK inside a chroot environment.
It also affects the Server variant on x86_64, I have filed 8192154 [1].

Adrian

> [1] https://bugs.openjdk.java.net/browse/JDK-8192154

--
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

JVM crashing insides chroots - was: Re: Zero crashing on ARM

John Paul Adrian Glaubitz
On 11/29/2017 02:01 PM, John Paul Adrian Glaubitz wrote:
> It also affects the Server variant on x86_64, I have filed 8192154 [1].
>
Severin had the right idea. Passing "-XX:-UseContainerSupport" resolves
the issue. However, I think that shouldn't be necessary in case of chroots,
should it?

In any case, it will potentially cause issues with chroots as they are used
on Linux distributions for building packages.

Adrian

--
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: JVM crashing insides chroots - was: Re: Zero crashing on ARM

Severin Gehwolf
On Wed, 2017-11-29 at 14:30 +0100, John Paul Adrian Glaubitz wrote:

> On 11/29/2017 02:01 PM, John Paul Adrian Glaubitz wrote:
> > It also affects the Server variant on x86_64, I have filed 8192154 [1].
> >
>
> Severin had the right idea. Passing "-XX:-UseContainerSupport" resolves
> the issue. However, I think that shouldn't be necessary in case of chroots,
> should it?
>
> In any case, it will potentially cause issues with chroots as they are used
> on Linux distributions for building packages.

Agreed. It needs to be fixed. The default is +UseContainerSupport after
all.

Thanks,
Severin
Reply | Threaded
Open this post in threaded view
|

Re: JVM crashing insides chroots - was: Re: Zero crashing on ARM

John Paul Adrian Glaubitz
On 11/29/2017 02:49 PM, Severin Gehwolf wrote:
>> In any case, it will potentially cause issues with chroots as they are used
>> on Linux distributions for building packages.
>
> Agreed. It needs to be fixed. The default is +UseContainerSupport after
> all.
It seems to have huge performance impact, too:

(sid-amd64-sbuild)root@trlin:/usr/src/hs# time /usr/bin/java -version
openjdk version "9.0.1"
OpenJDK Runtime Environment (build 9.0.1+11-Debian-1)
OpenJDK 64-Bit Server VM (build 9.0.1+11-Debian-1, mixed mode)

real    0m0.101s
user    0m0.128s
sys     0m0.019s
(sid-amd64-sbuild)root@trlin:/usr/src/hs# time /usr/src/hs/build/linux-x86_64-normal-zero-release/jdk/bin/java -XX:-UseContainerSupport -version
openjdk version "10-internal"
OpenJDK Runtime Environment (build 10-internal+0-adhoc.root.hs)
OpenJDK 64-Bit Zero VM (build 10-internal+0-adhoc.root.hs, interpreted mode)

real    0m26.010s
user    0m25.551s
sys     0m0.380s
(sid-amd64-sbuild)root@trlin:/usr/src/hs#

--
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: Zero crashing on ARM

Bob Vandette
In reply to this post by John Paul Adrian Glaubitz
I’ll take that bug.  It looks related to the new cgroup support that I just added
under https://bugs.openjdk.java.net/browse/JDK-8146115 <https://bugs.openjdk.java.net/browse/JDK-8146115>.


Bob.



> On Nov 29, 2017, at 8:01 AM, John Paul Adrian Glaubitz <[hidden email]> wrote:
>
> On 11/29/2017 01:39 PM, John Paul Adrian Glaubitz wrote:
>> On 11/29/2017 01:19 PM, John Paul Adrian Glaubitz wrote:
>>> On 11/29/2017 09:18 AM, John Paul Adrian Glaubitz wrote:
>>>> During my tests, I noticed that Zero is crashing on ARM (Debian armel):
>>> Will now also test Server and Zero on ARMv7.
>> Ok, it's not ARM-specific, crashes on x86_64 as well. Must be related
>> to the chroot environment. This should definitely be fixed as otherwise
>> distributions won't be able to build OpenJDK inside a chroot environment.
> It also affects the Server variant on x86_64, I have filed 8192154 [1].
>
> Adrian
>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8192154
>
> --
> .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer - [hidden email]
> `. `'   Freie Universitaet Berlin - [hidden email]
>  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply | Threaded
Open this post in threaded view
|

Re: JVM crashing insides chroots - was: Re: Zero crashing on ARM

Severin Gehwolf
In reply to this post by John Paul Adrian Glaubitz
On Wed, 2017-11-29 at 14:56 +0100, John Paul Adrian Glaubitz wrote:

> On 11/29/2017 02:49 PM, Severin Gehwolf wrote:
> > > In any case, it will potentially cause issues with chroots as they are used
> > > on Linux distributions for building packages.
> >
> > Agreed. It needs to be fixed. The default is +UseContainerSupport after
> > all.
>
> It seems to have huge performance impact, too:
>
> (sid-amd64-sbuild)root@trlin:/usr/src/hs# time /usr/bin/java -version
> openjdk version "9.0.1"
> OpenJDK Runtime Environment (build 9.0.1+11-Debian-1)
> OpenJDK 64-Bit Server VM (build 9.0.1+11-Debian-1, mixed mode)
>
> real    0m0.101s
> user    0m0.128s
> sys     0m0.019s
> (sid-amd64-sbuild)root@trlin:/usr/src/hs# time /usr/src/hs/build/linux-x86_64-normal-zero-release/jdk/bin/java -XX:-UseContainerSupport -version
> openjdk version "10-internal"
> OpenJDK Runtime Environment (build 10-internal+0-adhoc.root.hs)
> OpenJDK 64-Bit Zero VM (build 10-internal+0-adhoc.root.hs, interpreted mode)
>
> real    0m26.010s
> user    0m25.551s
> sys     0m0.380s
> (sid-amd64-sbuild)root@trlin:/usr/src/hs#

You are comparing a JIT server JVM with Zero. That's expected ;-)

Thanks,
Severin
Reply | Threaded
Open this post in threaded view
|

Re: JVM crashing insides chroots - was: Re: Zero crashing on ARM

John Paul Adrian Glaubitz
On 11/29/2017 03:08 PM, Severin Gehwolf wrote:
> You are comparing a JIT server JVM with Zero. That's expected ;-)

Well, sorry, that was by accident, I didn't mean to run Server.

However, there is definitely a performance regression in Zero and I
expect it's due to the container stuff:

(sid-sh4-sbuild)glaubitz@nofan:/local_scratch/glaubitz/openjdk/hs$ time /usr/bin/java -version
openjdk version "9.0.1"
OpenJDK Runtime Environment (build 9.0.1+11-Debian-1)
OpenJDK Zero VM (build 9.0.1+11-Debian-1, interpreted mode)

real    0m0.572s
user    0m0.572s
sys     0m0.004s
(sid-sh4-sbuild)glaubitz@nofan:/local_scratch/glaubitz/openjdk/hs$ time /local_scratch/glaubitz/openjdk/hs/build/linux-sh-normal-zero-release/jdk/bin/java -XX:-UseContain>
qemu: Unsupported syscall: 318
Unsupported setsockopt level=1 optname=15
openjdk version "10-internal"
OpenJDK Runtime Environment (build 10-internal+0-adhoc.glaubitz.hs)
OpenJDK Zero VM (build 10-internal+0-adhoc.glaubitz.hs, interpreted mode)

real    1m49.166s
user    1m49.019s
sys     0m0.152s
(sid-sh4-sbuild)glaubitz@nofan:/local_scratch/glaubitz/openjdk/hs$

--
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: JVM crashing insides chroots - was: Re: Zero crashing on ARM

John Paul Adrian Glaubitz
On 11/29/2017 03:12 PM, John Paul Adrian Glaubitz wrote:
> On 11/29/2017 03:08 PM, Severin Gehwolf wrote:
>> You are comparing a JIT server JVM with Zero. That's expected ;-)
>
> Well, sorry, that was by accident, I didn't mean to run Server.
For completeness' sake, here's the Server variant:

(sid-amd64-sbuild)root@trlin:/usr/src/hs# time /usr/bin/java -version
openjdk version "9.0.1"
OpenJDK Runtime Environment (build 9.0.1+11-Debian-1)
OpenJDK 64-Bit Server VM (build 9.0.1+11-Debian-1, mixed mode)

real    0m0.101s
user    0m0.112s
sys     0m0.032s
(sid-amd64-sbuild)root@trlin:/usr/src/hs# time /usr/src/hs/build/linux-x86_64-normal-server-release/jdk/bin/java -XX:-UseContainerSupport -version
openjdk version "10-internal"
OpenJDK Runtime Environment (build 10-internal+0-adhoc.root.hs)
OpenJDK 64-Bit Server VM (build 10-internal+0-adhoc.root.hs, mixed mode)

real    0m1.080s
user    0m3.622s
sys     0m0.591s
(sid-amd64-sbuild)root@trlin:/usr/src/hs#

--
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reply | Threaded
Open this post in threaded view
|

Re: JVM crashing insides chroots - was: Re: Zero crashing on ARM

David Holmes
Hi Adrian,

You are running from an exploded build. Try "make images" and retest
using build/linux-x86_64-normal-server-release/images/jdk/bin/java

David

On 30/11/2017 12:16 AM, John Paul Adrian Glaubitz wrote:

> On 11/29/2017 03:12 PM, John Paul Adrian Glaubitz wrote:
>> On 11/29/2017 03:08 PM, Severin Gehwolf wrote:
>>> You are comparing a JIT server JVM with Zero. That's expected ;-)
>>
>> Well, sorry, that was by accident, I didn't mean to run Server.
> For completeness' sake, here's the Server variant:
>
> (sid-amd64-sbuild)root@trlin:/usr/src/hs# time /usr/bin/java -version
> openjdk version "9.0.1"
> OpenJDK Runtime Environment (build 9.0.1+11-Debian-1)
> OpenJDK 64-Bit Server VM (build 9.0.1+11-Debian-1, mixed mode)
>
> real    0m0.101s
> user    0m0.112s
> sys     0m0.032s
> (sid-amd64-sbuild)root@trlin:/usr/src/hs# time
> /usr/src/hs/build/linux-x86_64-normal-server-release/jdk/bin/java
> -XX:-UseContainerSupport -version
> openjdk version "10-internal"
> OpenJDK Runtime Environment (build 10-internal+0-adhoc.root.hs)
> OpenJDK 64-Bit Server VM (build 10-internal+0-adhoc.root.hs, mixed mode)
>
> real    0m1.080s
> user    0m3.622s
> sys     0m0.591s
> (sid-amd64-sbuild)root@trlin:/usr/src/hs#
>