7de0 Debugging ISR (FreeBSD 5.3) - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Development > FreeBSD Development

FreeBSD Development Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

Reply
 
Thread Tools Display Modes
  #1  
Old April 5th, 2010, 20:30
coleb coleb is offline
Junior Member
 
Join Date: Apr 2010
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default Debugging ISR (FreeBSD 5.3)

We've got a machine in the field dumping core in the NIC's ISR. I've got 2 core files and notice that, in both cases, thread ID 25 is the offending thread, and thread ID 24 shows some processing in the same ISR, but with some sort of stack corruption ("Previous frame inner to this frame" message). Is this consistency across both vmcores expected given the way FreeBSD may schedule interrupts, or is this a not-so-coincidence that I should be looking in to? I'm not sure if FreeBSD pushes ISRs off to specific PIDs or TIDs. I'll post an example below - thanks much for any info on this. Note that the last place things appear sound is in silbpi_get_buf(), the stack is corrupted after that point. Thanks.

Code:
(kgdb) bt

#0  doadump () at pcpu.h:159
#1  0xc04de9fd in boot (howto=260) at ../../../kern/kern_shutdown.c:397
#2  0xc04ded51 in panic (fmt=0xc061ba16 "%s")
    at ../../../kern/kern_shutdown.c:553
#3  0xc05fbfd8 in trap_fatal (frame=0xe44e1ba0, eva=3217391628)
    at ../../../i386/i386/trap.c:809
#4  0xc05fbd0b in trap_pfault (frame=0xe44e1ba0, usermode=0, eva=3217391628)
    at ../../../i386/i386/trap.c:727
#5  0xc05fb901 in trap (frame=
      {tf_fs = 24, tf_es = -464650224, tf_ds = -1068236784, tf_edi = -1069107524, tf_esi = -829809664, tf_ebp = -464643036, tf_isp = 
-464643124, tf_ebx = -464642936, tf_edx = 369111040, tf_ecx = 369111040, tf_eax = 90115, tf_trapno = 12, tf_err = 0, tf_eip = -1067554502, 
tf_cs = 8, tf_eflags = 66054, tf_esp = -1005869504, tf_ss = -1066946080}) at ../../../i386/i386/trap.c:417
#6  0xc05e96ca in calltrap () at ../../../i386/i386/exception.s:140
#7  0x00000018 in ?? ()
#8  0xe44e0010 in ?? ()
#9  0xc0540010 in strncmp (s1=0x0, s2=0xe44e1c88 "3ðNÀ\002", n=0)    at ../../../libkern/strncmp.c:47
#10 0xc05e6d65 in bus_dmamap_load (dmat=0xce8a1c00, map=0x0, buf=0x16003802, buflen=2046, callback=0xc046b6bc <silbpi_dmamap_cb>,  
callback_arg=0xc046b6bc, flags=0) at ../../../i386/i386/busdma_machdep.c:662
#11 0xc046bfe2 in silbpi_get_buf (i=191, adapter=0xc4123800, nmp=0x0)
    at ../../../dev/silbpi/if_silbpi.c:3316
#12 0xc046c7af in silbpi_process_receive_interrupts (adapter=0xc4123800, count=-2) at ../../../dev/silbpi/if_silbpi.c:3671
#13 0xc0469bae in silbpi_intr (arg=0xc4123800) at ../../../dev/silbpi/if_silbpi.c:1535
#14 0xc04ca305 in ithread_loop (arg=0xc4073080) at ../../../kern/kern_intr.c:547
#15 0xc04c93b5 in fork_exit (callout=0xc04ca1ac <ithread_loop>, arg=0xc4073080, frame=0xe44e1d48) at ../../../kern/kern_fork.c:811
#16 0xc05e972c in fork_trampoline () at ../../../i386/i386/exception.s:209

(kgdb) thread 24

[Switching to thread 24 (TID 100027)]#0  0xc04ef033 in sched_switch (
    td=0xc4069af0, newtd=0xc4060960, flags=-813792768)
    at ../../../kern/sched_4bsd.c:865
865			cpu_switch(td, newtd);
#0  0xc04ef033 in sched_switch (td=0xc4069af0, newtd=0xc4060960, 
    flags=-813792768) at ../../../kern/sched_4bsd.c:865
#1  0xe44decd4 in ?? ()
#2  0xc046c935 in silbpi_process_receive_interrupts (adapter=0x2, 
    count=1651272051) at ../../../dev/silbpi/if_silbpi.c:3732
Previous frame inner to this frame (corrupt stack?)

Last edited by DutchDaemon; April 6th, 2010 at 01:28. Reason: added [code] tags
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
on-line kernel debugging using USB to DB9 vikasmn FreeBSD Development 2 April 12th, 2010 05:56
How to compile a portion of FreeBSD code with debugging (Sysinstall for example) rhyous Howtos & FAQs 5 January 4th, 2010 12:51
Good disassemble/debugging program? netrom Userland Programming & Scripting 20 October 26th, 2009 21:52


All times are GMT +1. The time now is 00:14.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0