From owner-freebsd-stable@FreeBSD.ORG Tue Jul 7 01:27:50 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 B6493106566C for ; Tue, 7 Jul 2009 01:27:50 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-bw0-f221.google.com (mail-bw0-f221.google.com [209.85.218.221]) by mx1.freebsd.org (Postfix) with ESMTP id 399CC8FC08 for ; Tue, 7 Jul 2009 01:27:48 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by bwz21 with SMTP id 21so777515bwz.43 for ; Mon, 06 Jul 2009 18:27:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=16ur+hlFU9BZOVozVG9HWZ66MuNq4GYtP1m/4ZfYA2k=; b=CiHs+9oQe9Y4c3G7t5l1TYhaGVoxVnu0OBWuPrMKkGV2yEjLkMvj/z/BU9mbM+RzWk dxwvr6Y3NnvXOoMo4Ufu5cybOeyCcPeBv6dEeBn0s8SYf1GXRYUi7ydQJnp+fr9KLqXX K5I6HY8HhmTrVW9i8obyIGgK3B0c4eicLD4JE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=vx3Fjvwvtm3gQN3DTaF6Ywtq8LKBvecrY/Epyu4JNtrcM7Foz/I6moflvdjK7Mel9a NgpDU2SPbRDU0d/bjKpkglRIEpHGG7yloY64HwTk9PjhupRHSdTzf2Od4c44ZpSE0J9s c4Ga9z31F8z2/spE6kp/CQm1ZPSTALtx6ToWQ= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.108.210 with SMTP id g18mr2356188fap.38.1246930068071; Mon, 06 Jul 2009 18:27:48 -0700 (PDT) In-Reply-To: References: <3bbf2fe10907061818v245abd0cgc3ca5073cb93aea4@mail.gmail.com> Date: Tue, 7 Jul 2009 03:27:48 +0200 X-Google-Sender-Auth: fc3bc7471f60a415 Message-ID: <3bbf2fe10907061827g35eaeb49g26cf6fdb64436ca7@mail.gmail.com> From: Attilio Rao To: Dan Naumov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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:27:51 -0000 2009/7/7 Dan Naumov : > 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 7 03:49:38 atom syslogd: kernel boot file is /boot/kernel/kernel >>> Jul 7 03:49:38 atom kernel: spin lock 0xffffffff80b3edc0 (sched lock >>> 1) held by 0xffffff00017d8370 (tid 100054) too long >>> Jul 7 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? I'd like to work on that issue before BETA3 (and backport to STABLE_7), I'm just time-constrained right now. it is completely random. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein