Re: Thread dump for Windows Service

2004-09-25 Thread Peter Rossbach
Hello Robert,
   Yes it exists a realy good way to got controlled Threadumps. Install 
your Tomcat with Java Service Wrapper and
activate the Wrapper JMX Bean with a operation to create a 
threaddump and reload the
complete server.

Links:
   Wrapper
 http://wrapper.tanukisoftware.org/doc/english/index.html
 http://wrapper.tanukisoftware.org/doc/english/jmx.html
Centaurus Platform ( Full featured Tomcat Hosting Bundle)
 http://centaurus.sourceforge.net/
My Windows Example:
 http://tomcat.objektpark.org/examples/04_09_tomcat_example.zip
regards
Peter
Robert Herold schrieb:
I've installed tomcat as a Windows service.  Is there any way to trigger the
JVM to produce a thread dump?
I understand how to do so when Tomcat is run in a console window
(cntl-break), but in this case it has to be run as a service.
Thanks for any pointers...
-- bob
--
Robert Herold
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 


--
J2EE Systemarchitekt und Tomcat Experte
http://objektpark.de/
http://www.webapp.de/
Am Josephsschacht 72, 44879 Bochum, Deutschland
Telefon:  (49) 234 9413228
Mobil:(49) 175 1660884
E-Mail:  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: thread dump analysis

2004-02-26 Thread Daniel Gibby
I definitely do have LD_KERNEL_ASSUME in my environment

If you search for LD_KERNEL and my name on google, you will see that I 
was part of a discussion a while back that was glad to find that out.

Daniel Gibby

Oscar Carrillo wrote:

Hi,

Saw your message on the boards.

Did you make sure you have this environment variable set?

On systems that I need it, I put it in my tomcat startup file.

LD_KERNEL_ASSUME=2.2.5

Check out my howto page for my brief notes on threading and it's potential
problems with JVMs and threads.
http://www.linuxjava.net/howto/webapp/

Oscar

On Tue, 17 Feb 2004, Daniel Gibby wrote:

 

My tomcat 4.1.29 instance running J2RE 1.4.1 IBM build 
cxia321411-20030930 on RedHat 9 kernel 2.4.18-14
keeps gaining processor usage until finally can't answer requests 
successfully.

The machine has a relatively light load.

I did a kill -3 on the process that showed up on top and got a stack 
trace... the problem is I have no idea how to analyze the thread dump to 
see what is consuming CPU.
I'm sure something must be spinning its wheels, but I don't know how to 
tell... I can just see that when I run top my tomcat process has 99.9 % 
of the CPU and the load average is 8.00 8.00 8.00

I've fixed problems in the past on a separate java application (not 
tomcat) where I can tell what the problem is in the thread dump because 
a thread waiting to be notified is also the one that has a lock on it to 
notify the thing that is waiting to notify it... (that didn't make 
sense, I know... but anyway it is basically a circle where it won't ever 
get woken up.)
However, in this tomcat case, I can't see anything like that where 
something is waiting in circles... even though I wouldn't rule that out. 
My experience on reading thread dumps is limited... Anyway, can someone 
who has better experience tell me what is consuming the CPU? Restarting 
tomcat brings the load back down, and it slowly goes up again... like 
over a few days to a weeks time it is back up to 8.00 Load Average.

I won't include the whole file. I trimmed the file down to 1350 lines by 
getting rid of a lot of 2HPMEMMAPLINE lines and the section titled:
0SECTION   CL subcomponent dump routine
but I think that is still too long to post here.

I'm hoping that someone can tell me what to include and what to exclude 
and I'll reply with the appropriate parts of the dump.

Thanks,
Daniel
NULL   

0SECTION   TITLE subcomponent dump routine
NULL   ===
1TISIGINFO signal 3 received
1TIDATETIMEDate: 2004/02/17 at 08:53:22
1TIFILENAMEJavacore filename:/tmp/javacore.20040217.085322.23429.txt
NULL   

