Port-i386 archive

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

Re: Xintr_ioapic_level3 jumps to 0 during softint_disestablish



On Fri, Apr 10, 2009 at 01:08:44PM -0500, David Young wrote:
> Xintr_ioapic_level3 tries to jump to an interrupt handler at 0 while
> audio0 detaches a software interrupt handler (audiodetach calls
> softint_disestablish).  I can reproduce this 100% of the time at
> shutdown, if I set kern.detachall to 1, but I cannot reproduce it
> otherwise.
> 
> I have just tried with kern.detachall=0, but audio(4) patched to always
> detach at shutdown, and the crash is the same, so adding the audio
> detachment to shutdown seems to be the critical difference, even if the
> bug does not reside in audio(4).  audio0 is attached at pad0, btw.
> 
> Kernel configuration (debug.ojctech.com) at
> <ftp://elmendorf.ojctech.com/users/netbsd-758e1bfc/ojctech.com> and
> <ftp://elmendorf.ojctech.com/users/netbsd-758e1bfc/debug.ojctech.com>.
> 
> Console typescript with dmesg, backtraces, registers, process listing at
> <ftp://elmendorf.ojctech.com/users/netbsd-da5c9f4c/softint.crash>.

It was just a coincidence that audio(4) slept in softint_disestablish()
every single time the crash occurred.  The real problem was that uhci(4)
and ehci(4) disestablished their PCI interrupt hooks without disabling
interrupts on the hardware, first.  I fixed that---see commit message,
below.

Dave

On Fri, Apr 17, 2009 at 05:21:31PM +0000, David Young wrote:
> Module Name:  src
> Committed By: dyoung
> Date:         Fri Apr 17 17:21:31 UTC 2009
> 
> Modified Files:
>       src/sys/dev/pci: ehci_pci.c uhci_pci.c
> 
> Log Message:
> Disable interrupts on the h/w before detaching the interrupt
> handler.  Protects against the problem described in
> <http://mail-index.netbsd.org/port-i386/2009/04/10/msg001317.html>,
> Xintr_ioapic_levelN jumps to 0 during shutdown.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/ehci_pci.c
> cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/uhci_pci.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 


-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index