Summary: | Occasional NIO connector lockups on high load | ||
---|---|---|---|
Product: | Tomcat 6 | Reporter: | Steven Hugg <hugg> |
Component: | Connectors | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | P2 | ||
Version: | 6.0.29 | ||
Target Milestone: | default | ||
Hardware: | Other | ||
OS: | Linux |
Description
Steven Hugg
2010-12-13 14:02:35 UTC
Steven, would it be possible for you to upgrade to the latest (6.0.29) Tomcat version? I seem to recall a recent fix to the NIO connector that fixes some threading issues, though I can't seem to find a reference for it at the moment. Ooh, sorry. I misread your version number. Duh. I haven't reproduced it, but I would imagine that inserting a Thread.sleep() after the call to key.attach(null) in cancelledKey() might do it. For now I have just put a null check in the above loop like so: if (attachment != null) { attachment.access(); iterator.remove(); processKey(sk, attachment); } else { log.warn("NioEndpoint: Attachment was null"); iterator.remove(); } Not sure if that is correct, but better than the alternative ;) The null check seems reasonable to me. I have fixed this in 7.0.x and it will be included in 7.0.6 onwards. I have also proposed the fix for 6.0.x. Fixed in 6.0.x and will be included in 6.0.30 onwards. |