0SECTION   XHPI subcomponent dump routine
NULL   ==
1HPTIMETue Feb 17 08:53:22 2004
1HPSIGRECV SIGQUIT received in ?? at (nil) in ??.
1HPFULLVERSION J2RE 1.4.1 IBM build cxia321411-20030930
NULL
1HPOPENV   Operating Environment
NULL   -
2HPHOSTNAMEHost : somehost.com.(none)
2HPOSLEVEL OS Level : 2.4.18-14.#1 Wed Sep 4 13:35:50 EDT 2002
2HPLIBCVER glibc Version: 2.2.93
2HPCPUSProcessors -
3HPARCH  Architecture : (not implemented)
3HPNUMCPUS   How Many : (not implemented)
3HPCPUSENABLED   Enabled  : 1
NULL
1HPMEMINFO Memory Info
NULL   ---
2HPMEMLINE total:used:free:  shared: buffers:  cached:
2HPMEMLINE Mem:  1055625216 1015181312 404439040 83464192 
614227968
2HPMEMLINE Swap: 1052827648   929792 1051897856
2HPMEMLINE MemTotal:  1030884 kB
2HPMEMLINE MemFree: 39496 kB
2HPMEMLINE MemShared:   0 kB
2HPMEMLINE Buffers: 81508 kB
2HPMEMLINE Cached: 599596 kB
2HPMEMLINE SwapCached:236 kB
2HPMEMLINE Active: 552968 kB
2HPMEMLINE Inact_dirty:344020 kB
2HPMEMLINE Inact_clean: 50304 kB
2HPMEMLINE Inact_target:   189456 kB
2HPMEMLINE HighTotal:  130880 kB
2HPMEMLINE HighFree: 1024 kB
2HPMEMLINE LowTotal:   94 kB
2HPMEMLINE LowFree: 38472 kB
2HPMEMLINE SwapTotal: 1028152 kB
2HPMEMLINE SwapFree:  1027244 kB
2HPMEMLINE Committed_AS:  1067972 kB
NULL
1HPUSERLIMITS  User Limits (in bytes except for NOFILE and NPROC) -
NULL   ---
2HPUSERLIMIT   RLIMIT_FSIZE   : infinity
2HPUSERLIMIT   RLIMIT_DATA: infinity
2HPUSERLIMIT   RLIMIT_STACK   : 2093056
2HPUSERLIMIT   RLIMIT_CORE: 0
2HPUSERLIMIT   RLIMIT_NOFILE  : 1024
2HPUSERLIMIT   RLIMIT_NPROC   : 7168
NULL
1HPSIGHANDLERS JVM Signal Handlers
NULL   ---
2HPSIGHANDLER  HUP: unknown handler
2HPSIGHANDLER  INT: unknown handler
2HPSIGHANDLER  QUIT 

Re: thread dump analysis

2004-02-26 Thread Oscar Carrillo
Hi,

Saw your message on the boards.

Did you make sure you have this environment variable set?

On systems that I need it, I put it in my tomcat startup file.

LD_KERNEL_ASSUME=2.2.5

Check out my howto page for my brief notes on threading and it's potential
problems with JVMs and threads.

http://www.linuxjava.net/howto/webapp/

Oscar

On Tue, 17 Feb 2004, Daniel Gibby wrote:

 My tomcat 4.1.29 instance running J2RE 1.4.1 IBM build 
 cxia321411-20030930 on RedHat 9 kernel 2.4.18-14
 keeps gaining processor usage until finally can't answer requests 
 successfully.
 
 The machine has a relatively light load.
 
 I did a kill -3 on the process that showed up on top and got a stack 
 trace... the problem is I have no idea how to analyze the thread dump to 
 see what is consuming CPU.
 I'm sure something must be spinning its wheels, but I don't know how to 
 tell... I can just see that when I run top my tomcat process has 99.9 % 
 of the CPU and the load average is 8.00 8.00 8.00
 
 I've fixed problems in the past on a separate java application (not 
 tomcat) where I can tell what the problem is in the thread dump because 
 a thread waiting to be notified is also the one that has a lock on it to 
 notify the thing that is waiting to notify it... (that didn't make 
 sense, I know... but anyway it is basically a circle where it won't ever 
 get woken up.)
 However, in this tomcat case, I can't see anything like that where 
 something is waiting in circles... even though I wouldn't rule that out. 
 My experience on reading thread dumps is limited... Anyway, can someone 
 who has better experience tell me what is consuming the CPU? Restarting 
 tomcat brings the load back down, and it slowly goes up again... like 
 over a few days to a weeks time it is back up to 8.00 Load Average.
 
 I won't include the whole file. I trimmed the file down to 1350 lines by 
 getting rid of a lot of 2HPMEMMAPLINE lines and the section titled:
 0SECTION   CL subcomponent dump routine
 but I think that is still too long to post here.
 
 I'm hoping that someone can tell me what to include and what to exclude 
 and I'll reply with the appropriate parts of the dump.
 
 Thanks,
 Daniel
 
 NULL   
 
 0SECTION   TITLE subcomponent dump routine
 NULL   ===
 1TISIGINFO signal 3 received
 1TIDATETIMEDate: 2004/02/17 at 08:53:22
 1TIFILENAMEJavacore filename:/tmp/javacore.20040217.085322.23429.txt
 NULL   
 
 0SECTION   XHPI subcomponent dump routine
 NULL   ==
 1HPTIMETue Feb 17 08:53:22 2004
 1HPSIGRECV SIGQUIT received in ?? at (nil) in ??.
 1HPFULLVERSION J2RE 1.4.1 IBM build cxia321411-20030930
 NULL
 1HPOPENV   Operating Environment
 NULL   -
 2HPHOSTNAMEHost : somehost.com.(none)
 2HPOSLEVEL OS Level : 2.4.18-14.#1 Wed Sep 4 13:35:50 EDT 2002
 2HPLIBCVER glibc Version: 2.2.93
 2HPCPUSProcessors -
 3HPARCH  Architecture : (not implemented)
 3HPNUMCPUS   How Many : (not implemented)
 3HPCPUSENABLED   Enabled  : 1
 NULL
 1HPMEMINFO Memory Info
 NULL   ---
 2HPMEMLINE total:used:free:  shared: buffers:  cached:
 2HPMEMLINE Mem:  1055625216 1015181312 404439040 83464192 
 614227968
 2HPMEMLINE Swap: 1052827648   929792 1051897856
 2HPMEMLINE MemTotal:  1030884 kB
 2HPMEMLINE MemFree: 39496 kB
 2HPMEMLINE MemShared:   0 kB
 2HPMEMLINE Buffers: 81508 kB
 2HPMEMLINE Cached: 599596 kB
 2HPMEMLINE SwapCached:236 kB
 2HPMEMLINE Active: 552968 kB
 2HPMEMLINE Inact_dirty:344020 kB
 2HPMEMLINE Inact_clean: 50304 kB
 2HPMEMLINE Inact_target:   189456 kB
 2HPMEMLINE HighTotal:  130880 kB
 2HPMEMLINE HighFree: 1024 kB
 2HPMEMLINE LowTotal:   94 kB
 2HPMEMLINE LowFree: 38472 kB
 2HPMEMLINE SwapTotal: 1028152 kB
 2HPMEMLINE SwapFree:  1027244 kB
 2HPMEMLINE Committed_AS:  1067972 kB
 NULL
 1HPUSERLIMITS  User Limits (in bytes except for NOFILE and NPROC) -
 NULL   ---
 2HPUSERLIMIT   RLIMIT_FSIZE   : infinity
 2HPUSERLIMIT   RLIMIT_DATA: infinity
 2HPUSERLIMIT   RLIMIT_STACK   : 2093056
 2HPUSERLIMIT   RLIMIT_CORE: 0
 2HPUSERLIMIT   RLIMIT_NOFILE  : 1024
 2HPUSERLIMIT   RLIMIT_NPROC   : 7168
 NULL
 1HPSIGHANDLERS JVM Signal Handlers
 NULL   ---
 2HPSIGHANDLER  HUP: unknown handler
 2HPSIGHANDLER  INT: unknown handler
 2HPSIGHANDLER  QUIT   : unknown handler
 2HPSIGHANDLER  ILL: unknown handler
 2HPSIGHANDLER  TRAP   : unknown handler
 2HPSIGHANDLER  

