Hard Crash on OS X and Linux (but somewhat environment dependent)
Gilles Duboscq
duboscq at ssw.jku.at
Wed Dec 10 10:53:12 UTC 2014
Hello Stefan,
I see a lot of unsafeCast calls where the last argument is true. That
sounds dangerous.
Are you sure your casts really *always* hold? Regardless of
control-flow? This argument should be the condition under which that
cast is safe, which is usually a condition that you have already
checked in the control-flow that leads to the cast.
-Gilles
On Wed, Dec 10, 2014 at 12:15 AM, Stefan Marr <java at stefan-marr.de> wrote:
> Hi Gilles:
>
> Here the log file.
>
> Best regards
> Stefan
>
>
>
>
>
>> On 10 Dec 2014, at 00:04, Gilles Duboscq <duboscq at ssw.jku.at> wrote:
>>
>> Hello Stefan,
>>
>> Thanks for the report.
>> Could you send us the hs_err file as well (hs_err_pid68949.log)?
>>
>> -Gilles
>>
>> On Tue, Dec 9, 2014 at 11:35 PM, Stefan Marr <java at stefan-marr.de> wrote:
>>> Hi:
>>>
>>> In one of my experiments, I got a hard crash of the Graal VM.
>>> Error below.
>>>
>>> The error is somewhat dependent on either environment or for instance whether -ea and/or -esa are passed to the VM.
>>> Though, I haven’t managed to find a way to avoid crashes reliably.
>>>
>>> To reproduced, you’ll need with a little API change (see patch below) or my version of GraalVM.
>>>
>>> git clone https://github.com/smarr/GraalVM.git
>>> cd GraalVM
>>> ./mx.sh --vm server build -p
>>> cd ../
>>> git clone -b mt-vs-pe/without-control-specialization https://github.com/smarr/TruffleSOM.git
>>> cd TruffleSOM
>>> ant
>>> ../GraalVM/mxtool/mx --vm server vm -Xbootclasspath/a:build/classes som.vm.Universe -cp Smalltalk:Examples/Benchmarks/DeltaBlue Examples/Benchmarks/BenchmarkHarness.som DeltaBlue 1500 0 6000
>>>
>>> Best regards
>>> Stefan
>>>
>>>
>>> #
>>> # A fatal error has been detected by the Java Runtime Environment:
>>> #
>>> # SIGSEGV (0xb) at pc=0x000000010d601e5b, pid=68949, tid=4867
>>> #
>>> # JRE version: Java(TM) SE Runtime Environment (8.0_20-b26) (build 1.8.0_20-b26)
>>> # Java VM: OpenJDK 64-Bit Server VM (25.25-b02-internal-graal-unknown-venus-2-2014-12-09_22-44-20_CET mixed mode bsd-amd64 compressed oops)
>>> # Problematic frame:
>>> # J 7192 Graal com.oracle.graal.truffle.OptimizedCallTarget.callRoot([Ljava/lang/Object;)Ljava/lang/Object; (191 bytes) @ 0x000000010d601e5b [0x000000010d601e20+0x3b]
>>> #
>>> # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
>>> #
>>> # An error report file with more information is saved as:
>>> # /Users/smarr/Projects/PostDoc/Truffle/som/hs_err_pid68949.log
>>> Loaded disassembler from /Users/smarr/Projects/PostDoc/Truffle/graal/jdk1.8.0_20/product/jre/lib/hsdis-amd64.dylib
>>> Compiled method (Graal) 12445 7192 4 com.oracle.graal.truffle.OptimizedCallTarget::callRoot (191 bytes)
>>> total in heap [0x000000010d601cd0,0x000000010d601f50] = 640
>>> relocation [0x000000010d601e08,0x000000010d601e20] = 24
>>> main code [0x000000010d601e20,0x000000010d601edd] = 189
>>> stub code [0x000000010d601edd,0x000000010d601ee0] = 3
>>> oops [0x000000010d601ee0,0x000000010d601ef8] = 24
>>> metadata [0x000000010d601ef8,0x000000010d601f00] = 8
>>> scopes data [0x000000010d601f00,0x000000010d601f18] = 24
>>> scopes pcs [0x000000010d601f18,0x000000010d601f48] = 48
>>> dependencies [0x000000010d601f48,0x000000010d601f50] = 8
>>> Compiled method (c2) 12445 2114 4 com.oracle.graal.truffle.OptimizedCallTarget::doInvoke (6 bytes)
>>> total in heap [0x000000010c77b910,0x000000010c77bb58] = 584
>>> relocation [0x000000010c77ba48,0x000000010c77ba60] = 24
>>> main code [0x000000010c77ba60,0x000000010c77bac0] = 96
>>> stub code [0x000000010c77bac0,0x000000010c77bae8] = 40
>>> oops [0x000000010c77bae8,0x000000010c77baf0] = 8
>>> metadata [0x000000010c77baf0,0x000000010c77baf8] = 8
>>> scopes data [0x000000010c77baf8,0x000000010c77bb08] = 16
>>> scopes pcs [0x000000010c77bb08,0x000000010c77bb38] = 48
>>> dependencies [0x000000010c77bb38,0x000000010c77bb40] = 8
>>> handler table [0x000000010c77bb40,0x000000010c77bb58] = 24
>>>
>>>
>>> diff --git a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java
>>> index 8d00194..0670fad 100644
>>> --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java
>>> +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java
>>> @@ -104,7 +104,7 @@ public class OptimizedCallTarget extends InstalledCode implements RootCallTarget
>>> if (root == null || !root.isCloningAllowed()) {
>>> return null;
>>> }
>>> - return NodeUtil.cloneNode(root);
>>> + return root.cloneRootNode();
>>> }
>>>
>>> public Assumption getNodeRewritingAssumption() {
>>> diff --git a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java
>>> index aebf748..2552eea 100644
>>> --- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java
>>> +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java
>>> @@ -79,6 +79,10 @@ public abstract class RootNode extends Node {
>>> return false;
>>> }
>>>
>>> + public RootNode cloneRootNode() {
>>> + return NodeUtil.cloneNode(this);
>>> + }
>>> +
>>> /**
>>> * Reports the execution count of a loop that is a child of this node. The optimization
>>> * heuristics can use the loop count to guide compilation and inlining.
>>>
>>>
>>>
>>> --
>>> Stefan Marr
>>> INRIA Lille - Nord Europe
>>> http://stefan-marr.de/research/
>>>
>>>
>>>
>
> --
> Stefan Marr
> INRIA Lille - Nord Europe
> http://stefan-marr.de/research/
>
>
>
>
More information about the graal-dev
mailing list