[ https://issues.apache.org/jira/browse/DERBY-4856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lily Wei updated DERBY-4856:
----------------------------
Attachment: DERBY-4856_part_2_2a.diff
Thanks Kathey for point out the history and how to proceed. Thanks Knut for helping me on
IRC. Due to the fact that java/shared/org/apache/derby/shared/common is really for derbyclient.jar.
And, my part 1 and part 2 are really only for engine. I will not be changing the java/shared/org/apache/derby/shared/common/sanity/ThreadDump.java.
or any of the shared files.
Instead, I am adding a new java/engine/org/apache/derby/iapi/error/ThreadDumpUtil.java and
java/engine/org/apache/derby/iapi/error/ExceptionUtil.java Since these two files are very
similar to the ThreadDump.java and ExceptionUtil.java in java/shared/ . In the future, if
the code affect both engine and client, developer has to fix in two places.
I changed the name from ThreadDump.java to ThreadDumpUtil.java. If there is no extra instruction
in extraDBMSclasses.properties or rename to ThreadDumpUtil.java, With the change iapi/build.xml,
build process will always build ThreadDump.class in classes/org/apache/derby/shared/common/error/ThreadDump.class.
With derby.module.engine.threaddumputil=org.apache.derby.iapi.error.ThreadDumpUtil in extraDBMSclasses.properties
and rename ThreadDump.java to ThreadDumpUtil.java in iapi/error, the build process will build
classes/org/apache/derby/iapi/error/ThreadDumpUtil.class
ContextManager.java change is so thread dump information will be in insane build. I install
updates for eclipse with my eclipse. The new behavior keeps sorting the import files when
I press safe. I tried to make it not sort the import files and not very successful. I thought
we can use sorted import files. If we prefer not to have it sort, I need help to figure out
how to make eclipse not sort the import files. :)
The code is ready for review. I run Suites.all and derybyall for insane and sane build and
they all run okay. I also tested it with 'corruptdb' database and see the thread dump information.
> Add thread dump information when derby crash
> --------------------------------------------
>
> Key: DERBY-4856
> URL: https://issues.apache.org/jira/browse/DERBY-4856
> Project: Derby
> Issue Type: Bug
> Components: Services
> Reporter: Lily Wei
> Assignee: Lily Wei
> Priority: Minor
> Attachments: ContextManager.java, corruptdb.zip, derby-4856-1a.diff, DERBY-4856-part_1_1a.diff,
DERBY-4856_part_2_2a.diff, derby.log
>
>
> On system crash or session ending error, Derby should dump as much information as possible.
Such as: forcing a javacore if possible or at least thread dump and system environment information.
This should only occur if a running session crashes not on boot error due to fail recovery
etc.
> The IBM jvm provides a way to programmatically dump a javacore. i.e. com.ibm.jvm.Dump.JavaDump()
And, the SUN jvm will force a thread dump using the Unsafe class and there may be a better
way.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|