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 211305 - core.windows/**/ValidateLayerMenuTest* test fail on JDK7_04 due to changed behavior of EDT.interrupt()
Summary: core.windows/**/ValidateLayerMenuTest* test fail on JDK7_04 due to changed be...
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: NB JUnit (show other bugs)
Version: 7.1.2
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: JDK_SPECIFIC
: 211258 211313 214281 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-17 09:10 UTC by Jiri Skrivanek
Modified: 2012-08-13 08:19 UTC (History)
3 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 Jiri Skrivanek 2012-04-17 09:10:04 UTC
core.windows tests fail on JDK7_04. Please, evaluate whether it is a bug in JDK or in NetBeans. It passes on JDK6 and JDK7_03. To reproduce:

$ ant -f core.windows/build.xml test test-generate-html -Dbuild.dir=build

  Java; VM; Vendor        = 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_04-b20
Comment 1 Stanislav Aubrecht 2012-04-17 10:21:18 UTC
The problem is in org.netbeans.core.windows.awt.ValidateLayerMenuTest
The test seems to pass but the headless IDE the test started does not exit when running under JDK 1.7 update 4, build 20.
Comment 2 Jiri Skrivanek 2012-04-17 10:49:15 UTC
Please, evaluate what is the root of the problem. It seems that other similar bugs I filed have the same symptoms. Tests fail on timeout when test case is not finished regularly.
Comment 3 Jaroslav Tulach 2012-04-17 12:49:34 UTC
Below is a thread dump from the test run. The main thread is calling java.awt.EventQueue.invokeAndWait, but there does not seem to be any AWT event dispatch thread! 

Based on following:

> Please, evaluate whether it is a bug in JDK
> or in NetBeans. It passes on JDK6 and JDK7_03.

I would assume this is a JDK problem. If you can please help the JDK team realize that JDK7_u4 build 21 is not ready for shipping.


2012-04-17 14:45:25
Full thread dump Java HotSpot(TM) Server VM (23.0-b21 mixed mode):

"Java2D Disposer" daemon prio=10 tid=0x08e35800 nid=0x1f7f in Object.wait() [0x8e5ba000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0xa11dce18> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
    - locked <0xa11dce18> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
    at sun.java2d.Disposer.run(Disposer.java:145)
    at java.lang.Thread.run(Thread.java:722)

"Timer-0" daemon prio=10 tid=0x8fbf4c00 nid=0x1f7d in Object.wait() [0x90b2f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0xa0f17b18> (a java.util.TaskQueue)
    at java.util.TimerThread.mainLoop(Timer.java:552)
    - locked <0xa0f17b18> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:505)

"Thread-2" daemon prio=10 tid=0x909eb800 nid=0x1f73 in Object.wait() [0x8e6ad000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0xa03eced0> (a java.util.LinkedList)
    at java.lang.Object.wait(Object.java:503)
    at java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1476)
    - locked <0xa03eced0> (a java.util.LinkedList)

"Bundle File Closer" daemon prio=10 tid=0x08eeec00 nid=0x1f6d in Object.wait() [0x8ed00000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0xa050fed8> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
    at java.lang.Object.wait(Object.java:503)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)
    - locked <0xa050fed8> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)

"File Watcher" daemon prio=10 tid=0x8fe5dc00 nid=0x1f6a runnable [0x8ee15000]
   java.lang.Thread.State: RUNNABLE
    at com.sun.jna.Function.invokeInt(Native Method)
    at com.sun.jna.Function.invoke(Function.java:344)
    at com.sun.jna.Function.invoke(Function.java:276)
    at com.sun.jna.Library$Handler.invoke(Library.java:216)
    at org.netbeans.modules.masterfs.watcher.linux.$Proxy3.read(Unknown Source)
    at org.netbeans.modules.masterfs.watcher.linux.LinuxNotifier.nextEvent(LinuxNotifier.java:125)
    at org.netbeans.modules.masterfs.providers.Notifier$1.nextEvent(Notifier.java:119)
    at org.netbeans.modules.masterfs.watcher.Watcher$Ext.run(Watcher.java:298)
    at java.lang.Thread.run(Thread.java:722)

"CLI Requests Server" daemon prio=10 tid=0x90d37800 nid=0x1f58 runnable [0x90bd1000]
   java.lang.Thread.State: RUNNABLE
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
    at java.net.ServerSocket.implAccept(ServerSocket.java:522)
    at java.net.ServerSocket.accept(ServerSocket.java:490)
    at org.netbeans.CLIHandler$Server.run(CLIHandler.java:1084)

