[Bug 62185] New: Acceptor Thread Terminates

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 62185] New: Acceptor Thread Terminates

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62185

            Bug ID: 62185
           Summary: Acceptor Thread Terminates
           Product: Tomcat 7
           Version: 7.0.85
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connectors
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Acceptor Thread terminates and no further requests are being accepted by Apache
Tomcat.

Steps to reproduce:

Set max user processes to a low number(to the user that starts the server):

e.g.: ulimit -u 40

run a few thousand requests or more to an Apache endpoint.

If the ulimit for max processes is reached,
java/org/apache/tomcat/util/net/JIoEndpoint.java:255 will throw a
VirtualMachineError and it will terminate the AcceptorThread.

Exception in thread "http-bio-8080-Acceptor-0" java.lang.OutOfMemoryError:
unable to create new native thread
        at java.lang.Thread.start0(Native Method)
        at java.lang.Thread.start(Thread.java:714)
        at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950)
        at
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368)
        at
org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:166)
        at
org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:146)
        at
org.apache.tomcat.util.net.JIoEndpoint.processSocket(JIoEndpoint.java:533)
        at
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:236)
        at java.lang.Thread.run(Thread.java:745)

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62185] Acceptor Thread Terminates

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62185

Mark Thomas <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Mark Thomas <[hidden email]> ---
That is an (OS) configuration error, not a Tomcat bug.

Generally, OOME are not expected to be recoverable. If Tomcat experiences one
it needs to be shutdown (if it isn't already) and restarted.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62185] Acceptor Thread Terminates

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62185

--- Comment #2 from Christopher Schultz <[hidden email]> ---
(In reply to Mark Thomas from comment #1)
> That is an (OS) configuration error, not a Tomcat bug.

For OP: The correct solution to this is to make sure that the (total)
<Connector>'s maxThreads is low enough that this should not happen. That's why
Mark is asserting that this is a configuration error.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62185] Acceptor Thread Terminates

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62185

--- Comment #3 from Remy Maucherat <[hidden email]> ---
Christopher, we're not nice and not giving straight answers in BZ to user
questions, otherwise it would be a super easy and convenient way to get free
support from the core Tomcat developers.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62185] Acceptor Thread Terminates

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62185

BogdanD <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |---
             Status|RESOLVED                    |REOPENED

--- Comment #4 from BogdanD <[hidden email]> ---
(In reply to Mark Thomas from comment #1)
> That is an (OS) configuration error, not a Tomcat bug.
>
> Generally, OOME are not expected to be recoverable. If Tomcat experiences
> one it needs to be shutdown (if it isn't already) and restarted.

Hi guys, thanks for the replies. I understand the root cause is the
"misconfiguration" but do you consider it as normal behavior to have the Apache
process(after the exception) up and running but not accepting any request since
it's Acceptor thread is gone forever?

We consider this an improper handling of the case when Tomcat cannot create new
worker threads(The OOME thrown by the JVM is also a bit misleading in this
case, because is not a memory issue).

We encountered this in a production environment, during a spike and also
because there were other processes running and forking in the same UID as
Tomcat. The Tomcat process was still up but it couldn't accept new connections.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62185] Acceptor Thread Terminates

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62185

Remy Maucherat <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|REOPENED                    |RESOLVED

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62185] Acceptor Thread Terminates

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62185

--- Comment #5 from Christopher Schultz <[hidden email]> ---
           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|REOPENED                    |RESOLVED

That's Rémy's way of encouraging you to join the user or dev lists. Bugzilla
isn't a great place to have a conversation. Please post there and reference
this BZ issue.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]