1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Debugging ISR (FreeBSD 5.3)

Discussion in 'FreeBSD Development' started by coleb, Apr 5, 2010.

  1. coleb

    coleb New Member

    Messages:
    10
    Thanks Received:
    0
    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?)