RE: thread dump analysis

2004-02-17 Thread Shapira, Yoav

Howdy,
Can you reproduce this behavior when running with a profiler?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Daniel Gibby [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 17, 2004 12:21 PM
To: Tomcat Users List
Subject: thread dump analysis

My tomcat 4.1.29 instance running J2RE 1.4.1 IBM build
cxia321411-20030930 on RedHat 9 kernel 2.4.18-14
keeps gaining processor usage until finally can't answer requests
successfully.

The machine has a relatively light load.

I did a kill -3 on the process that showed up on top and got a stack
trace... the problem is I have no idea how to analyze the thread dump
to
see what is consuming CPU.
I'm sure something must be spinning its wheels, but I don't know how to
tell... I can just see that when I run top my tomcat process has 99.9 %
of the CPU and the load average is 8.00 8.00 8.00

I've fixed problems in the past on a separate java application (not
tomcat) where I can tell what the problem is in the thread dump because
a thread waiting to be notified is also the one that has a lock on it
to
notify the thing that is waiting to notify it... (that didn't make
sense, I know... but anyway it is basically a circle where it won't
ever
get woken up.)
However, in this tomcat case, I can't see anything like that where
something is waiting in circles... even though I wouldn't rule that
out.
My experience on reading thread dumps is limited... Anyway, can someone
who has better experience tell me what is consuming the CPU? Restarting
tomcat brings the load back down, and it slowly goes up again... like
over a few days to a weeks time it is back up to 8.00 Load Average.

I won't include the whole file. I trimmed the file down to 1350 lines
by
getting rid of a lot of 2HPMEMMAPLINE lines and the section titled:
0SECTION   CL subcomponent dump routine
but I think that is still too long to post here.

I'm hoping that someone can tell me what to include and what to exclude
and I'll reply with the appropriate parts of the dump.

Thanks,
Daniel

