From: Phil Muldoon <pmuldoon@redhat.com>
To: Kris Van Hees <kris.van.hees@oracle.com>
Cc: Mark Wielaard <mark@klomp.org>, frysk@sourceware.org
Subject: Re: fhpd vs RuntimeExceptions
Date: Thu, 15 Nov 2007 22:11:00 -0000 [thread overview]
Message-ID: <473CC40A.6010104@redhat.com> (raw)
In-Reply-To: <20071115204038.GC17388@oracle.com>
Kris Van Hees wrote:
> On Thu, Nov 15, 2007 at 06:41:56PM +0100, Mark Wielaard wrote:
>
>> Hi Phil,
>>
>>> << Example exception output deleted - see original message for details. >>
>>> If this is the way forward, I'll have to gobble exceptions locally in
>>> CoreCommand, and just deal with them locally.
>>>
>> Yes, I think that is the way forward. Something terribly failed. And
>> just passing the "address 6992f8 cannot be found in metadata table."
>> message to the user is clearly not very helpful if the user just wanted
>> to run a specific command. Only the command knows if this is something
>> fatal or not and should catch it at the appropriate level and report
>> what the exact action was that was attempted and which structure
>> couldn't be created because of the error.
>>
>
> I do not think that an exception like this should ever get handled at the
> level of the command module. In fact, in a case like this it should never
> have floated up that high without getting handled. Clearly, being unable to
> peek at the given address was the result of trying to do some action. The
> failure to peek at the address either causes that action to fail, or it can be
> ignored (or otherwise recovered from). Either way, the command module should
> not be exposed to this level of detail (though the information may need to be
> retained as a nested exception for more verbose output, etc...).
>
Well yes and no. Perhaps I agree with the overall assertions but the
corefile user should always recognizes that a corefile is created from a
dead or dying process (or just a snapshot in some cases). Let's assume
the former for now. The big use-case around core-files is that
programmers use them to debug a process that died some time ago. That
process might have been in any kind of corrupted state. Therefore a read
at an address that is expected to be sane, but is not, should absolutely
be reported. But is it an error in the core file code itself? No. It
duly tried to do as asked, but failed. It cannot diagnose why that
failure occurred, just that it did. It can mean corrupt segments,
missing linkmaps table, screwed up dynamic segment and a whole host of
other issues the user (the programmer) should know about via this feedback.
I keep bringing this example up as this is my pain now; and perhaps it
is a special case - but normally they are what define the boundaries of
the rules. As it is right now, this is an exception as in "Cannot read
where you want me to read", but it is not an error condition simply as
it is just honestly reporting that it cannot do what one asked. Because
a data read at 0x12345 address is invalid, it should not print a
stacktrace to that effect. This is not an error in the corefile code,
but the corefile itself. That's pretty much the crux of the argument,
and separating out messaging from true errors.
Anyway, just wanted to give some background to that exception. I realize
now I should have gone into more detail here earlier.
Regards
Phil
next prev parent reply other threads:[~2007-11-15 22:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 14:27 Mark Wielaard
2007-11-14 14:45 ` Andrew Cagney
2007-11-14 15:27 ` Kris Van Hees
2007-11-14 15:36 ` Mark Wielaard
2007-11-14 17:33 ` Andrew Cagney
2007-11-14 19:11 ` Mark Wielaard
2007-11-15 17:01 ` Phil Muldoon
2007-11-15 17:42 ` Mark Wielaard
2007-11-15 18:19 ` Phil Muldoon
2007-11-15 18:25 ` Sami Wagiaalla
2007-11-16 11:21 ` Mark Wielaard
2007-11-15 18:21 ` Sami Wagiaalla
2007-11-15 20:33 ` Kris Van Hees
2007-11-16 10:12 ` Mark Wielaard
2007-11-15 18:46 ` Andrew Cagney
2007-11-16 10:15 ` Mark Wielaard
2007-11-15 20:41 ` Kris Van Hees
2007-11-15 22:11 ` Phil Muldoon [this message]
2007-11-15 23:09 ` Kris Van Hees
2007-11-16 10:42 ` Mark Wielaard
2007-11-15 18:04 ` Mark Wielaard
2007-11-15 18:22 ` Phil Muldoon
2007-11-15 19:06 ` Andrew Cagney
2007-11-16 10:28 ` Mark Wielaard
2007-11-16 14:32 ` Andrew Cagney
2007-11-26 10:18 ` Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=473CC40A.6010104@redhat.com \
--to=pmuldoon@redhat.com \
--cc=frysk@sourceware.org \
--cc=kris.van.hees@oracle.com \
--cc=mark@klomp.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).