Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 May 2017 09:54:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        java@FreeBSD.org
Subject:   [Bug 215286] [java/openjdk8] Java crashes/exits on i386 as soon as kernel parameters KVA_PAGES = 512 and KSTACK_PAGES = 4 set for ZFS
Message-ID:  <bug-215286-8522-5jk2jz1OvJ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-215286-8522@https.bugs.freebsd.org/bugzilla/>
References:  <bug-215286-8522@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215286

Michael Osipov <1983-01-06@gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|Affects Only Me             |Affects Many People

--- Comment #2 from Michael Osipov <1983-01-06@gmx.net> ---
I was finally able to locate the cause of this. Tried on two different setups:

Machine 1:
Pentium 4 1.4 GHz and 2 GiB RAM.

> FreeBSD bsd1home 11.0-STABLE FreeBSD 11.0-STABLE #0 r317824: Sat May  6 22:35:35 CEST 2017     mosipov@bsd1home:/usr/obj/usr/src/sys/GENERIC  i386

> openjdk version "1.8.0_131"
> OpenJDK Runtime Environment (build 1.8.0_131-b11)
> OpenJDK Server VM (build 25.131-b11, mixed mode)

to make sure that the machine is not faulty, I have set up the same in
VirtualBox, 32 bit with 2 GiB, machine 2:

> FreeBSD freebsd11-32bit 11.0-STABLE FreeBSD 11.0-STABLE #1 r317854: Fri May  5 23:55:01 CEST 2017     root@freebsd11-32bit:/usr/obj/usr/src/sys/GENERIC  i386

> openjdk version "1.8.0_131"
> OpenJDK Runtime Environment (build 1.8.0_131-b11)
> OpenJDK Server VM (build 25.131-b11, mixed mode)

Then run as root:
$ pkg install openjdk7 openjdk8 git maven33
$ git clone https://git-wip-us.apache.org/repos/asf/maven.git
$ cd maven
$ mvn clean package

It shall run flawlessly on Java 8

Now create a custom kernel config ZFS:
include GENERIC
ident BSD1HOME
options KVA_PAGES=512
options KSTACK_PAGES=4

Compile the kernel with that and rerun the mvn command, you'll see crashes
like:

> # There is insufficient memory for the Java Runtime Environment to continue.
> # Native memory allocation (malloc) failed to allocate 146808 bytes for Chunk::new
> # An error report file with more information is saved as:
> # /usr/home/mosipov/Projekte/maven/hs_err_pid934.log
> #
> # Compiler replay data is saved as:
> # /usr/home/mosipov/Projekte/maven/replay_pid934.log

or hard SIGSEGV with AsyncGetCallTrace+0x6cefc. Updated files in
http://home.apache.org/~michaelo/freebsd/issue-215286/.

Surprisingly, OpenJDK 7 works flawlessly.


There must be some broken interaction between KVA_PAGES = 512/KSTACK_PAGES = 4
and Java 8.

-- 
You are receiving this mail because:
You are the assignee for the bug.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-215286-8522-5jk2jz1OvJ>