Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 435229

Summary: SIGSEGV with @Nullable analysis
Product: [Eclipse Project] JDT Reporter: Brian de Alwis <bsd>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: major    
Priority: P3 CC: daniel_megert, stephan.herrmann
Version: 4.4   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Corresponding hs_err crash log none

Description Brian de Alwis CLA 2014-05-19 15:56:04 EDT
Created attachment 243265 [details]
Corresponding hs_err crash log

I've had a couple of crashes today when doing @Nullable/@NonNull/@NonNullByDefault analysis.  I'll attach the hs_err_ pid file from this most recent crash.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000010f58c1cb, pid=21907, tid=80311
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b132) (build 1.8.0-b132)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# J 58222 C2 org.eclipse.jdt.internal.compiler.ast.Annotation$1LocationCollector.visit(Lorg/eclipse/jdt/internal/compiler/ast/TypeReference;Lorg/eclipse/jdt/internal/compiler/lookup/BlockScope;)Z (162 bytes) @ 0x000000010f58c1cb [0x000000010f58bf00+0x2cb]
#
# Core dump written. Default location: /cores/core or core.21907
#
# An error report file with more information is saved as:
# /usr/local/installs/e4-current/Eclipse.app/Contents/MacOS/hs_err_pid21907.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#
Abort trap: 6 (core dumped)
Comment 1 Dani Megert CLA 2014-05-19 15:58:43 EDT
Which build id?
Do you have steps?
Comment 2 Brian de Alwis CLA 2014-05-19 16:04:42 EDT
Sorry forgot to include the build id: I20140518-2000 (updated this morning).  My VM has -Xmx2500m

I'm in the process of trying to add @Nullable support to a small-sized project with about 40 bundles.  I added "Enable annotation-based null analysis" and used the suggested defaults; I include the o.e.j.annotation bundle via the additional.bundles in build.properties.  I've only just started on this process (I've added annotations to about 3-4 files), but wouldn't describe what I'm doing as being overly difficult.
Comment 3 Stephan Herrmann CLA 2014-05-19 16:31:06 EDT
Can anyone exactly interpret the "Problematic frame" info?

To me it looks like the JIT might have crashed while compiling the mentioned Java method?

Anyway, I believe the most relevant information is:

> # If you would like to submit a bug report, please visit:
> #   http://bugreport.sun.com/bugreport/crash.jsp
Comment 4 Stephan Herrmann CLA 2014-05-19 16:35:09 EDT
(In reply to Brian de Alwis from comment #2)
> I include the o.e.j.annotation
> bundle via the additional.bundles in build.properties.

Just a quick hint: we moved to recommending an optional Require-Bundle, because additional.bundles doesn't allow to specify a version, and with the semantic differences between o.e.j.annotation 1.1.x vs. 2.0.0 you are advised to give a specific version range to this dependency. resolution:=optional can be used to "simulate" a build-time-only dependency.
Comment 5 Brian de Alwis CLA 2014-05-19 16:51:52 EDT
I scanned through the other crash report and it looks random.  I'll continue trundling along and see if I have any other problems.
Comment 6 Dani Megert CLA 2014-05-20 02:41:20 EDT
If the crash happens frequently enough, please try with disabled JIT and see whether that "fixes" the problem.
Comment 7 Brian de Alwis CLA 2014-05-30 12:36:11 EDT
Haven't had a crash for a while running with:

   -vmargs -XX:CompileCommand="exclude org/eclipse/jdt/internal/compiler/ast/Annotation$1LocationCollector.visit"