NULL
---
-
0SECTION   TITLE subcomponent dump routine
NULL   ===
1TISIGINFO signal 3 received
1TIDATETIMEDate: 2004/02/17 at 08:53:22
1TIFILENAMEJavacore filename:
/tmp/javacore.20040217.085322.23429.txt
NULL
---
-
0SECTION   XHPI subcomponent dump routine
NULL   ==
1HPTIMETue Feb 17 08:53:22 2004
1HPSIGRECV SIGQUIT received in ?? at (nil) in ??.
1HPFULLVERSION J2RE 1.4.1 IBM build cxia321411-20030930
NULL
1HPOPENV   Operating Environment
NULL   -
2HPHOSTNAMEHost : somehost.com.(none)
2HPOSLEVEL OS Level : 2.4.18-14.#1 Wed Sep 4 13:35:50 EDT
2002
2HPLIBCVER glibc Version: 2.2.93
2HPCPUSProcessors -
3HPARCH  Architecture : (not implemented)
3HPNUMCPUS   How Many : (not implemented)
3HPCPUSENABLED   Enabled  : 1
NULL
1HPMEMINFO Memory Info
NULL   ---
2HPMEMLINE total:used:free:  shared: buffers:
cached:
2HPMEMLINE Mem:  1055625216 1015181312 404439040 83464192
614227968
2HPMEMLINE Swap: 1052827648   929792 1051897856
2HPMEMLINE MemTotal:  1030884 kB
2HPMEMLINE MemFree: 39496 kB
2HPMEMLINE MemShared:   0 kB
2HPMEMLINE Buffers: 81508 kB
2HPMEMLINE Cached: 599596 kB
2HPMEMLINE SwapCached:236 kB
2HPMEMLINE Active: 552968 kB
2HPMEMLINE Inact_dirty:344020 kB
2HPMEMLINE Inact_clean: 50304 kB
2HPMEMLINE Inact_target:   189456 kB
2HPMEMLINE HighTotal:  130880 kB
2HPMEMLINE HighFree: 1024 kB
2HPMEMLINE LowTotal:   94 kB
2HPMEMLINE LowFree: 38472 kB
2HPMEMLINE SwapTotal: 1028152 kB
2HPMEMLINE SwapFree:  1027244 kB
2HPMEMLINE Committed_AS:  1067972 kB
NULL
1HPUSERLIMITS  User Limits (in bytes except for NOFILE and NPROC) -
NULL   ---
2HPUSERLIMIT   RLIMIT_FSIZE   : infinity
2HPUSERLIMIT   RLIMIT_DATA: infinity
2HPUSERLIMIT   RLIMIT_STACK   : 2093056
2HPUSERLIMIT   RLIMIT_CORE: 0
2HPUSERLIMIT   RLIMIT_NOFILE  : 1024
2HPUSERLIMIT   RLIMIT_NPROC   : 7168
NULL
1HPSIGHANDLERS JVM Signal Handlers
NULL   ---
2HPSIGHANDLER  HUP: unknown handler
2HPSIGHANDLER  INT: unknown handler
2HPSIGHANDLER  QUIT   : unknown handler
2HPSIGHANDLER  ILL: unknown handler
2HPSIGHANDLER  TRAP   : unknown handler
2HPSIGHANDLER  ABRT   : unknown handler
2HPSIGHANDLER  FPE: unknown handler
2HPSIGHANDLER  KILL   : default handler





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For 

Re: thread dump analysis

2004-02-17 Thread Daniel Gibby
I can't run a profiler on this as it is a live system. I also don't have 
the resources to setup another box right now to even test it... I'm in a 
fire-fighting mode half of the time, and a village building mode the 
rest of the time. (Hmmm. I think I'll stop everything and write a tech 
book called Village Building and Fire Fighting - Stopping the Cycle of 
Technology Wastefulness - Don't anyone take my title! This list is 
archived and I can prove that I thought of it first! I will make a multi 
player board game as well. People will be able to play it at work during 
meetings!)

Anyway, back to the problem at hand. I can't run a profiler right now. 
It is too big of an obstacle right now, even though I'd like to be able 
to take three weeks and run a profile on all my java apps. I just don't 
have three weeks, and the barrier to entry is too big since I'm 
basically a one-man show.

Thanks,
Daniel
==
All original works from this email Copyright 2004 Daniel Gibby
- Steal and be Sued! - or contact me for licensing!
==
Shapira, Yoav wrote:

Howdy,
Can you reproduce this behavior when running with a profiler?
Yoav Shapira
Millennium ChemInformatics
 

-Original Message-
From: Daniel Gibby [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 17, 2004 12:21 PM
To: Tomcat Users List
Subject: thread dump analysis
My tomcat 4.1.29 instance running J2RE 1.4.1 IBM build
cxia321411-20030930 on RedHat 9 kernel 2.4.18-14
keeps gaining processor usage until finally can't answer requests
successfully.
The machine has a relatively light load.

I did a kill -3 on the process that showed up on top and got a stack
trace... the problem is I have no idea how to analyze the thread dump
   

to
 

see what is consuming CPU.
I'm sure something must be spinning its wheels, but I don't know how to
tell... I can just see that when I run top my tomcat process has 99.9 %
of the CPU and the load average is 8.00 8.00 8.00
I've fixed problems in the past on a separate java application (not
tomcat) where I can tell what the problem is in the thread dump because
a thread waiting to be notified is also the one that has a lock on it
   

