Mantis - Resin
Viewing Issue Advanced Details
4623 major always 06-16-11 23:05 06-17-11 12:55
mnsh  
ferg  
normal  
closed 4.0.19  
fixed  
none    
none 4.0.20  
0004623: StackOverflowError in com.caucho.server.util.ScheduledThreadPool
After upgrading from 4.0.18 to 4.0.19, as soon as a scheduled task (configured using resin:ScheduledTask in resin-web.xml) is fired, the following is logged:

java.lang.StackOverflowError
 at java.util.HashMap.removeEntryForKey(HashMap.java:548)
 at java.util.HashMap.remove(HashMap.java:538)
 at java.util.HashSet.remove(HashSet.java:216)
 at com.caucho.server.util.ScheduledThreadPool.removeFuture(ScheduledThreadPool.java:424)
 at com.caucho.server.util.ScheduledThreadPool$TaskFuture.cancel(ScheduledThreadPool.java:524)
 at com.caucho.server.util.ScheduledThreadPool.removeFuture(ScheduledThreadPool.java:427)
 at com.caucho.server.util.ScheduledThreadPool$TaskFuture.cancel(ScheduledThreadPool.java:524)
 ...

and so on
It appears that TaskFuture.cancel(boolean) calls ScheduledThreadPool.removeFuture(Future), which ... calls TaskFuture.cancel(boolean).

There are no notes attached to this issue.