Solved

An application that doesn't respond to SIGTERM

Posted on 2006-07-08
7
346 Views
Last Modified: 2008-01-09
I have a couple of relatively complicated Java applications that run as daemons (i.e. it is running using nohup on Linux with standard output and error teed to a log file and redirected to /dev/null).

One of them has a resource problem, which I'm trying to diagnose using the -Xrunhprof:file=/tmp/indexd.hprof,format=b switch on the Java VM (Sun JDK1.5) to generate an HPROF file that I can look at with HAT. There's an on-going thread about this profiling at http:Q_21888827.html.

To get the dump I need to kill the process. However, the process isn't responding to SIGTERM. This has nothing to do with the nohup set-up, because by other application terminates perfectly well. SIGKILL is not an option because that prevents the HPROF file from being generated.

The application uses a lot of 3rd party class libraries.

Should I assume that one of these classes has installed a ShutdownHook (because it isn't me)? If so, what's the best way to find out what's stopping SIGTERM?
0
Comment
Question by:rstaveley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 125 total points
ID: 17064589
Are you sure you're using the right pid?

>>Should I assume that one of these classes has installed a ShutdownHook (because it isn't me)?

Not sure that in itself would make any difference - it should just *respond* to the signal, not hinder it
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 125 total points
ID: 17064613
>>Are you sure you're using the right pid?

i.e. the 'root' pid
0
 
LVL 23

Accepted Solution

by:
Ajay-Singh earned 125 total points
ID: 17064629
> Should I assume that one of these classes has installed a ShutdownHook
> (because it isn't me)? If so, what's the best way to find out what's
> stopping SIGTERM?
It could be the case that the shutdown hook is running. do you see application getting terminated after sometime when shutdown hooks are done?
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 17

Author Comment

by:rstaveley
ID: 17064946
>>Are you sure you're using the right pid?

Only one PID shows in the task listing. I haven't checked that's the root, but I'd hav thought do
0
 
LVL 17

Author Comment

by:rstaveley
ID: 17064949
> It could be the case that the shutdown hook is running. do you see application getting terminated after sometime when shutdown hooks are done?

No it stays a it is
0
 
LVL 17

Author Comment

by:rstaveley
ID: 17101929
Looks like it was a load of java.io.File.deleteOnExit "hooks" that clobbered the VM.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17102369
:-)
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question