From owner-freebsd-stable@FreeBSD.ORG Tue Jul 7 01:25:08 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E48D1065673 for ; Tue, 7 Jul 2009 01:25:08 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: from mail-gx0-f210.google.com (mail-gx0-f210.google.com [209.85.217.210]) by mx1.freebsd.org (Postfix) with ESMTP id 441328FC17 for ; Tue, 7 Jul 2009 01:25:07 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: by gxk6 with SMTP id 6so4870074gxk.19 for ; Mon, 06 Jul 2009 18:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=t+ZBrOOAK8+UBjQru4untHaky5qkDfLWEdEBBYvahwo=; b=lltiKdCRPdJVe2h0Fp87tosf32nrvdYvpG+7LQSgV4leZcToQpMB8Rgm5NlGXl1O1G 0d5jJlRX5L1aT2MroJgbmGd18oDGFMKkeZTmjUp+FgP7/STqJ8uWJuFx2bYOy4XYOMsu 6VvGPd6mIj+EqJTcB3qjiudTnG7CUm5feGPY4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=o2w0v1wsWuOtgaZLs3R92ujBCQjrgJfhH4bw7NCY13WMVhr9Jwr9eaq/oLrivm268P ggz/0WhHseBHhgArzDTpOqQ30uh+CQvjf0njnsuzA64LKlQBr9l7BpKQFLYUtZGrdRNt SITFJDA1LzLaVXMXGtY8a1q4bq3iQ/00VFlCA= MIME-Version: 1.0 Received: by 10.100.96.12 with SMTP id t12mr9706864anb.4.1246929907469; Mon, 06 Jul 2009 18:25:07 -0700 (PDT) In-Reply-To: <3bbf2fe10907061818v245abd0cgc3ca5073cb93aea4@mail.gmail.com> References: <3bbf2fe10907061818v245abd0cgc3ca5073cb93aea4@mail.gmail.com> Date: Tue, 7 Jul 2009 04:25:07 +0300 Message-ID: From: Dan Naumov To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD-STABLE Mailing List Subject: Re: 7.2-release/amd64: panic, spin lock held too long X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2009 01:25:08 -0000 On Tue, Jul 7, 2009 at 4:18 AM, Attilio Rao wrote: > 2009/7/7 Dan Naumov : >> I just got a panic following by a reboot a few seconds after running >> "portsnap update", /var/log/messages shows the following: >> >> Jul =A07 03:49:38 atom syslogd: kernel boot file is /boot/kernel/kernel >> Jul =A07 03:49:38 atom kernel: spin lock 0xffffffff80b3edc0 (sched lock >> 1) held by 0xffffff00017d8370 (tid 100054) too long >> Jul =A07 03:49:38 atom kernel: panic: spin lock held too long > > That's a known bug, affecting -CURRENT as well. > The cpustop IPI is handled though an NMI, which means it could > interrupt a CPU in any moment, even while holding a spinlock, > violating one well known FreeBSD rule. > That means that the cpu can stop itself while the thread was holding > the sched lock spinlock and not releasing it (there is no way, modulo > highly hackish, to fix that). > In the while hardclock() wants to schedule something else to run and > got stuck on the thread lock. > > Ideal fix would involve not using a NMI for serving the cpustop while > having a cheap way (not making the common path too hard) to tell > hardclock() to avoid scheduling while cpustop is in flight. > > Thanks, > Attilio Any idea if a fix is being worked on and how unlucky must one be to run into this issue, should I expect it to happen again? Is it basically completely random? - Sincerely, Dan Naumov