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 247677 - Test org.netbeans.modules.hudson.impl.HudsonManagerImplTest:org.netbeans.modules.hudson.impl.HudsonManagerImplTest::testSynchronization sometimes fails due to OOM error on Win32
Summary: Test org.netbeans.modules.hudson.impl.HudsonManagerImplTest:org.netbeans.modu...
Status: RESOLVED FIXED
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Hudson (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-03 15:39 UTC by lothe
Modified: 2014-11-29 06:05 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lothe 2014-10-03 15:39:49 UTC
Test org.netbeans.modules.hudson.impl.HudsonManagerImplTest:org.netbeans.modules.hudson.impl.HudsonManagerImplTest::testSynchronization sometimes fails due to OOM error on Win32.

NetBeans: 8.0.1 (stable test distribution)
JDK: 8u20 (b26)
OS: Windows 7 32bit

Test seems to be newly added to 8.0.1 testbase.

The following stack trace is reported:

do-test:
    [junit] Testsuite: org.netbeans.modules.hudson.impl.HudsonManagerImplTest
    [junit] Oct 03, 2014 7:09:46 PM org.openide.util.NbPreferences getPreferencesProvider
    [junit] WARNING: NetBeans implementation of Preferences not found
    [junit] Oct 03, 2014 7:09:47 PM org.openide.util.RequestProcessor$Processor run
    [junit] SEVERE: null
    [junit] java.lang.OutOfMemoryError: unable to create new native thread
    [junit]     at java.lang.Thread.start0(Native Method)
    [junit]     at java.lang.Thread.start(Thread.java:714)
    [junit]     at org.openide.util.RequestProcessor$Processor.get(RequestProcessor.java:1906)
    [junit]     at org.openide.util.RequestProcessor.enqueue(RequestProcessor.java:610)
    [junit]     at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1493)
    [junit]     at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1464)
    [junit]     at org.netbeans.modules.hudson.impl.HudsonInstanceImpl.<init>(HudsonInstanceImpl.java:144)
    [junit]     at org.netbeans.modules.hudson.impl.HudsonInstanceImpl.createHudsonInstance(HudsonInstanceImpl.java:192)
    [junit]     at org.netbeans.modules.hudson.impl.HudsonInstanceImpl.createHudsonInstance(HudsonInstanceImpl.java:187)
    [junit]     at org.netbeans.modules.hudson.impl.HudsonManagerImpl$1.run(HudsonManagerImpl.java:236)
    [junit]     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
    [junit]     at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
    [junit]
    [junit] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.492 sec
    [junit]
    [junit] ------------- Standard Error -----------------
    [junit] Oct 03, 2014 7:09:46 PM org.openide.util.NbPreferences getPreferencesProvider
    [junit] WARNING: NetBeans implementation of Preferences not found
    [junit] Oct 03, 2014 7:09:47 PM org.openide.util.RequestProcessor$Processor run
    [junit] SEVERE: null
    [junit] java.lang.OutOfMemoryError: unable to create new native thread
    [junit]     at java.lang.Thread.start0(Native Method)
    [junit]     at java.lang.Thread.start(Thread.java:714)
    [junit]     at org.openide.util.RequestProcessor$Processor.get(RequestProcessor.java:1906)
    [junit]     at org.openide.util.RequestProcessor.enqueue(RequestProcessor.java:610)
    [junit]     at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1493)
    [junit]     at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1464)
    [junit]     at org.netbeans.modules.hudson.impl.HudsonInstanceImpl.<init>(HudsonInstanceImpl.java:144)
    [junit]     at org.netbeans.modules.hudson.impl.HudsonInstanceImpl.createHudsonInstance(HudsonInstanceImpl.java:192)
    [junit]     at org.netbeans.modules.hudson.impl.HudsonInstanceImpl.createHudsonInstance(HudsonInstanceImpl.java:187)
    [junit]     at org.netbeans.modules.hudson.impl.HudsonManagerImpl$1.run(HudsonManagerImpl.java:236)
    [junit]     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
    [junit]     at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
    [junit]
    [junit] ------------- ---------------- ---------------
    [junit] Testcase: testSynchronization(org.netbeans.modules.hudson.impl.HudsonManagerImplTest):      FAILED
    [junit] No exception should be thrown
    [junit] junit.framework.AssertionFailedError: No exception should be thrown
    [junit]     at org.junit.Assert.fail(Assert.java:93)
    [junit]     at org.junit.Assert.assertTrue(Assert.java:43)
    [junit]     at org.junit.Assert.assertNull(Assert.java:551)
    [junit]     at org.netbeans.modules.hudson.impl.HudsonManagerImplTest.testSynchronization(HudsonManagerImplTest.java:110)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [junit]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [junit]     at java.lang.reflect.Method.invoke(Method.java:483)
    [junit]     at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    [junit]     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    [junit]     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    [junit]     at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    [junit]     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    [junit]     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    [junit]     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    [junit]     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    [junit]     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    [junit]     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    [junit]     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    [junit]     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    [junit]     at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    [junit]     at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:532)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1165)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1016)
    [junit]
    [junit]
    [junit] Test org.netbeans.modules.hudson.impl.HudsonManagerImplTest FAILED
Comment 1 Jaroslav Havlin 2014-11-28 16:07:41 UTC
HudsonManagerImplTest created a lot of Hudson instances, and each of them started a new thread.
Decreasing number of instances:
http://hg.netbeans.org/core-main/rev/4425735fb440

Thank you for reporting.
Comment 2 Quality Engineering 2014-11-29 06:05:05 UTC
Integrated into 'main-silver', will be available in build *201411290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4425735fb440
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #247677: HudsonManagerImplTest creates too many threads