Bug 51905 - Infinite loop when shutting down AprEndpoint
Infinite loop when shutting down AprEndpoint
Product: Tomcat 6
Classification: Unclassified
Component: Catalina
PC Windows XP
: P2 normal (vote)
: default
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2011-09-28 09:20 UTC by Konstantin Kolinko
Modified: 2014-02-17 13:52 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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).