You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Gurdeep Kaur (gurdeep)" <gu...@cisco.com> on 2007/03/21 00:56:04 UTC

high CPU usage with codenomicon TLS test case #91

 
We are using tomcat 5.5 with JSSE. When we execute codenomicon test case
#91 from the TLS suit, tomcat CPU usage goes up to 90%.  The platform is
Redhat Linux.

Was wondering if someone has seen something like this before.

Thanks
Gurdeep

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: high CPU usage

Posted by "Gurdeep Kaur (gurdeep)" <gu...@cisco.com>.
Mark,

For some reason the previous TLS sessions are not getting closed, I see
so many TCP sessions in CLOSE_WAIT on port 8443.

Not sure why is that

Gurdeep


 

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Friday, March 23, 2007 3:46 PM
To: Tomcat Users List
Subject: Re: high CPU usage

Gurdeep Kaur (gurdeep) wrote:
> So why would tomcat create two threads for one tls session?

Because Tomcat receives two requests. You might want to start looking
more closely at what is going on at the network level.

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: high CPU usage

Posted by Mark Thomas <ma...@apache.org>.
Gurdeep Kaur (gurdeep) wrote:
> So why would tomcat create two threads for one tls session?

Because Tomcat receives two requests. You might want to start looking
more closely at what is going on at the network level.

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: high CPU usage

Posted by "Gurdeep Kaur (gurdeep)" <gu...@cisco.com>.
So why would tomcat create two threads for one tls session?

Gurdeep

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Thursday, March 22, 2007 4:31 PM
To: Tomcat Users List
Subject: Re: high CPU usage

Gurdeep Kaur (gurdeep) wrote:
> Mark,
> 
> Just thinking some more, as to who actually invokes the threads? Is it

> Tomcat?

They look like Tomcat created threads to me.

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: high CPU usage

Posted by Mark Thomas <ma...@apache.org>.
Gurdeep Kaur (gurdeep) wrote:
> Mark,
> 
> Just thinking some more, as to who actually invokes the threads? Is it
> Tomcat?

They look like Tomcat created threads to me.

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: high CPU usage

Posted by Martin Gainty <mg...@hotmail.com>.
You're requesting a TLS Secure connection 
http://java.sun.com/products/jndi/tutorial/ldap/ext/starttls.html

HTH,
Martin
--------------------------------------------------------------------------- 
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--------------------------------------------------------------------------- 
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
----- Original Message ----- 
From: "Gurdeep Kaur (gurdeep)" <gu...@cisco.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, March 22, 2007 7:18 PM
Subject: RE: high CPU usage


Mark,

Just thinking some more, as to who actually invokes the threads? Is it
Tomcat?

Thanks
Gurdeep 

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Wednesday, March 21, 2007 7:07 PM
To: Tomcat Users List
Subject: Re: high CPU usage

Gurdeep Kaur (gurdeep) wrote:
> Any pointers, inputs will be greatly appreciated.

The handshake is handled by JSSE / the JDK. This looks like a JSSE / JDK
issue rather than a Tomcat one.

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: high CPU usage

Posted by "Gurdeep Kaur (gurdeep)" <gu...@cisco.com>.
Mark,

Just thinking some more, as to who actually invokes the threads? Is it
Tomcat?

Thanks
Gurdeep 

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Wednesday, March 21, 2007 7:07 PM
To: Tomcat Users List
Subject: Re: high CPU usage

Gurdeep Kaur (gurdeep) wrote:
> Any pointers, inputs will be greatly appreciated.

The handshake is handled by JSSE / the JDK. This looks like a JSSE / JDK
issue rather than a Tomcat one.

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: high CPU usage

Posted by Mark Thomas <ma...@apache.org>.
Gurdeep Kaur (gurdeep) wrote:
> Any pointers, inputs will be greatly appreciated.

The handshake is handled by JSSE / the JDK. This looks like a JSSE /
JDK issue rather than a Tomcat one.

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: high CPU usage