to
 

notify the thing that is waiting to notify it... (that didn't make
sense, I know... but anyway it is basically a circle where it won't
   

ever
 

get woken up.)
However, in this tomcat case, I can't see anything like that where
something is waiting in circles... even though I wouldn't rule that
   

out.
 

My experience on reading thread dumps is limited... Anyway, can someone
who has better experience tell me what is consuming the CPU? Restarting
tomcat brings the load back down, and it slowly goes up again... like
over a few days to a weeks time it is back up to 8.00 Load Average.
I won't include the whole file. I trimmed the file down to 1350 lines
   

by
 

getting rid of a lot of 2HPMEMMAPLINE lines and the section titled:
0SECTION   CL subcomponent dump routine
but I think that is still too long to post here.
I'm hoping that someone can tell me what to include and what to exclude
and I'll reply with the appropriate parts of the dump.
Thanks,
Daniel
NULL
---
   

-
 

0SECTION   TITLE subcomponent dump routine
NULL   ===
1TISIGINFO signal 3 received
1TIDATETIMEDate: 2004/02/17 at 08:53:22
1TIFILENAMEJavacore filename:
/tmp/javacore.20040217.085322.23429.txt
NULL
---
   

-
 

0SECTION   XHPI subcomponent dump routine
NULL   ==
1HPTIMETue Feb 17 08:53:22 2004
1HPSIGRECV SIGQUIT received in ?? at (nil) in ??.
1HPFULLVERSION J2RE 1.4.1 IBM build cxia321411-20030930
NULL
1HPOPENV   Operating Environment
NULL   -
2HPHOSTNAMEHost : somehost.com.(none)
2HPOSLEVEL OS Level : 2.4.18-14.#1 Wed Sep 4 13:35:50 EDT
   

2002
 

2HPLIBCVER glibc Version: 2.2.93
2HPCPUSProcessors -
3HPARCH  Architecture : (not implemented)
3HPNUMCPUS   How Many : (not implemented)
3HPCPUSENABLED   Enabled  : 1
NULL
1HPMEMINFO Memory Info
NULL   ---
2HPMEMLINE total:used:free:  shared: buffers:
   

cached:
 

2HPMEMLINE Mem:  1055625216 1015181312 404439040 83464192
614227968
2HPMEMLINE Swap: 1052827648   929792 1051897856
2HPMEMLINE MemTotal:  1030884 kB
2HPMEMLINE MemFree: 39496 kB
2HPMEMLINE MemShared:   0 kB
2HPMEMLINE Buffers: 81508 kB
2HPMEMLINE Cached: 599596 kB
2HPMEMLINE SwapCached:236 kB
2HPMEMLINE Active: 552968 kB
2HPMEMLINE Inact_dirty:344020 kB
2HPMEMLINE Inact_clean: 50304 kB
2HPMEMLINE Inact_target:  

RE: thread dump analysis

2004-02-17 Thread Shapira, Yoav

Howdy,

My tomcat 4.1.29 instance running J2RE 1.4.1 IBM build
cxia321411-20030930 on RedHat 9 kernel 2.4.18-14
keeps gaining processor usage until finally can't answer requests
successfully.

OK, so you can't profile.  I'm not sure a thread dump would be that
useful in this scenario because it might be a repeating operation, e.g.
on a growing collection.

Do you maybe have a class that keeps searching through a collection for
some object, and that collection grows with time to the point where the
search consumes a lot of CPU?

Or perhaps garbage collection is the culprit?  If you can restart your
JVM, add -verbose:gc to the java VM options, so you can see if the CPU
time is spent collecting garbage is monotonically increasing to the
point of thrashing (repeating full GC collections that don't reclaim any
significant heap space).

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: thread dump analysis

2004-02-17 Thread David Rees
On Tue, February 17, 2004 at 9:20 am, Daniel Gibby wrote:

 I did a kill -3 on the process that showed up on top and got a stack
 trace... the problem is I have no idea how to analyze the thread dump to
 see what is consuming CPU.
 I'm sure something must be spinning its wheels, but I don't know how to
 tell... I can just see that when I run top my tomcat process has 99.9 %
 of the CPU and the load average is 8.00 8.00 8.00

snip

 I'm hoping that someone can tell me what to include and what to exclude
 and I'll reply with the appropriate parts of the dump.

Best to just post the entire dump somewhere on the web where everyone can
look at it.  Sounds like something somewhere is getting threads stuck in a
loop, should be pretty easy to spot if you get the dump during a non-busy
time.

Not sure how big of an attachment the list will accept, but you might be
able to compress it and attach it to the list.

If it's too big, just send it to me privately and I will have a look.

-Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: thread dump analysis

2004-02-17 Thread Daniel Gibby
Well, I'd rather not show the world what my java processes are doing in 
case there is something proprietary in there.

I'll send it to you personally.

Daniel

David Rees wrote:

On Tue, February 17, 2004 at 9:20 am, Daniel Gibby wrote:
 