"Active Reference Queue Daemon" daemon prio=10 tid=0x92b64000 nid=0x1f57 in Object.wait() [0x90c22000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x9fb373c0> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
    - locked <0x9fb373c0> (a java.lang.ref.ReferenceQueue$Lock)
    at org.openide.util.lookup.implspi.ActiveQueue$Daemon.run(ActiveQueue.java:174)
    - locked <0x9fb373c0> (a java.lang.ref.ReferenceQueue$Lock)

"Service Thread" daemon prio=10 tid=0x92b03000 nid=0x1f50 runnable [0x00000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" daemon prio=10 tid=0x92b01000 nid=0x1f4f waiting on condition [0x00000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" daemon prio=10 tid=0x08256000 nid=0x1f4e waiting on condition [0x00000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x08254400 nid=0x1f4d waiting on condition [0x00000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=10 tid=0x0821a400 nid=0x1f4c in Object.wait() [0x92c66000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x9fb30398> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
    - locked <0x9fb30398> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:177)

"Reference Handler" daemon prio=10 tid=0x08215400 nid=0x1f4b in Object.wait() [0x9131e000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x9fb2fdf0> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:503)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
    - locked <0x9fb2fdf0> (a java.lang.ref.Reference$Lock)

"main" prio=10 tid=0x0807b800 nid=0x1f45 in Object.wait() [0xb69ea000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0xa15f2b38> (a java.awt.EventQueue$1AWTInvocationLock)
    at java.lang.Object.wait(Object.java:503)
    at java.awt.EventQueue.invokeAndWait(EventQueue.java:1232)
    - locked <0xa15f2b38> (a java.awt.EventQueue$1AWTInvocationLock)
    at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1346)
    at org.netbeans.junit.NbModuleSuite$S.runInRuntimeContainer(NbModuleSuite.java:949)
    at org.netbeans.junit.NbModuleSuite$S.access$100(NbModuleSuite.java:660)
    at org.netbeans.junit.NbModuleSuite$S$1.protect(NbModuleSuite.java:679)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at org.netbeans.junit.NbModuleSuite$S.run(NbModuleSuite.java:677)
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:422)
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:931)
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:785)

"VM Thread" prio=10 tid=0x0820f800 nid=0x1f4a runnable 

"GC task thread#0 (ParallelGC)" prio=10 tid=0x08085800 nid=0x1f46 runnable 

"GC task thread#1 (ParallelGC)" prio=10 tid=0x08086c00 nid=0x1f47 runnable 

"GC task thread#2 (ParallelGC)" prio=10 tid=0x08088400 nid=0x1f48 runnable 

"GC task thread#3 (ParallelGC)" prio=10 tid=0x08089c00 nid=0x1f49 runnable 

"VM Periodic Task Thread" prio=10 tid=0x92b15000 nid=0x1f51 waiting on condition 

JNI global references: 631

Heap
 PSYoungGen      total 99712K, used 30824K [0xacda0000, 0xb3840000, 0xb3840000)
  eden space 91776K, 33% used [0xacda0000,0xaebba3f0,0xb2740000)
  from space 7936K, 0% used [0xb2740000,0xb2740000,0xb2f00000)
  to   space 9472K, 0% used [0xb2f00000,0xb2f00000,0xb3840000)
 ParOldGen       total 68160K, used 39498K [0x9f840000, 0xa3ad0000, 0xacda0000)
  object space 68160K, 57% used [0x9f840000,0xa1ed28c8,0xa3ad0000)
 PSPermGen       total 40704K, used 25837K [0x93040000, 0x95800000, 0x9f840000)
  object space 40704K, 63% used [0x93040000,0x9497b568,0x95800000)
Comment 4 Jaroslav Tulach 2012-04-17 12:50:52 UTC
*** Bug 211313 has been marked as a duplicate of this bug. ***
Comment 5 Antonin Nebuzelsky 2012-04-17 15:05:53 UTC
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7162144
Comment 6 Jaroslav Tulach 2012-04-18 10:36:45 UTC
*** Bug 211258 has been marked as a duplicate of this bug. ***
Comment 7 Marian Mirilovic 2012-06-19 11:37:43 UTC
*** Bug 214281 has been marked as a duplicate of this bug. ***
Comment 8 Jiri Skrivanek 2012-08-07 06:42:22 UTC
Because JDK bug 7162144 is not going to be resolved in JDK7u6, please try to workaround in NbModuleSuite.
Comment 9 Jaroslav Tulach 2012-08-07 14:05:58 UTC
After ergonomics#e72fa01f142c following test succeeds:
$ ant clean test-single -Dtest.includes=**/ValidateLayerMenuTest*
if there are other failures they are possibly caused by other, unrelated changes in the JDK.
Comment 10 Quality Engineering 2012-08-11 02:37:23 UTC
Integrated into 'main-golden', will be available in build *201208110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e72fa01f142c
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #211305: Wait at most 10s for the AWT thread to execute our runnable.
Works around JDK bug 7162144 which improperly shuts down EDT when an interrupt() is called on (and catched) on it.