All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [PATCH 2/6] Improve fault report
Date: Wed, 28 Jun 2006 18:36:38 +0200	[thread overview]
Message-ID: <1151512598.4992.24.camel@domain.hid> (raw)
In-Reply-To: <44A2491D.5040102@domain.hid>

On Wed, 2006-06-28 at 11:17 +0200, Jan Kiszka wrote:
> Philippe Gerum wrote:
> > On Wed, 2006-06-28 at 10:51 +0200, Jan Kiszka wrote:
> >> Philippe Gerum wrote:
> >>> On Wed, 2006-06-28 at 10:18 +0200, Jan Kiszka wrote:
> >>>> Philippe Gerum wrote:
> >>>>> On Wed, 2006-06-28 at 09:51 +0200, Jan Kiszka wrote:
> >>>>>> Philippe Gerum wrote:
> >>>>>>> On Mon, 2006-06-26 at 19:21 +0200, jan.kiszka@domain.hid wrote:
> >>>>>>>> plain text document attachment (enhance-kernel-fault-report.patch)
> >>>>>>>> Introduce xnarch_fault_um() to test if a fault happened in user-mode and applies the new feature to report core and driver crashes more verbosely. 
> >>>>>>>> 	if (xnpod_shadow_p()) {
> >>>>>>>>  #ifdef CONFIG_XENO_OPT_DEBUG
> >>>>>>>> -		if (xnarch_fault_notify(fltinfo))	/* Don't report debug traps */
> >>>>>>>> +		if (!xnarch_fault_um(fltinfo)) {
> >>>>>>>> +			xnarch_trace_panic_freeze();
> >>>>>>> KGDB breakpoint issue?
> >>>>>> Sorry, please switch on verbose mode, didn't get yet what you mean.
> >>>>> Oops, sorry. I meant: what if a KGDB breakpoint is hit from kernel space
> >>>>> while running a shadow thread? The way I read the modified test sequence
> >>>>> above, such bp trap is going to trigger a panic, instead of being
> >>>>> silently passed to Linux.
> >>>> I would say: KGDB will not come along here with a breakpoint. It should
> >>>> already got involved in __ipipe_divert_exception().
> >>> Ok, so the only problem that remains would be inlined asm("int 1/3") in
> >>> kernel space not handled by KGDB (whether the KGDB patch is in or not).
> >>> I'm still scratching my head pondering if we can live with this or not.
> >> But this is perfectly one of the situations my patch tries to catch: a
> >> fatal bug in the kernel! Such a hand-coded kernel breakpoint without a
> >> debugger caring is a bug to me.
> > 
> > Not that sure: passive debug code may exist. Only the presence of the
> > debugger should activate it.
> > 
> 
> ...but remains a bug for me /w RT code.

Someone inserting such passive breakpoints would have to know what she's
doing, in any case. Looking the relax counter in /proc/xenomai/stats
(which is among the first things to do when chasing unexpected
latencies) would also give a serious hint to the inattentive folks. What
bothers me is to restrict the usage one can do of debug vectors on
certain archs, just for the purpose of saving one's from careless
coding.

>  We now complain about this
> exception happened. And there is no crash/BUG in this case, just a
> desirable warning with back-trace in the log.
> 

Ok, If *_panic() routines do not actually panic at all, it's acceptable.

> 
> 
> PS: Other OSes show you a nice blue-screen when they ran on such
> orphaned breakpoints.

What other O/S do in this respect is not relevant; it's not an
inter-operability or compatibility issue between Xenomai and others,
it's a decision to make about which behaviour is the least intrusive wrt
debug strategies.

> 
-- 
Philippe.




  reply	other threads:[~2006-06-28 16:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-26 17:21 [Xenomai-core] [PATCH 0/6] Various refactoring and new IRQ test jan.kiszka
2006-06-26 17:21 ` [Xenomai-core] [PATCH 1/6] Refactor tracer API jan.kiszka
2006-06-26 17:21 ` [Xenomai-core] [PATCH 2/6] Improve fault report jan.kiszka
2006-06-28  7:42   ` Philippe Gerum
2006-06-28  7:51     ` Jan Kiszka
2006-06-28  8:04       ` Philippe Gerum
2006-06-28  8:18         ` Jan Kiszka
2006-06-28  8:36           ` Philippe Gerum
2006-06-28  8:51             ` Jan Kiszka
2006-06-28  9:00               ` Philippe Gerum
2006-06-28  9:17                 ` Jan Kiszka
2006-06-28 16:36                   ` Philippe Gerum [this message]
2006-06-26 17:21 ` [Xenomai-core] [PATCH 3/6] Refactor rttesting device interface jan.kiszka
2006-06-26 17:21 ` [Xenomai-core] [PATCH 4/6] Add prio switch to latency test jan.kiszka
2006-06-28 19:38   ` Jan Kiszka
2006-06-26 17:21 ` [Xenomai-core] [PATCH 5/6] Overread dev-prefix on posix open jan.kiszka
2006-06-28 19:38   ` Jan Kiszka
2006-06-26 17:21 ` [Xenomai-core] [PATCH 6/6] Introduce IRQ latency benchmark jan.kiszka
2006-06-27 16:45   ` Jan Kiszka
2006-06-28 12:11   ` Gilles Chanteperdrix
2006-06-28 12:28     ` Jan Kiszka
2006-06-28 12:35       ` Gilles Chanteperdrix
2006-06-28 13:42       ` Gilles Chanteperdrix
2006-06-28 14:14         ` Dmitry Adamushko
2006-06-28 14:37           ` Jan Kiszka
2006-06-28 15:18             ` Dmitry Adamushko
2006-06-28 14:44         ` Jan Kiszka
2006-06-28 19:39   ` Jan Kiszka
2006-06-29 11:20     ` Jan Kiszka
2006-07-01 15:38       ` Philippe Gerum
2006-07-01 18:17         ` Jan Kiszka

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=1151512598.4992.24.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=jan.kiszka@domain.hid \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.