Bug #25514 | many daemon threads accumulating, hanging around | ||
---|---|---|---|
Submitted: | 10 Jan 2007 0:56 | Modified: | 22 Feb 2007 14:12 |
Reporter: | Mark Taylor | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.0.4 | OS: | multiple linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | daemon thread timer timerthread |
[10 Jan 2007 0:56]
Mark Taylor
[10 Jan 2007 2:04]
Mark Taylor
Incidentally, I re-ran the example program, specifying the older 3.1.12 jar instead, as below, and it did NOT get the lingering daemon thread issue... $ java -cp ./mysql-connector-java-3.1.12-bin.jar:. TimerThreadIssue MYUSER MYPASS Executing iteration 0 Executing iteration 1 Executing iteration 2 Executing iteration 3 Executing iteration 4 Executing iteration 5 Executing iteration 6 Executing iteration 7 Executing iteration 8 Executing iteration 9 ctrl-backslash to thread dump now... Full thread dump Java HotSpot(TM) 64-Bit Server VM (1.5.0_08-b03 mixed mode): "Low Memory Detector" daemon prio=1 tid=0x00002aaaf7a03830 nid=0x48a6 runnable [0x0000000000000000..0x0000000000000000] "CompilerThread1" daemon prio=1 tid=0x00002aaaf7a01de0 nid=0x48a5 waiting on condition [0x0000000000000000..0x0000000040c5b620] "CompilerThread0" daemon prio=1 tid=0x00002aaaf7a00a50 nid=0x48a4 waiting on condition [0x0000000000000000..0x0000000040b5a750] "AdapterThread" daemon prio=1 tid=0x00002aaaf7be8c10 nid=0x48a3 waiting on condition [0x0000000000000000..0x0000000000000000] "Signal Dispatcher" daemon prio=1 tid=0x00002aaaf7be77f0 nid=0x48a1 waiting on condition [0x0000000000000000..0x0000000000000000] "Finalizer" daemon prio=1 tid=0x00002aaaf7bb5f60 nid=0x489c in Object.wait() [0x0000000040858000..0x0000000040858b40] at java.lang.Object.wait(Native Method) - waiting on <0x00002aaae4fa63d0> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116) - locked <0x00002aaae4fa63d0> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) "Reference Handler" daemon prio=1 tid=0x00002aaaf7bb3710 nid=0x489b in Object.wait() [0x0000000040757000..0x0000000040757cc0] at java.lang.Object.wait(Native Method) - waiting on <0x00002aaae4fa8250> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:474) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116) - locked <0x00002aaae4fa8250> (a java.lang.ref.Reference$Lock) "main" prio=1 tid=0x0000000040115610 nid=0x4891 waiting on condition [0x00007fffffc5e000..0x00007fffffc5ea70] at java.lang.Thread.sleep(Native Method) at TimerThreadIssue.main(TimerThreadIssue.java:36) "VM Thread" prio=1 tid=0x00002aaaf7baf2b0 nid=0x489a runnable "GC task thread#0 (ParallelGC)" prio=1 tid=0x0000000040133850 nid=0x4893 runnable "GC task thread#1 (ParallelGC)" prio=1 tid=0x0000000040134640 nid=0x4894 runnable "GC task thread#2 (ParallelGC)" prio=1 tid=0x0000000040135430 nid=0x4895 runnable "GC task thread#3 (ParallelGC)" prio=1 tid=0x0000000040136220 nid=0x4896 runnable "VM Periodic Task Thread" prio=1 tid=0x00002aaaf7a05570 nid=0x48a7 waiting on condition ...Exiting
[10 Jan 2007 2:12]
Mark Taylor
Oh, and before anyone asks... Yes, I also downloaded 5.0.4 and tried this. The lingering Timer daemon threads returned just as before with 5.0.3 (with 3 Timer threads in the output, as in the original example output)
[10 Jan 2007 16:17]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/17860
[22 Feb 2007 14:12]
MC Brown
A note has been added to the 5.0.5 changelog.
[27 Feb 2007 5:20]
Walter Zheng
I force System.gc() , it will collect those hanging timer threads.