I did a kill -3 on the process that showed up on top and got a stack
trace... the problem is I have no idea how to analyze the thread dump to
see what is consuming CPU.
I'm sure something must be spinning its wheels, but I don't know how to
tell... I can just see that when I run top my tomcat process has 99.9 %
of the CPU and the load average is 8.00 8.00 8.00
   

snip
 

I'm hoping that someone can tell me what to include and what to exclude
and I'll reply with the appropriate parts of the dump.
   

Best to just post the entire dump somewhere on the web where everyone can
look at it.  Sounds like something somewhere is getting threads stuck in a
loop, should be pretty easy to spot if you get the dump during a non-busy
time.
Not sure how big of an attachment the list will accept, but you might be
able to compress it and attach it to the list.
If it's too big, just send it to me privately and I will have a look.

-Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: thread dump analysis

2004-02-17 Thread David Rees
On Tue, February 17, 2004 1at 2:04 pm, Daniel Gibby wrote:
 Well, I'd rather not show the world what my java processes are doing in
 case there is something proprietary in there.

 I'll send it to you personally.

OK, but it's tough for people to help troubleshoot your issue unless you
do so.  ;-)

-Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: thread dump analysis

2004-02-17 Thread David Rees
David Rees wrote, On 2/17/2004 12:43 PM:

On Tue, February 17, 2004 1at 2:04 pm, Daniel Gibby wrote:

Well, I'd rather not show the world what my java processes are doing in
case there is something proprietary in there.
I'll send it to you personally.
OK, but it's tough for people to help troubleshoot your issue unless you
do so.  ;-)
I had a look at Daniel's thread dump, it did not appear to be an issue 
with Tomcat, but rather an issue with either some jcrontab threads or a 
JVM/OS issue as he is running the IBM 1.4.1 JDK on a stock RH 8 system.

-Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: thread dump analysis

2004-02-17 Thread Daniel Gibby
I'm going to try and disable the jcrontab servlets and see if the 
problem persists. After that, I'll try and schedule some upgrades.

Thanks for your help David!

Daniel

David Rees wrote:

David Rees wrote, On 2/17/2004 12:43 PM:

On Tue, February 17, 2004 1at 2:04 pm, Daniel Gibby wrote:

Well, I'd rather not show the world what my java processes are doing in
case there is something proprietary in there.
I'll send it to you personally.


OK, but it's tough for people to help troubleshoot your issue unless you
do so.  ;-)


I had a look at Daniel's thread dump, it did not appear to be an issue 
with Tomcat, but rather an issue with either some jcrontab threads or 
a JVM/OS issue as he is running the IBM 1.4.1 JDK on a stock RH 8 system.

-Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Thread dump - (basic)

2003-09-01 Thread Eric J. Pinnell
Hi,

Kill -QUIT will work.  It will send the output to catalina.out and not
kill the process.  It doesn't have to be running in the foreground.

-e

On Mon, 1 Sep 2003, Euan Guttridge wrote:

 What is the best method to get a stack dump following a frozen tomcat? I
 cannot use kill -QUIT (pid) since running in production and do not want to
 run TC in the foreground.

 Thanks,
 Euan


 J2DSK_1.4.1_03
 TC 4.1.24 (Standalone, Coyote connector)
 Linux RH9.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Thread dump

2002-12-06 Thread rsequeira

kill -3 pid

RS


   

  Manavendra  

  Gupta   To:   Tomcat Users List   

  [EMAIL PROTECTED]  [EMAIL PROTECTED]   

   cc: 

  12/06/02 09:53 AMSubject:  Thread dump   

  Please respond to

  Tomcat Users

  List

   

   





I have tomcat 4.1 running on Linux. How do i see the thread dump? The
startup.sh on linux just starts it in the background, while i could use
startup.bat on windows and get the thread dump.

thanks,
manav.


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]







--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Thread dump

2002-12-06 Thread Manavendra Gupta
Beg your pardon? would that not actually kill the process, rather than
displaying the thread dump?

And what if one wants to see the thread dump right from the moment tomcat
starts up?

Thanks,
manav.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 9:18 PM
To: Tomcat Users List
Subject: Re: Thread dump



kill -3 pid

RS



  Manavendra
  Gupta   To:   Tomcat Users List
  [EMAIL PROTECTED]
[EMAIL PROTECTED]
   cc:
  12/06/02 09:53 AMSubject:  Thread dump
  Please respond to
  Tomcat Users
  List






I have tomcat 4.1 running on Linux. How do i see the thread dump? The
startup.sh on linux just starts it in the background, while i could use
startup.bat on windows and get the thread dump.

thanks,
manav.


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]







--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Thread dump

2002-12-06 Thread rsequeira

You could use Thread.enumerate(Thread [] ) and then do a Thread.dumpStack()
on each thread in your code. I can't provide any definite answers on how to
get a thread dump right from the moment Tomcat starts, but I suppose you
could modify Tomcat code (call the about the methods in your code) to do
this.

