This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 188248 - NetBeans Crashes when running (any kind of) module suite
Summary: NetBeans Crashes when running (any kind of) module suite
Status: CLOSED INVALID
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 6.x
Hardware: Macintosh (x86) Mac OS X
: P1 normal (vote)
Assignee: issues@platform
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-30 15:07 UTC by stefika
Modified: 2011-06-09 17:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The module suite (4.64 KB, application/zip)
2010-06-30 15:07 UTC, stefika
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefika 2010-06-30 15:07:01 UTC
Created attachment 100524 [details]
The module suite

We've run into a problem where we can reliably cause NetBeans to crash when executing a module suite of any kind. This crash almost "looks" like a typical PermGen Error, but occurs even when NetBeans is slotted to accept a gigabyte of ram or more. The steps to reproduce the bug are slightly complicated, so I have attached a module suite. And, unfortunately, NetBeans appears to crash (freeze) before it can write anything relevant to the log.

Steps to reproduce, using the attached module suite:

1. Load up Module suite (see attached)
2. Create a new Java Application and add some junk code
3. Set a breakpoint anywhere and start the debugger

The IDE now hangs.

Since the IDE is running like an IDE (requiring significant ram), I've added to the module suite a basic script that increases memory size. The .conf file in a zip distribution can be modified similarly, with no apparent effect, so far as we can tell. Here's our script:

<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="CrashTest" basedir=".">
    <description>Builds the module suite CrashTest.</description>
    <import file="nbproject/build-impl.xml"/>
    <target name="build-launchers" depends="suite.build-launchers">
      <echo message="Updating conf defaults for branding"/>
      <propertyfile file="${build.launcher.dir}/etc/${app.name}.conf">
         <entry key="default_options" value='"--branding ${branding.token} -J-Xms128m -J-Xmx1024m"'/>
         <entry key="default_userdir" value='"${HOME}/.${app.name}/dev"'/>
         <entry key="default_mac_userdir" value='"${HOME}/Library/Application Support/.${app.name}/dev"'/>
      </propertyfile>
    </target>
</project>

And similarly, this occurs regardless of whether you start the module suite as a zip distribution (modify the conf file if you wish), in the debugger, as an installed file, or otherwise. If you run the code in the profiler, it sometimes catches that the suite has crashed and claims that the code has thrown a segmentation fault. This segmentation fault, again, "looks like" an out of memory error, but the flags seem appropriately set (to my eyes). Here's an example segmentation fault after running some of our code in the profiler:

/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/nbexec: line 539: 43620 Segmentation fault      "/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java" -Djdk.home="/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home" -classpath "/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/boot.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/org-openide-modules.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/org-openide-util-lookup.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/org-openide-util.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/boot_ja.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/boot_pt_BR.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/boot_zh_CN.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-modules_ja.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-modules_pt_BR.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-modules_zh_CN.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util-lookup_ja.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util-lookup_pt_BR.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util-lookup_zh_CN.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util_ja.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util_pt_BR.jar:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util_zh_CN.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/dt.jar" -Dnetbeans.system_http_proxy="DIRECT" -Dnetbeans.system_http_non_proxy_hosts="" -Dnetbeans.dirs="/Users/astefik/NetBeansProjects/Sodbeans/trunk/sappy/build/cluster:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/apisupport:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/cnd:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/dlight:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/enterprise:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/ergonomics:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/groovy:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/harness:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/ide:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/identity:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/java:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/javafx:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/nb:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/php:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/profiler:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/ruby:/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/websvccommon" -Dnetbeans.home="/Applications/NetBeans/NetBeans 6.9.app/Contents/Resources/NetBeans/platform" '-Dnetbeans.logger.console=true' '-ea' '-agentpath:/var/folders/ix/ixfCa+EZH3uTmNW9OjNm-HjOndU/-Tmp-/NBProfiler6948907421266840759.link/deployed/jdk16/mac/libprofilerinterface.jnilib=/var/folders/ix/ixfCa+EZH3uTmNW9OjNm-HjOndU/-Tmp-/NBProfiler6948907421266840759.link,5140,10' '-XX:+HeapDumpOnOutOfMemoryError' '-XX:HeapDumpPath=/Users/astefik/NetBeansProjects/Sodbeans/trunk/sappy/nbproject/private/profiler' '-Xdock:name=sappy' -XX:+HeapDumpOnOutOfMemoryError org.netbeans.Main --userdir "build/testuserdir" "--branding" "sappy" 0<&0
Result: 139

We have tested this bug carefully on several platforms. So far as we can tell, this problem only occurs on Macintosh. The problem does not occur on Windows 7. We are running OS X 10.6.4 with the latest Java updates on a 2.66 Ghz Core 2 Duo with 4 Gigs of Ram.

Finally, several existing bugs report crashes, which may or may not be related, for example:

http://netbeans.org/bugzilla/show_bug.cgi?id=187731

These bugs do not provide significant detail, so it is difficult for to tell if they are related or not.
Comment 1 Jesse Glick 2010-06-30 17:10:11 UTC
-Xmx is useless if you are getting PermGen OOMEs; you need to use -XX:MaxPermSize. If there is a segmentation fault rather than an OOME, that may be a bug in Apple's JDK port.
Comment 2 stefika 2010-06-30 18:57:35 UTC
Crud, you're right, sorry to waste your time, Jesse. When I change our script to include the flags you mentioned:

<target name="build-launchers" depends="suite.build-launchers">
      <echo message="Updating conf defaults for branding"/>
      <propertyfile file="${build.launcher.dir}/etc/${app.name}.conf">
         <entry key="default_options" value='"--branding ${branding.token} --J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=1024m"'/>
         <entry key="default_userdir" value='"${HOME}/.${app.name}/dev"'/>
         <entry key="default_mac_userdir" value='"${HOME}/Library/Application Support/.${app.name}/dev"'/>
      </propertyfile>
    </target>

And I generate a zip file, it does indeed work correctly, although, oddly, it puts slashes in each of the flags, like so:

default_options="--branding crashtest --J-client -J-Xss2m -J-Xms32m -J-XX\:PermSize\=32m -J-XX\:MaxPermSize\=1024m"

It still seems to work with the slashes in there, but I'm not sure if they matter, and the default netbeans.conf file has no slashes. Those flags still don't seem to work when running the code in the debugger, however, and the PERMGEN errors still persist. Perhaps that's a problem with my ant script, although it isn't obvious to me why that would be.
Comment 3 Marian Mirilovic 2011-06-09 17:11:37 UTC
v/c