NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/37933: very frequent crashes after suspend/resume



>Number:         37933
>Category:       kern
>Synopsis:       very frequent crashes after suspend/resume
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 01 02:05:01 +0000 2008
>Originator:     Steven M. Bellovin
>Release:        NetBSD 4.99.51
>Organization:
Department of Computer Science, Columbia University
>Environment:
        
        
System: NetBSD yellowstone.machshav.com 4.99.51 NetBSD 4.99.51 (YELLOWSTONE) 
#6: Wed Jan 30 20:05:24 EST 2008 
smb%yellowstone.machshav.com@localhost:/usr/BUILD/obj/sys/arch/amd64/compile/YELLOWSTONE
 amd64
Architecture: x86_64
Machine: amd64
>Description:
        I see very frequent crashes on resume after an (ACPI) suspend.
        I can reproduce it almost invariably by booting single-user and
        doing
                sysctl -w machdep.sleep_state=3
        twice (on occasion three times).  It very frequently happens in
        normal use, too, when I'm in X.
        The panics are usually in uvm_fault or amap_wipeout.

        I'm running a reasonably stock kernel, save for the enclosed
        patch (courtesy of jcmcneill) and some code of my own to limit
        rbus_size to 256MB (previously posted, but not yet committed).
        Those changes are necessary to use Cardbus devices on my 3GB machine;
        however, the crashes happen without using any Cardbus devices.
        (I have an additional patch in the USB code, but the crashes started
        before that patch was installed.)

        I've reproduced the crashes after a boot -c with

                no ehci
                no uhci
                no ohci

        so I'm pretty certain that the problem isn't in the USB stack.

        Here's the patch I have installed to pci.c:
        Index: pci.c
        ===================================================================
        RCS file: /cvsroot/src/sys/dev/pci/pci.c,v
        retrieving revision 1.110
        diff -r1.110 pci.c
        317,320c317,326
        <       if ((csr & PCI_COMMAND_IO_ENABLE) == 0)
        <               pa.pa_flags &= ~PCI_FLAGS_IO_ENABLED;
        <       if ((csr & PCI_COMMAND_MEM_ENABLE) == 0)
        <               pa.pa_flags &= ~PCI_FLAGS_MEM_ENABLED;
        ---
        >       if (PCI_CLASS(class) != PCI_CLASS_BRIDGE) {
        >               if ((csr & PCI_COMMAND_IO_ENABLE) == 0)
        >                       pa.pa_flags &= ~PCI_FLAGS_IO_ENABLED;
        >               if ((csr & PCI_COMMAND_MEM_ENABLE) == 0)
        >                       pa.pa_flags &= ~PCI_FLAGS_MEM_ENABLED;
        >       } else if ((csr & PCI_COMMAND_IO_ENABLE) == 0 ||
        >                   (csr & PCI_COMMAND_MEM_ENABLE) == 0) {
        >                       pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG,
        >                           csr | sc->sc_flags);
        >       }
>How-To-Repeat:
        See above.
>Fix:
        Unknown.

>Unformatted:
        
        



Home | Main Index | Thread Index | Old Index