United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6318988 -Xcheck:jni support for user defined Signal handlers
JDK-6318988 : -Xcheck:jni support for user defined Signal handlers

Details
Type:
Enhancement
Submit Date:
2005-09-01
Status:
Closed
Updated Date:
2012-10-13
Project Name:
JDK
Resolved Date:
2007-01-31
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
hs10 (b07)

Related Reports
Backport:
Backport:

Sub Tasks

Description
There are customers who use native subsystems using JNI. Some of these subsystems use signal handlers for their own memory management. Though it is documented on how to use the libjsig.so, to debug a complicated application is not very easy if there is an user error. We must provided better diagnostics and checks something like Xcheck:jni to trace the installation of signal handlers.
Thus we should:
1. Provide a VM launcher flag to specify LD_PRELOAD vs. the environment variable. So customers have
complicated startup scripts which overwrite environment variables.

2. Provide a mechanism like -Xcheck:signal to trace signal handler interpositions etc.

                                    

Comments
EVALUATION

The hs_err log file as of 1.6 contains info if the Signal Handlers have been
hijacked, however when the signal handlers are taken over by the JNI application
depending on how the users handlers work we might not even get a hs_err.log file.
The solution here is to use the watcher thread undex -Xcheck:jni to periodically
checked if the Signal handlers has been usurped.
                                     
2006-11-07
SUGGESTED FIX

See the attachments for the webrev on the proposed solution.
                                     
2006-11-07



Hardware and Software, Engineered to Work Together