RS



   

  Manavendra  

  Gupta   To:   Tomcat Users List   

  [EMAIL PROTECTED]  [EMAIL PROTECTED]   

   cc: 

  12/06/02 10:01 AMSubject:  RE: Thread dump   

  Please respond to

  Tomcat Users

  List

   

   





Beg your pardon? would that not actually kill the process, rather than
displaying the thread dump?

And what if one wants to see the thread dump right from the moment tomcat
starts up?

Thanks,
manav.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 9:18 PM
To: Tomcat Users List
Subject: Re: Thread dump



kill -3 pid

RS



  Manavendra
  Gupta   To:   Tomcat Users
List
  [EMAIL PROTECTED]
[EMAIL PROTECTED]
   cc:
  12/06/02 09:53 AMSubject:  Thread dump
  Please respond to
  Tomcat Users
  List






I have tomcat 4.1 running on Linux. How do i see the thread dump? The
startup.sh on linux just starts it in the background, while i could use
startup.bat on windows and get the thread dump.

thanks,
manav.


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]







--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]







--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Thread dump

2002-12-06 Thread Denis Haskin
Run it under a JPDA debugger and use something like
- Xrunjdwp:transport=dt_shmem,server=y,suspend=y
so that the JVM stops and waits for debugger commands right away.  Then 
you could get to the right point in your code, and with any decent 
debugger look at the thread dump without needing to send the signal.

By the way, what exactly do you mean by right from the moment tomcat 
starts up?  Do you mean before the tomcat's main() starts?  Before your 
servlet is loaded?

dwh

[EMAIL PROTECTED] wrote:

You could use Thread.enumerate(Thread [] ) and then do a Thread.dumpStack()
on each thread in your code. I can't provide any definite answers on how to
get a thread dump right from the moment Tomcat starts, but I suppose you
could modify Tomcat code (call the about the methods in your code) to do
this.
 




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Thread dump

2002-12-06 Thread Manavendra Gupta
Thanks. I'm gonna try jpda - i have just started exploring it.

i was interested to see the thread dump from the point tomcat's main()
starts, to get a hang of the sequence of the class loaders/resource
managers/security realms, etc starting up.

thanks,
manav.

