Bug 51905

Summary: Infinite loop when shutting down AprEndpoint
Product: Tomcat 6 Reporter: Konstantin Kolinko <knst.kolinko>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Severity: normal    
Priority: P2    
Version: 6.0.33   
Target Milestone: default   
Hardware: PC   
OS: Windows XP   

Description Konstantin Kolinko 2011-09-28 09:20:16 UTC
If unlocking the acceptor during AprEndpoint shutdown fails, it enters an infinite loop, printing endpoint.warn.unlockAcceptorFailed message
(Acceptor thread [{0}] failed to unlock. Forcing hard socket shutdown.)

It was reported on users@ mailing lists,

It might be caused by a firewall preventing Tomcat from connecting to its own HTTP port.

I can reproduce it if I turn the unlockAccept() method in endpoint into an noop (e.g. by adding "if(true){ return; }"), both in 6.0 and in trunk. In 6.0 this bug was introduced in r1065945 and affects 6.0.32 and 6.0.33.
Comment 1 Konstantin Kolinko 2011-09-28 10:06:17 UTC
Fixed in trunk and 7.0, will be in 7.0.23. Proposed for 6.0.
Comment 2 Mark Thomas 2011-10-19 17:09:17 UTC
Fixed in 6.0.x and will be included in 6.0.34 onwards (r1186001).