From owner-freebsd-java@freebsd.org Fri Sep 8 14:02:55 2017 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 434E9E19908 for ; Fri, 8 Sep 2017 14:02:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 2C00D8070D for ; Fri, 8 Sep 2017 14:02:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 2B48DE19907; Fri, 8 Sep 2017 14:02:55 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ADEFE19906 for ; Fri, 8 Sep 2017 14:02:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19E218070C for ; Fri, 8 Sep 2017 14:02:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v88E2sbL029712 for ; Fri, 8 Sep 2017 14:02:54 GMT (envelope-from bugzilla-noreply@freebsd.org) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: maintainer-feedback requested: [Bug 222146] java/openjdk8: Running a program of infinite recursion dumps core Date: Fri, 08 Sep 2017 14:02:54 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 14:02:55 -0000 Gabor Pali has reassigned Bugzilla Automation 's request for maintainer-feedback to java@FreeBSD.or= g: Bug 222146: java/openjdk8: Running a program of infinite recursion dumps co= re https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222146 --- Description --- The Java Runtime Environment shipped with the recent version of the `java/openjdk8` port crashes on an application that gets into an infinite recursion at execution. Consider an example of that, `Foo.java`: ~~~~ public class Foo { public static void main(String[] args) { main(args); } } ~~~~ that does the following: ~~~~ $ freebsd-version 11.1-RELEASE-p1 $ java -version openjdk version "1.8.0_144" OpenJDK Runtime Environment (build 1.8.0_144-b01) OpenJDK 64-Bit Server VM (build 25.144-b01, mixed mode) $ javac Foo.java $ java Foo # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=3D0x000000080394da40, pid=3D13843, tid=3D0x000000000= 00187c1 # # JRE version: OpenJDK Runtime Environment (8.0_144-b01) (build 1.8.0_144-b= 01) # Java VM: OpenJDK 64-Bit Server VM (25.144-b01 mixed mode bsd-amd64 compre= ssed oops) # Problematic frame: # J 12 C1 Foo.main([Ljava/lang/String;)V (5 bytes) @ 0x000000080394da40 [0x000000080394da40+0x0] # # Core dump written. Default location: /tmp/java.core # # An error report file with more information is saved as: # /tmp/hs_err_pid13843.log Compiled method (c1) 301 12 3 Foo::main (5 bytes) total in heap [0x000000080394d8d0,0x000000080394dca0] =3D 976 relocation [0x000000080394d9f8,0x000000080394da38] =3D 64 main code [0x000000080394da40,0x000000080394db60] =3D 288 stub code [0x000000080394db60,0x000000080394dc08] =3D 168 oops [0x000000080394dc08,0x000000080394dc10] =3D 8 metadata [0x000000080394dc10,0x000000080394dc18] =3D 8 scopes data [0x000000080394dc18,0x000000080394dc48] =3D 48 scopes pcs [0x000000080394dc48,0x000000080394dc98] =3D 80 dependencies [0x000000080394dc98,0x000000080394dca0] =3D 8 Compiled method (c1) 302 12 3 Foo::main (5 bytes) total in heap [0x000000080394d8d0,0x000000080394dca0] =3D 976 relocation [0x000000080394d9f8,0x000000080394da38] =3D 64 main code [0x000000080394da40,0x000000080394db60] =3D 288 stub code [0x000000080394db60,0x000000080394dc08] =3D 168 oops [0x000000080394dc08,0x000000080394dc10] =3D 8 metadata [0x000000080394dc10,0x000000080394dc18] =3D 8 scopes data [0x000000080394dc18,0x000000080394dc48] =3D 48 scopes pcs [0x000000080394dc48,0x000000080394dc98] =3D 80 dependencies [0x000000080394dc98,0x000000080394dca0] =3D 8 # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # Abort (core dumped) ~~~~ Note that a slightly earlier version would not crash but print the resulting exception with an endless stack trace, something along this way: ~~~~ $ java -version openjdk version "1.8.0_131" OpenJDK Runtime Environment (build 1.8.0_131-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode) $ java Foo Exception in thread "main" java.lang.StackOverflowError at Foo.main(Foo.java:3) at Foo.main(Foo.java:3) at Foo.main(Foo.java:3) [...] ~~~~ Although the program is bad, the VM should not crash still. This is reproducible on different machines, I guess it must be a regression.