All of lore.kernel.org
 help / color / mirror / Atom feed
* double fault ...
@ 2005-05-02 14:51 Gerd Knorr
  2005-05-02 15:23 ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Knorr @ 2005-05-02 14:51 UTC (permalink / raw)
  To: xen-devel

... happens with panics when compiled with debugging.
panic() calls debugger_trap_immediate(), which triggers
do_int3, which calls panic(), which recurses until the
stack is full => bang!

cheers,

  Gerd

-- 
#define printk(args...) fprintf(stderr, ## args)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: double fault ...
  2005-05-02 14:51 double fault Gerd Knorr
@ 2005-05-02 15:23 ` Keir Fraser
  2005-05-02 15:53   ` Gerd Knorr
  0 siblings, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2005-05-02 15:23 UTC (permalink / raw)
  To: Gerd Knorr; +Cc: xen-devel


On 2 May 2005, at 15:51, Gerd Knorr wrote:

> ... happens with panics when compiled with debugging.
> panic() calls debugger_trap_immediate(), which triggers
> do_int3, which calls panic(), which recurses until the
> stack is full => bang!

You compile with crash_debug=y? The intention is that do_int3() will 
execute DEBUGGER_trap_fatal() before panic(), so you should enter the 
gdb stub rather than infinitely loop. How is that not occurring?

  -- Keir

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: double fault ...
  2005-05-02 15:23 ` Keir Fraser
@ 2005-05-02 15:53   ` Gerd Knorr
  2005-05-02 16:02     ` Kip Macy
  2005-05-02 16:07     ` Keir Fraser
  0 siblings, 2 replies; 6+ messages in thread
From: Gerd Knorr @ 2005-05-02 15:53 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

On Mon, May 02, 2005 at 04:23:42PM +0100, Keir Fraser wrote:
> 
> On 2 May 2005, at 15:51, Gerd Knorr wrote:
> 
> >... happens with panics when compiled with debugging.
> >panic() calls debugger_trap_immediate(), which triggers
> >do_int3, which calls panic(), which recurses until the
> >stack is full => bang!
> 
> You compile with crash_debug=y?

Yes.  Mostly to get a xen binary without optimization and with full
debug info, so I can easily lookup stuff using
	"objdump -dS xen-syms | less +/<addr>".

> The intention is that do_int3() will execute DEBUGGER_trap_fatal()
> before panic(), so you should enter the gdb stub rather than
> infinitely loop. How is that not occurring?

I don't actually have a debugger attached, so DEBUGGER_trap_fatal
aka __trap_to_cdb() instantly returns.

  Gerd

-- 
#define printk(args...) fprintf(stderr, ## args)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: double fault ...
  2005-05-02 15:53   ` Gerd Knorr
@ 2005-05-02 16:02     ` Kip Macy
  2005-05-02 16:07     ` Keir Fraser
  1 sibling, 0 replies; 6+ messages in thread
From: Kip Macy @ 2005-05-02 16:02 UTC (permalink / raw)
  To: Gerd Knorr; +Cc: xen-devel

It shouldn't matter - you can attach the debugger after crash.


			-Kip 

On Mon, 2 May 2005, Gerd Knorr wrote:

> On Mon, May 02, 2005 at 04:23:42PM +0100, Keir Fraser wrote:
> > 
> > On 2 May 2005, at 15:51, Gerd Knorr wrote:
> > 
> > >... happens with panics when compiled with debugging.
> > >panic() calls debugger_trap_immediate(), which triggers
> > >do_int3, which calls panic(), which recurses until the
> > >stack is full => bang!
> > 
> > You compile with crash_debug=y?
> 
> Yes.  Mostly to get a xen binary without optimization and with full
> debug info, so I can easily lookup stuff using
> 	"objdump -dS xen-syms | less +/<addr>".
> 
> > The intention is that do_int3() will execute DEBUGGER_trap_fatal()
> > before panic(), so you should enter the gdb stub rather than
> > infinitely loop. How is that not occurring?
> 
> I don't actually have a debugger attached, so DEBUGGER_trap_fatal
> aka __trap_to_cdb() instantly returns.
> 
>   Gerd
> 
> 

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: double fault ...
  2005-05-02 15:53   ` Gerd Knorr
  2005-05-02 16:02     ` Kip Macy
@ 2005-05-02 16:07     ` Keir Fraser
  2005-05-02 16:18       ` Gerd Knorr
  1 sibling, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2005-05-02 16:07 UTC (permalink / raw)
  To: Gerd Knorr; +Cc: xen-devel


>> You compile with crash_debug=y?
>
> Yes.  Mostly to get a xen binary without optimization and with full
> debug info, so I can easily lookup stuff using
> 	"objdump -dS xen-syms | less +/<addr>".

Probably 'debug=y' should also cause -g compilation. I'll add that in.

I presume you do 'optimize=n' to turn off things like -O3?

>> The intention is that do_int3() will execute DEBUGGER_trap_fatal()
>> before panic(), so you should enter the gdb stub rather than
>> infinitely loop. How is that not occurring?
>
> I don't actually have a debugger attached, so DEBUGGER_trap_fatal
> aka __trap_to_cdb() instantly returns.

I see. I'll check in a fix.

Thanks!

  -- Keir

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: double fault ...
  2005-05-02 16:07     ` Keir Fraser
@ 2005-05-02 16:18       ` Gerd Knorr
  0 siblings, 0 replies; 6+ messages in thread
From: Gerd Knorr @ 2005-05-02 16:18 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

On Mon, May 02, 2005 at 05:07:28PM +0100, Keir Fraser wrote:
> 
> >>You compile with crash_debug=y?
> >
> >Yes.  Mostly to get a xen binary without optimization and with full
> >debug info, so I can easily lookup stuff using
> >	"objdump -dS xen-syms | less +/<addr>".
> 
> Probably 'debug=y' should also cause -g compilation. I'll add that in.

Thanks.

> I presume you do 'optimize=n' to turn off things like -O3?

Yes, "make debug=y crash_debug=y optimize=n" is the command line.

  Gerd

-- 
#define printk(args...) fprintf(stderr, ## args)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-05-02 16:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-02 14:51 double fault Gerd Knorr
2005-05-02 15:23 ` Keir Fraser
2005-05-02 15:53   ` Gerd Knorr
2005-05-02 16:02     ` Kip Macy
2005-05-02 16:07     ` Keir Fraser
2005-05-02 16:18       ` Gerd Knorr

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.