Threads stuck, gradually, slowly...Have you any suggestions?
Java 5 threading here.
I have an Executer with 10 threads,
threads are busy in e-mail sending tasks execution.
Gradually (1 thread in 5 hours) threads stuck in TIMED_WAITING state, from which they never revoked,
example of thread state is here, taken by jconsole:
Name: pool-4-thread-1 State: TIMED_WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@3125fe1 Total blocked: 0 Total waited: 7,609 Stack trace: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025) java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:342) com.idi.mailer.executor.impl.ResultsQueue.pull(ResultsQueue.java:66) com.idi.mailer.executor.impl.SerialMailExecutor$FinalizerTask.run(SerialMailExecutor.java:466) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) java.lang.Thread.run(Thread.java:662)
Gradually all 10 threads get into that state.
They are not using common resources. They are not waiting each other. No locks possible.
What I do now to fix the matter, I recognize the failure at the end and restart the entire executer.
It looks like a VM bug, because I looked into similar posts and all they end up in some VM problem...
Have you any idea?