Date: Mon, 7 Feb 2005 22:53:26 +1030 From: "Wilkinson, Alex" <alex.wilkinson@dsto.defence.gov.au> To: hackers@freebsd.org Subject: kgdb(1) - dealing with a corrupt stack [?] Message-ID: <20050207122325.GB53000@squash.dsto.defence.gov.au>
next in thread | raw e-mail | index | archive | help
Hi all, I am trying to debug why my kernel is panicing whilst playing audio via xmms. I am manually calling 'doadump' via ddb(4) - this seems ok. However, when I do a backtrace via kgdb(1) I seem to get a corrupt stack. Can anyone suggest why this would be happening and solutions to get a 'healthy' backtrace. NOTE: I have tryed a backtrace on a kernel with staticly compiled drivers and with klds'. Same outcome. (kgdb) where #0 doadump () at pcpu.h:159 #1 0xc044e7b3 in db_fncall (dummy1=-1068282275, dummy2=0, dummy3=-1, dummy4=0xe52b68e8 "") at /usr/src/sys/ddb/db_command.c:531 #2 0xc044ec55 in db_command_loop () at /usr/src/sys/ddb/db_command.c:349 #3 0xc0450910 in db_trap (type=12, code=0) at /usr/src/sys/ddb/db_main.c:221 #4 0xc052c112 in kdb_trap (type=0, code=0, tf=0xe52b6a58) at /usr/src/sys/kern/subr_kdb.c:418 #5 0xc06827d6 in trap_fatal (frame=0xe52b6a58, eva=36) at /usr/src/sys/i386/i386/trap.c:804 #6 0xc0682d65 in trap (frame= {tf_fs = -1030160360, tf_es = -1033502704, tf_ds = 2147418128, tf_edi = -1066324840, tf_esi = -1023201776, tf_ebp = -450139444, tf_isp = -450139516, tf_ebx = -1030158384, tf_edx = -1028611392, tf_ecx = 160, tf_eax = 0, tf_trapno = 12, tf_err = 0, tf_eip = -1068282275, tf_cs = 8, tf_eflags = 77971, tf_esp = 0, tf_ss = -1068294051}) at /usr/src/sys/i386/i386/trap.c:247 #7 0xc06712da in calltrap () at /usr/src/sys/i386/i386/exception.s:140 #8 0xc2990018 in ?? () #9 0xc2660010 in ?? () #10 0x7fff0010 in ?? () #11 0xc0712c98 in turnstile_chains () #12 0xc3032e10 in ?? () #13 0xe52b6acc in ?? () #14 0xe52b6a84 in ?? () #15 0xc29907d0 in ?? () #16 0xc2b0a2c0 in ?? () #17 0x000000a0 in ?? () #18 0x00000000 in ?? () #19 0x0000000c in ?? () #20 0x00000000 in ?? () #21 0xc0534e5d in turnstile_wait (ts=0xc2b35d80, lock=0xc070efe0, owner=0xc3032e10) at /usr/src/sys/kern/subr_turnstile.c:243 #22 0xc05055ef in _mtx_lock_sleep (m=0xc070efe0, td=0xc29907d0, opts=0, file=0x0, line=0) at /usr/src/sys/kern/kern_mutex.c:560 #23 0xc04e3509 in cv_timedwait_sig (cvp=0xc0714064, mp=0xc0714040, timo=0) at /usr/src/sys/kern/kern_condvar.c:334 #24 0xc0536cca in kern_select (td=0xc29907d0, nd=64, fd_in=0x81c63c0, fd_ou=0x0, fd_ex=0x0, tvp=0xe52b6ccc) at /usr/src/sys/kern/sys_generic.c:753 #25 0xc053731c in select (td=0x0, uap=0xe52b6d14) at /usr/src/sys/kern/sys_generic.c:625 #26 0xc0683334 in syscall (frame= {tf_fs = 47, tf_es = 47, tf_ds = -1078001617, tf_edi = -1, tf_esi = -1, tf_ebp = -1077941784, tf_isp = -450138764, tf_ebx = 119451, tf_edx = 16, tf_ecx = 139525536, tf_eax = 93, tf_trapno = 0, tf_err = 2, tf_eip = 673567859, tf_cs = 31, tf_eflags = 12870, tf_esp = -1077942388, tf_ss = 47}) at /usr/src/sys/i386/i386/trap.c:1001 #27 0xc067132f in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:201 #28 0x0000002f in ?? () #29 0x0000002f in ?? () #30 0xbfbf002f in ?? () #31 0xffffffff in ?? () #32 0xffffffff in ?? () #33 0xbfbfe9e8 in ?? () #34 0xe52b6d74 in ?? () #35 0x0001d29b in ?? () #36 0x00000010 in ?? () #37 0x0850fda0 in ?? () #38 0x0000005d in ?? () #39 0x00000000 in ?? () #40 0x00000002 in ?? () #41 0x2825d473 in ?? () #42 0x0000001f in ?? () #43 0x00003246 in ?? () #44 0xbfbfe78c in ?? () #45 0x0000002f in ?? () #46 0xffffffff in ?? () #47 0xffffffff in ?? () #48 0xffffffff in ?? () #49 0xffffefff in ?? () #50 0x3e9d7000 in ?? () #51 0xc2b78388 in ?? () #52 0xc29907d0 in ?? () #53 0xe52b6a6c in ?? () #54 0xe52b6a54 in ?? () #55 0xc26644b0 in ?? () #56 0xc0523eda in sched_switch (td=0xffffffff, newtd=0x1d29b, flags=Cannot access memory at address 0xbfbfe9f8 ) at /usr/src/sys/kern/sched_4bsd.c:865 Previous frame inner to this frame (corrupt stack?) (kgdb) Thanks - aW
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050207122325.GB53000>