Bug 900978 (JBEWS-85) - IPv6 :: address slowing down Tomcat6/7 on MS Windows
Summary: IPv6 :: address slowing down Tomcat6/7 on MS Windows
Keywords:
Status: CLOSED DEFERRED
Alias: JBEWS-85
Deadline: 2012-10-05
Product: JBoss Enterprise Web Server 2
Classification: JBoss
Component: tomcat6, tomcat7
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: TBD EWS
Assignee: Coty Sutherland
QA Contact: Michal Karm Babacek
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-02 15:35 UTC by Libor Fuka
Modified: 2017-08-09 12:57 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-08-09 12:57:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache Bugzilla 53971 0 None None None Never
Red Hat Bugzilla 900723 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Issue Tracker JBEWS-85 0 Minor Closed IPv6 :: address slowing down Tomcat6/7 on MS Windows 2017-08-09 12:56:56 UTC

Internal Links: 900723

Description Libor Fuka 2012-10-02 15:35:06 UTC
Affects: Release Notes
project_key: JBEWS

When you use <Connector port="8080" protocol="HTTP/1.1" address="::" for starting Tomcat6 or 7 on Windows and then stopping Tomcat it slowing down shutdown of Tomcat.
You see WARNING in catalina.log:
{code}
  WARNING: Acceptor thread [http-0%3A0%3A0%3A0%3A0%3A0%3A0%3A0-8080-Acceptor-0] failed to unlock. Forcing hard socket shutdown.

{code} 

Its know bug in earlier version of Tomcat:
https://issues.apache.org/bugzilla/show_bug.cgi?id=51503

but its problem in earlier version of Tomcat than we have in EWS20, so I don't know.

Comment 1 Libor Fuka 2012-10-02 15:39:18 UTC
Link: Added: This issue relates to JBPAPP-9551


Comment 3 Libor Fuka 2012-10-04 14:01:31 UTC
I don't know. 

Comment 4 Mladen Turk 2012-10-04 14:08:35 UTC
It's a Tomcat problem. Ask David if he applied the mentioned upstream fix

Comment 5 Mladen Turk 2012-10-04 14:13:42 UTC
Assigning to David, since it's Tomcat/java problem

Comment 6 Jean-Frederic Clere 2012-10-05 12:19:51 UTC
$ tail -f logs/catalina.2012-10-05.log
Oct 5, 2012 12:14:48 PM org.apache.coyote.ajp.AjpAprProtocol pause
INFO: Pausing Coyote AJP/1.3 on ajp-8009
Oct 5, 2012 12:14:49 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Oct 5, 2012 12:14:49 PM org.apache.coyote.http11.Http11AprProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-0%3A0%3A0%3A0%3A0%3A0%3A0%3A0-8080
Oct 5, 2012 12:15:00 PM org.apache.tomcat.util.net.AprEndpoint stop
WARNING: Acceptor thread [http-0%3A0%3A0%3A0%3A0%3A0%3A0%3A0-8080-Acceptor-0] failed to unlock. Forcing hard socket shutdown.
Oct 5, 2012 12:15:00 PM org.apache.coyote.ajp.AjpAprProtocol destroy
INFO: Stopping Coyote AJP/1.3 on ajp-8009

Well that is 10 seconds... Not a big deal.

Comment 7 Libor Fuka 2012-10-05 12:59:49 UTC
Yes, Its not so big problem.

Comment 8 Jean-Frederic Clere 2012-10-05 13:07:03 UTC
It is related to AS7-3834 in fact... The unlockAccept() will used the "::" address to connect to server to unlock the accept that won't work.
That is a upstream bug...

Comment 9 Jean-Frederic Clere 2012-10-05 13:38:03 UTC
Reported as upstream bugzilla 53971

Comment 10 Libor Fuka 2012-10-09 13:20:18 UTC
Should be assigned for inclusion in future EWS release.

Comment 11 Mladen Turk 2012-10-09 13:24:00 UTC
Think we should just check in shutdownAccept if the string address is "::" and try to connect with "::1"
I'm just shooting at random here :)


