From: Markus <mai...@sc...> - 2006-04-10 19:00:32
|
Jeff Dike wrote: > On Thu, Apr 06, 2006 at 05:14:42PM +0200, Markus Sch=F6nhaber 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= =20 panic.c was not neccessary): =2D--------- snip ---------- Program received signal SIGUSR1, User defined signal 1. 0xffffe410 in ?? () (gdb) c Continuing. Breakpoint 1, panic (fmt=3D0x21 <Address 0x21 out of bounds>) at panic.c:97 97 notifier_call_chain(&panic_notifier_list, 0, buf); (gdb) bt #0 panic (fmt=3D0x21 <Address 0x21 out of bounds>) at panic.c:97 #1 0x080b6af6 in check_slabp (cachep=3D0x82df660, slabp=3D0x13cfd000) at=20 slab.c:2627 #2 0x080b6f74 in free_block (cachep=3D0x82df660, objpp=3D0x8c7ad5c,=20 nr_objects=3D16, node=3D0) at slab.c:2910 #3 0x080b7078 in cache_flusharray (cachep=3D0x82df660, ac=3D0x8c7ad4c) at= =20 slab.c:2960 #4 0x080b739b in kmem_cache_free (cachep=3D0x82df660, objp=3D0x13cfde44) a= t=20 slab.c:3039 #5 0x0809d968 in mempool_free_slab (element=3D0x21, pool_data=3D0x21) at=20 mempool.c:289 #6 0x0809d915 in mempool_free (element=3D0x13cfde44, pool=3D0x82e71f4) at= =20 mempool.c:272 #7 0x080bf78e in bio_free (bio=3D0x13cfde44, bio_set=3D0x82e7220) at bio.c= :115 #8 0x080bf7ea in bio_fs_destructor (bio=3D0x21) at bio.c:123 #9 0x080bfa9d in bio_put (bio=3D0x826cfcc) at bio.c:227 #10 0x080bf097 in end_bio_bh_io_sync (bio=3D0x13cfde44, bytes_done=3D4096, = err=3D0)=20 at buffer.c:2780 #11 0x080c0a7f in bio_endio (bio=3D0x13cfde44, bytes_done=3D136761292, erro= r=3D0) at=20 bio.c:1046 #12 0x08158832 in __end_that_request_first (req=3D0x13b371e0, uptodate=3D1,= =20 nr_bytes=3D4096) at ll_rw_blk.c:3171 #13 0x08158b02 in end_that_request_first (req=3D0x21, uptodate=3D33,=20 nr_sectors=3D33) at ll_rw_blk.c:3254 #14 0x08158d45 in end_request (req=3D0x13b371e0, uptodate=3D1) at ll_rw_blk= =2Ec:3399 #15 0x08065bd0 in __ubd_finish (req=3D0x1, error=3D0) at ubd_kern.c:490 #16 0x08065c6f in ubd_handler () at ubd_kern.c:496 #17 0x08065ca8 in ubd_intr (irq=3D4, dev=3D0x826bde0, unused=3D0x83a294c) a= t=20 ubd_kern.c:526 #18 0x08098bed in handle_IRQ_event (irq=3D4, regs=3D0x83a294c, action=3D0x8= 2e7cc8)=20 at handle.c:88 #19 0x08098cac in __do_IRQ (irq=3D4, regs=3D0x83a294c) at handle.c:173 #20 0x08055eb0 in do_IRQ (irq=3D33, regs=3D0x826cfcc) at irq.c:88 #21 0x08056117 in sigio_handler (sig=3D29, regs=3D0x83a294c) at irq_user.c:= 72 #22 0x08071fc9 in sig_handler_common_skas (sig=3D29, sc_ptr=3D0x8056040) at= =20 trap.c:52 #23 0x0806d113 in sig_handler (sig=3D29) 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=3D0x83a294c) at process.c:270 #31 0x0805c65c in fork_handler (sig=3D10) 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)=20 =2D--------- 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=20 SIGUSR1 as shown at the beginning of the stack trace. Don't know whether th= is=20 is normal or of any relevance. Anything else I can do or info I can provide? Regards mks |