Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Mar 2012 03:52:16 GMT
From:      Zhouyi Zhou <zhouzhouyi@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/166193: FB 8.0 freeze during the kernel dump
Message-ID:  <201203170352.q2H3qGNA007389@red.freebsd.org>
Resent-Message-ID: <201203170400.q2H40OeD058869@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         166193
>Category:       kern
>Synopsis:       FB 8.0 freeze during the kernel dump
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 17 04:00:23 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Zhouyi Zhou
>Release:        FB 8.0
>Organization:
www.ict.ac.cn
>Environment:
FreeBSD 8.0-RELEASE FreeBSD 8.0-RELEASE 
>Description:
FreeBSD 8.0 will freeze during the kernel panic memory dump. 
>How-To-Repeat:
Allocate a large memory, trigger a kernel panic, and let it dump
>Fix:
I use self developed  instrument code to prevent dead lock and find the cpu which is used for dumping is seized by ehci_interrupt which is locked up.

The fix is to add a critical_enter() in function doadump.


btw: following is my dirty and quick instrument code:
#define TRACELEVEL 5
void
lapic_handle_intr(int vector, struct trapframe *frame)
{
        struct intsrc *isrc;
#ifdef TRACELEVEL
        char tfip[20];
        if (1/*vector == 0x30*/){
          int i = 0;
          int j = 0;
          int cpuid = PCPU_GET(cpuid);
          struct amd64_frame * frame1;
          if (!INKERNEL(frame->tf_rip))
            goto out;
          frame1 = (struct amd64_frame *) (frame->tf_rbp);
          sprintf(tfip, "%x\n", frame->tf_rip);
          for (i = 0; i < 8; i++){
                  *(((unsigned char *)0xffffffff800b8000) + cpuid*300  + j*9*2 + i*2) = tfip[i];
                  if (*((unsigned char *)0xffffffff800b8001 + cpuid*300 + j*9*2 + i*2) != 121)
                          *((unsigned char *)0xffffffff800b8001 + cpuid*300 + j*9*2 + i*2) = 121;
                  else
                          *((unsigned char *)0xffffffff800b8001 + cpuid*300 + j*9*2 + i*2) = 120;
          }
          *(((unsigned char *)0xffffffff800b8000) + cpuid*300 + j*9*2 + 8*2) = ' ';
          *((unsigned char *)0xffffffff800b8001 + cpuid*300 + j*9*2 + 8*2) = 121;
          j = 1;
          while (j  <= TRACELEVEL){
                  if (!INKERNEL((long)frame1))
                          goto out;
                  sprintf(tfip, "%x\n", frame1->f_retaddr);
                  for (i = 0; i < 8; i++){
                          *(((unsigned char *)0xffffffff800b8000) +cpuid*300 + j*9*2 + i*2) = tfip[i];
                          if (*((unsigned char *)0xffffffff800b8001 + cpuid*300 +j*9*2 + i*2) != 121)
                                  *((unsigned char *)0xffffffff800b8001 + cpuid*300 +j*9*2 + i*2) = 121;
                          else
                                  *((unsigned char *)0xffffffff800b8001 + cpuid*300 +j*9*2 + i*2) = 120;
                  }
                  *(((unsigned char *)0xffffffff800b8000) + cpuid*300 +j*9*2 + 8*2) = ' ';
                  *((unsigned char *)0xffffffff800b8001 +cpuid*300 + j*9*2 + 8*2) = 121;
                  frame1 = frame1->f_frame;
                  j++;
          }

        }
        }
        out:
#endif

        if (vector == -1)
                panic("Couldn't get vector from ISR!");
        isrc = intr_lookup_source(apic_idt_to_irq(PCPU_GET(apic_id),
            vector));
        intr_execute_handlers(isrc, frame);
}



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203170352.q2H3qGNA007389>