Comment 12 Permaine Cheung 2012-10-09 13:34:19 UTC
Assigning to David for inclusion in future EWS release.

Comment 13 Weinan Li 2012-10-12 08:03:13 UTC
Please file a doc bz and file this into Known issues section.

Comment 14 Libor Fuka 2012-10-12 08:07:27 UTC
I will, its not resolved.

Comment 15 Misha H. Ali 2012-10-14 23:00:34 UTC
Release Notes Docs Status: Added: Not Yet Documented


Comment 16 Misha H. Ali 2012-10-14 23:43:35 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Known Issue
Release Notes Text: Added: When an IPv6 address is used to start Tomcat 6 or 7 on Windows (for example <Connector port="8080" protocol="HTTP/1.1" address="::" />) and results in a significantly slowed down shutdown process when Tomcat is sunsequently shut down. During the shutdown process, the catalina.log file logs a warning for this shutdown:

WARNING: Acceptor thread [http-0%3A0%3A0%3A0%3A0%3A0%3A0%3A0-8080-Acceptor-0] failed to unlock. Forcing hard socket shutdown


Comment 17 Misha H. Ali 2012-10-16 04:46:51 UTC
Affects: Added: Release Notes


Comment 18 Misha H. Ali 2012-10-16 04:47:51 UTC
Writer: Added: mhusnain


Comment 19 Jiri Skrabal 2012-11-13 15:56:43 UTC
Release Notes Docs Status: Removed: Documented as Known Issue 
Writer: Removed: mhusnain 
Release Notes Text: Removed: When an IPv6 address is used to start Tomcat 6 or 7 on Windows (for example <Connector port="8080" protocol="HTTP/1.1" address="::" />) and results in a significantly slowed down shutdown process when Tomcat is sunsequently shut down. During the shutdown process, the catalina.log file logs a warning for this shutdown:

WARNING: Acceptor thread [http-0%3A0%3A0%3A0%3A0%3A0%3A0%3A0-8080-Acceptor-0] failed to unlock. Forcing hard socket shutdown 
Docs QE Status: Removed: NEW 


Comment 24 Libor Fuka 2013-06-17 06:45:17 UTC
I can do that, anyone against to be the public bug ?

Comment 25 Jean-frederic Clere 2013-06-17 08:28:48 UTC
It is reported upstream so it MUST be public.

Comment 26 Libor Fuka 2013-06-17 08:37:06 UTC
Set to public

Comment 27 Misha H. Ali 2013-06-18 00:14:29 UTC
Thanks, Libor. Assuming there are no objections to doc text and setting flag to + to indicate a final draft for release notes.

Comment 28 David Knox 2014-01-14 18:26:35 UTC
There are several upstream and jira threads some with several patches that affect related bits of code. The code involved has been refactored in 7.0.40 and again in 7.0.47.

This bug was first recorded in 2012. We've since updated the source. Maybe this bz isn't relevant any more and should be updated to modified so it can be verified.

Comment 29 Libor Fuka 2014-06-27 12:09:50 UTC
Problem still persists in T 6.0.41 and T 7.0.54.
Stopping is lasting around 10-15s with address="::" more than without it.

Comment 30 Libor Fuka 2014-06-27 12:11:00 UTC
and warning in catalina.out (T6 and T7) is still the same:
Jun 27, 2014 5:08:19 AM org.apache.tomcat.util.net.AprEndpoint stopInternal
WARNING: Acceptor thread [http-apr-0:0:0:0:0:0:0:0-8080-Acceptor-0] failed to unlock. Forcing hard socket shutdown.

Comment 31 Jean-frederic Clere 2014-06-27 12:29:16 UTC
Is it still the same with the BIO/JIO connector?

Comment 32 Libor Fuka 2014-06-27 12:58:41 UTC
Its only problem when we use  the APR/native connector.

Comment 33 Jean-frederic Clere 2014-06-27 13:51:24 UTC
Keep it as a known issue at least for apr/native.
The work-around now is to use BIO/JIO or NIO (tomcat7), it was just partially fixed.


Note You need to log in before you can comment on or make changes to this bug.