Jeff Dike wrote:
> On Thu, Apr 06, 2006 at 05:14:42PM +0200, Markus Schönhaber wrote:
> > How do I get a stack trace?
>
> Attach gdb to the first UML pid, put a breakpoint on panic, continue it,
> and when it hits the breakpoint, do 'bt' at gdb.
>
> If the breakpoint somehow doesn't get hit, then stick a while(1) ; in
> panic (kernel/panic.c, after the bust_spinlocks() call, rebuild it,
> and attach gdb to it as described above when it hangs after the panic
> message.

Thanks for guiding me, Jeff!

I followed your advice and here is the stack trace I came up with (patching 
panic.c was not neccessary):

---------- snip ----------

Program received signal SIGUSR1, User defined signal 1.
0xffffe410 in ?? ()
(gdb) c
Continuing.

Breakpoint 1, panic (fmt=0x21 <Address 0x21 out of bounds>) at panic.c:97
97              notifier_call_chain(&panic_notifier_list, 0, buf);
(gdb) bt
#0  panic (fmt=0x21 <Address 0x21 out of bounds>) at panic.c:97
#1  0x080b6af6 in check_slabp (cachep=0x82df660, slabp=0x13cfd000) at 
slab.c:2627
#2  0x080b6f74 in free_block (cachep=0x82df660, objpp=0x8c7ad5c, 
nr_objects=16, node=0) at slab.c:2910
#3  0x080b7078 in cache_flusharray (cachep=0x82df660, ac=0x8c7ad4c) at 
slab.c:2960
#4  0x080b739b in kmem_cache_free (cachep=0x82df660, objp=0x13cfde44) at 
slab.c:3039
#5  0x0809d968 in mempool_free_slab (element=0x21, pool_data=0x21) at 
mempool.c:289
#6  0x0809d915 in mempool_free (element=0x13cfde44, pool=0x82e71f4) at 
mempool.c:272
#7  0x080bf78e in bio_free (bio=0x13cfde44, bio_set=0x82e7220) at bio.c:115
#8  0x080bf7ea in bio_fs_destructor (bio=0x21) at bio.c:123
#9  0x080bfa9d in bio_put (bio=0x826cfcc) at bio.c:227
#10 0x080bf097 in end_bio_bh_io_sync (bio=0x13cfde44, bytes_done=4096, err=0) 
at buffer.c:2780
#11 0x080c0a7f in bio_endio (bio=0x13cfde44, bytes_done=136761292, error=0) at 
bio.c:1046
#12 0x08158832 in __end_that_request_first (req=0x13b371e0, uptodate=1, 
nr_bytes=4096) at ll_rw_blk.c:3171
#13 0x08158b02 in end_that_request_first (req=0x21, uptodate=33, 
nr_sectors=33) at ll_rw_blk.c:3254
#14 0x08158d45 in end_request (req=0x13b371e0, uptodate=1) at ll_rw_blk.c:3399
#15 0x08065bd0 in __ubd_finish (req=0x1, error=0) at ubd_kern.c:490
#16 0x08065c6f in ubd_handler () at ubd_kern.c:496
#17 0x08065ca8 in ubd_intr (irq=4, dev=0x826bde0, unused=0x83a294c) at 
ubd_kern.c:526
#18 0x08098bed in handle_IRQ_event (irq=4, regs=0x83a294c, action=0x82e7cc8) 
at handle.c:88
#19 0x08098cac in __do_IRQ (irq=4, regs=0x83a294c) at handle.c:173
#20 0x08055eb0 in do_IRQ (irq=33, regs=0x826cfcc) at irq.c:88
#21 0x08056117 in sigio_handler (sig=29, regs=0x83a294c) at irq_user.c:72
#22 0x08071fc9 in sig_handler_common_skas (sig=29, sc_ptr=0x8056040) at 
trap.c:52
#23 0x0806d113 in sig_handler (sig=29) at signal.c:61
#24 <signal handler called>
#25 0xffffe410 in ?? ()
#26 0x175ffce8 in ?? ()
#27 0x00000002 in ?? ()
#28 0x175ffca8 in ?? ()
#29 0x081e0912 in __waitpid_nocancel () at swab.h:134
#30 0x0807136e in userspace (regs=0x83a294c) at process.c:270
#31 0x0805c65c in fork_handler (sig=10) at thread_info.h:47
#32 <signal handler called>
#33 0xffffe410 in ?? ()
#34 0x0806cdd1 in remove_sigstack () at signal.c:148
#35 0x1741b570 in ?? ()
(gdb) c
Continuing.

Program exited with code 01.
(gdb) 

---------- snap ----------

The message
Kernel panic - not syncing: BUG!
showed up on the console after the final continue.

BTW: I had to continue uml a few times because it stopped having recieved 
SIGUSR1 as shown at the beginning of the stack trace. Don't know whether this 
is normal or of any relevance.

Anything else I can do or info I can provide?

Regards
  mks


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to