-Original Message-
From: Denis Haskin [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 9:53 PM
To: Tomcat Users List
Subject: Re: Thread dump


Run it under a JPDA debugger and use something like
- Xrunjdwp:transport=dt_shmem,server=y,suspend=y
so that the JVM stops and waits for debugger commands right away.  Then
you could get to the right point in your code, and with any decent
debugger look at the thread dump without needing to send the signal.

By the way, what exactly do you mean by right from the moment tomcat
starts up?  Do you mean before the tomcat's main() starts?  Before your
servlet is loaded?

dwh

[EMAIL PROTECTED] wrote:

You could use Thread.enumerate(Thread [] ) and then do a Thread.dumpStack()
on each thread in your code. I can't provide any definite answers on how to
get a thread dump right from the moment Tomcat starts, but I suppose you
could modify Tomcat code (call the about the methods in your code) to do
this.





--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Thread dump

2002-12-06 Thread Schnitzer, Jeff
FYI, no it doesn't, it just causes the (Sun, at least) JVM to dump a
list of threads and their stacks to stderr.  Note that it's the real
stderr, not System.err.  This is a JVM feature.  It can be done anytime
and is a *really* useful debugging feature.

Jeff

 -Original Message-
 From: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 06, 2002 8:01 AM
 To: Tomcat Users List
 Subject: RE: Thread dump
 
 Beg your pardon? would that not actually kill the process, rather than
 displaying the thread dump?
 
 And what if one wants to see the thread dump right from the moment
tomcat
 starts up?
 
 Thanks,
 manav.
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 06, 2002 9:18 PM
 To: Tomcat Users List
 Subject: Re: Thread dump
 
 
 
 kill -3 pid
 
 RS
 
 
 
   Manavendra
   Gupta   To:   Tomcat Users
 List
   [EMAIL PROTECTED]
 [EMAIL PROTECTED]
cc:
   12/06/02 09:53 AMSubject:  Thread dump
   Please respond to
   Tomcat Users
   List
 
 
 
 
 
 
 I have tomcat 4.1 running on Linux. How do i see the thread dump? The
 startup.sh on linux just starts it in the background, while i could
use
 startup.bat on windows and get the thread dump.
 
 thanks,
 manav.
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-user-
 [EMAIL PROTECTED]
 For additional commands, e-mail: mailto:tomcat-user-
 [EMAIL PROTECTED]
 


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Thread dump

2002-12-06 Thread Ben Ricker
I am intrigued by this feature; it would help with the debugging of a
application. I tried to test it against tomcat but I get nothing on
stderr (i.e., nothing in /var/log/messages, terminal, directory I am in,
catalina.out, or any of the logs for Tomcat).

Could you expand on what behavior you see when you send the -3 to
Tomcat's PID?

Thanks,

Ben Ricker
Wellinx.com

On Fri, 2002-12-06 at 12:29, Schnitzer, Jeff wrote:
 FYI, no it doesn't, it just causes the (Sun, at least) JVM to dump a
 list of threads and their stacks to stderr.  Note that it's the real
 stderr, not System.err.  This is a JVM feature.  It can be done anytime
 and is a *really* useful debugging feature.
 
 Jeff
 
  -Original Message-
  From: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 06, 2002 8:01 AM
  To: Tomcat Users List
  Subject: RE: Thread dump
  
  Beg your pardon? would that not actually kill the process, rather than
  displaying the thread dump?
  
  And what if one wants to see the thread dump right from the moment
 tomcat
  starts up?
  
  Thanks,
  manav.
  
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Friday, December 06, 2002 9:18 PM
  To: Tomcat Users List
  Subject: Re: Thread dump
  
  
  
  kill -3 pid
  
  RS
  
  
  
Manavendra
Gupta   To:   Tomcat Users
  List
[EMAIL PROTECTED]
  [EMAIL PROTECTED]
 cc:
12/06/02 09:53 AMSubject:  Thread dump
Please respond to
Tomcat Users
List
  
  
  
  
  
  
  I have tomcat 4.1 running on Linux. How do i see the thread dump? The
  startup.sh on linux just starts it in the background, while i could
 use
  startup.bat on windows and get the thread dump.
  
  thanks,
  manav.
  
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
  
  
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
  --
  To unsubscribe, e-mail:   mailto:tomcat-user-
  [EMAIL PROTECTED]
  For additional commands, e-mail: mailto:tomcat-user-
  [EMAIL PROTECTED]
  
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
-- 
Ben Ricker [EMAIL PROTECTED]
Wellinx.com


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Thread dump

2002-12-06 Thread Jeremy Joslin
There's a whitepaper about it located here:
http://developer.java.sun.com/developer/technicalArticles/Programming/Stackt
race/

Jeremy

 -Original Message-
 From: Ben Ricker [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 06, 2002 12:58 PM
 To: Tomcat Users List
 Subject: RE: Thread dump
 
 I am intrigued by this feature; it would help with the debugging of a
 application. I tried to test it against tomcat but I get nothing on
 stderr (i.e., nothing in /var/log/messages, terminal, directory I am in,
 catalina.out, or any of the logs for Tomcat).
 
 Could you expand on what behavior you see when you send the -3 to
 Tomcat's PID?
 
 Thanks,
 
 Ben Ricker
 Wellinx.com
 
 On Fri, 2002-12-06 at 12:29, Schnitzer, Jeff wrote:
  FYI, no it doesn't, it just causes the (Sun, at least) JVM to dump a
  list of threads and their stacks to stderr.  Note that it's the real
  stderr, not System.err.  This is a JVM feature.  It can be done anytime
  and is a *really* useful debugging feature.
 
  Jeff
 
   -Original Message-
   From: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
   Sent: Friday, December 06, 2002 8:01 AM
   To: Tomcat Users List
   Subject: RE: Thread dump
  
   Beg your pardon? would that not actually kill the process, rather than
   displaying the thread dump?
  
   And what if one wants to see the thread dump right from the moment
  tomcat
   starts up?
  
   Thanks,
   manav.
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Friday, December 06, 2002 9:18 PM
   To: Tomcat Users List
   Subject: Re: Thread dump
  
  
  
   kill -3 pid
  
   RS
  
  
  
 Manavendra
 Gupta   To:   Tomcat Users
   List
 [EMAIL PROTECTED]
   [EMAIL PROTECTED]
  cc:
 12/06/02 09:53 AMSubject:  Thread dump
 Please respond to
 Tomcat Users
 List
  
  
  
  
  
  
   I have tomcat 4.1 running on Linux. How do i see the thread dump? The
   startup.sh on linux just starts it in the background, while i could
  use
   startup.bat on windows and get the thread dump.
  
   thanks,
   manav.
  
  
   --
   To unsubscribe, e-mail:   
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail: 
   mailto:[EMAIL PROTECTED]
  
  
  
  
  
  
  
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
  
   --
   To unsubscribe, e-mail:   mailto:tomcat-user-
   [EMAIL PROTECTED]
   For additional commands, e-mail: mailto:tomcat-user-
   [EMAIL PROTECTED]
  
 
 
  --
  To unsubscribe, e-mail:   mailto:tomcat-user-
 [EMAIL PROTECTED]
  For additional commands, e-mail: mailto:tomcat-user-
 [EMAIL PROTECTED]
 
 --
 Ben Ricker [EMAIL PROTECTED]
 Wellinx.com
 
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-user-
 [EMAIL PROTECTED]
 For additional commands, e-mail: mailto:tomcat-user-
 [EMAIL PROTECTED]



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]