db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3618) Perform thread dump with ASSERTS with jdk 1.5 or higher
Date Tue, 22 Jul 2008 20:55:31 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615786#action_12615786
] 

Kathey Marsden commented on DERBY-3618:
---------------------------------------

Knut asked:
>Since the AssertFailures normally will be wrapped in SQLExceptions before they are presented
to >the users, the thread dump won't be printed to the console. However, when the exception
is >written to derby.log, it is unwrapped, so the thread dump will be picked up by calling
>printStackTrace() on the unwrapped AssertFailure object. Is this about correct?

I verified that this is the case.  When I run a test with an assertion failure I see only
the stack trace printed in the test failures and see the thread dump in the derby.log.


>but what makes an AssertFailure special compared to, say, a NullPointerException? Instead
of >limiting this functionality to AssertFailures, should we have a property >(derby.stream.error.dumpStackTrace
or something) that we could use to turn on thread dumps for >all exceptions in derby.log,
also in production code?

That sounds like a great improvement.  This issue was just focussed on assertions. That idea
would cover DERBY-666 as well.   One thing to consider is that if it goes into production
code, the ThreadDump class should no longer be shared.




> Perform thread dump with ASSERTS with jdk 1.5 or higher
> -------------------------------------------------------
>
>                 Key: DERBY-3618
>                 URL: https://issues.apache.org/jira/browse/DERBY-3618
>             Project: Derby
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 10.5.0.0
>            Reporter: Kathey Marsden
>            Assignee: Erlend Birkenes
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: DERBY-3618_1.diff, DERBY-3618_2.diff, DERBY-3618_3.diff, DERBY-3618_4.diff,
DERBY-3618_5.diff, DERBY-3618_6.diff, DERBY-3618_7.diff
>
>
> It would be good to have a stack traces for all threads dump to the derby.log when an
assertion occurs with JVM's that support it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message