Posted by Mark Thomas <ma...@apache.org>.
Gurdeep Kaur (gurdeep) wrote:
> I am going to add some more information to the question I asked
> yesterday.
> 
> I am running a TLS test case to do a TLS handshake on port 8443 of our
> server that is running Tomcat 5.5.
> 
> I noticed in the log file that there are two threads currently running
> on the invocation of this test( there should be just one to handle one
> https request?).  
> 
> One of them is Printing 
> http-8443-Processor1, READ: TLSv1 Handshake, length = and the message
> is repeated thousands and thousand of times thus consuming the CPU.
> 
> The other thread seems to look ok. And the difference I find between
> these two is that the thread that works as intended prints :
> 
> http-8443-Processor2, READ: TLSv1 Handshake, length =8
> 
> Note the non-zero length.
> 
> I can constantly reproduce the issue.
> 
> Any pointers, inputs will be greatly appreciated.

I know the original message is heading towards three years old for but
for the benefit of the archives this was a JVM bug, not a Tomcat one.

I can reproduce the high CPU usage with Tomcat 5.5.20 and JDK 1.5.0_10.
Updating the JVM to 1.5.0_22 or 1.6.0_17 resolves the issue.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to debug tomcat and JSSE

Posted by Rashmi Rubdi <ra...@gmail.com>.
Set these environment variables:

ANT_HOME - Ant's root folder
CATALINA_HOME - Tomcat's root folder
JAVA_HOME  - JDK's root folder

Set
PATH   %JAVA_HOME%/bin;%ANT_HOME%/bin;%CATALINA_HOME%/bin

According to Ant's manual , Ant expects JAVA_HOME and some other
system variables to be set.

-Rashmi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to debug tomcat and JSSE

Posted by Rashmi Rubdi <ra...@gmail.com>.
tools.jar is available in JDK's lib folder.

There's a RUNNING.txt file in Tomcat's root folder which provides all
details on configuring Tomcat.

Ant's installation http://ant.apache.org/manual/index.html requires

JAVA_HOME
ANT_HOME

-Rashmi

On 3/22/07, Gurdeep Kaur (gurdeep) <gu...@cisco.com> wrote:
> Was looking at building tomcat on apache website and so far I have no
> luck building tomcat. Running ant in tomcat_source folder gives me
> errors that a tools.jar file is expected in java folder.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


How to debug tomcat and JSSE

Posted by "Gurdeep Kaur (gurdeep)" <gu...@cisco.com>.
I am new to this group and the tomcat world, and would like to know if
there is information available as to how to debug tomcat related issues
and JSSE related issues if it is used with tomcat.

Was looking at building tomcat on apache website and so far I have no
luck building tomcat. Running ant in tomcat_source folder gives me
errors that a tools.jar file is expected in java folder.

Thanks
Gurdeep

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


high CPU usage

Posted by "Gurdeep Kaur (gurdeep)" <gu...@cisco.com>.
I am going to add some more information to the question I asked
yesterday.

I am running a TLS test case to do a TLS handshake on port 8443 of our
server that is running Tomcat 5.5.

I noticed in the log file that there are two threads currently running
on the invocation of this test( there should be just one to handle one
https request?).  

One of them is Printing 
http-8443-Processor1, READ: TLSv1 Handshake, length = 0 and the message
is repeated thousands and thousand of times thus consuming the CPU.

The other thread seems to look ok. And the difference I find between
these two is that the thread that works as intended prints :

http-8443-Processor2, READ: TLSv1 Handshake, length = 78

Note the non-zero length.

I can constantly reproduce the issue.

Any pointers, inputs will be greatly appreciated.

Thanks
Gurdeep


 



-----Original Message-----
From: Gurdeep Kaur (gurdeep) 
Sent: Tuesday, March 20, 2007 4:56 PM
To: users@tomcat.apache.org
Subject: high CPU usage with codenomicon TLS test case #91

 
We are using tomcat 5.5 with JSSE. When we execute codenomicon test case
#91 from the TLS suit, tomcat CPU usage goes up to 90%.  The platform is
Redhat Linux.

Was wondering if someone has seen something like this before.

Thanks
Gurdeep

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org