[Bug 215286] [java/openjdk8] Java crashes/exits on i386 as soon as kernel parameters KVA_PAGES = 512 and KSTACK_PAGES = 4 set for ZFS

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun May 7 09:54:04 UTC 2017


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

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

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

--- Comment #2 from Michael Osipov <1983-01-06 at 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 at 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 at 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.


More information about the freebsd-java mailing list