molotov
January 16th, 2005, 23:16
"FreeBSD-EN-05:03.ipi Errata Notice
The FreeBSD Project

Topic: FreeBSD/i386 may panic under heavy load on SMP machines

Category: core
Module: smp
Announced: 2005-01-16
Credits: Stephan Uphoff, Xin LI
Affects: FreeBSD 5.3-RELEASE
Corrected: 2005-01-16 08:29:14 UTC

I. Background

Inter-processor Interrupt, also known as ``IPI'', is a mechanism on
multiprocessor system (specifically, SMP) to indicate some event that the
other CPUs should be aware of.

II. Problem Description

Under FreeBSD 5.3-RELEASE prior to the correction date, when there are
more than two pending IPI vectors per local APIC it is possible to cause
deadlocks. The deadlock will then result in a kernel panic.

III. Impact

SMP servers that encounted heavy load, e.g. buildworld with md(4) and -jN,
can easily be crashed.

IV. Solution

Do one of the following to update the source tree:

1) Upgrade your affected system to the RELENG_5_3 errata branch dated
after the correction date using cvsup(1) or cvs(1). This is the
preferred method. For information on how to use cvsup(1) to update
your source code see:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html

2) Obtain the updated files using the cvsweb interface. Cvsweb is a
Web interface to the CVS repository. The URL to the general
interface is "http://www.freebsd.org/cgi/cvsweb.cgi/". You can
obtain any of the source files for the RELENG_5_3 branch by going
to the src directory ("http://www.freebsd.org/cgi/cvsweb.cgi/src")
and then selecting the "RELENG_5_3" branch tag. With the branch
tag set navigate to the files listed below in the "Correction
details" section and download them, making sure you get the correct
revision numbers. Copy the downloaded files into your /usr/src tree.

If using the second procedure you should make sure you have used that
same procedure to download all previous Errata Notices and Security
Advisories. We strongly discourage this procedure due to the problems
that may be caused by not doing that - using the first procedure takes
care of making sure all updates get applied.

Then follow the normal procedures for rebuilding/reinstalling the kernel.
Details about rebuilding/reinstalling are available here:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html

V. Correction details

The following list contains the revision numbers of each file that was
corrected in FreeBSD.

- ---------------------------------------------------------------------------
RELENG_5_3

Revision Changes Path
1.342.2.13.2.8 +4 -0 src/UPDATING
1.62.2.15.2.10 +1 -1 src/sys/conf/newvers.sh
1.101.4.1 +2 -50 src/sys/i386/i386/apic_vector.s
1.235.2.3.2.1 +65 -37 src/sys/i386/i386/mp_machdep.c
1.8.4.1 +42 -9 src/sys/i386/include/apicvar.h
1.78.4.1 +2 -5 src/sys/i386/include/smp.h"

MARC dosn't have it archived yet, Ill post a link when they get it up.