Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

An application that doesn't respond to SIGTERM

Posted on 2006-07-08
7
Medium Priority
?
358 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 500 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 500 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 500 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn different types of Android Layout and some basics of an Android App.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

609 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