From owner-freebsd-stable@FreeBSD.ORG Wed Nov 3 08:46:39 2010 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 CFA61106566C for ; Wed, 3 Nov 2010 08:46:39 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 88D218FC31 for ; Wed, 3 Nov 2010 08:46:39 +0000 (UTC) Received: by gya6 with SMTP id 6so275907gya.13 for ; Wed, 03 Nov 2010 01:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pmmAoilSygrb9blphzv/R94IXOMOp1zNFlsNs06BdO4=; b=x0qyrHxIvjk7iBf1rj70MsD/s+oui96N0H40Ko1LSqtb3+gMK4YCa0j9N/s+UQH9wl 7kumcSTCkCBn+a5kgbjl4Po+2hu4Oa6R+JcbJWMYM23mVyspn5kRv9lCHoPnEbnu+q0V JL7uFUYQE55bySJ/rOiF4jTxKOyVUO0QVE+bQ= 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=URtcViMlQj1+Av4fgzk4BaLJvDWkvlMH2FpN0T+xvQ7/KA4864NWD3ILoDav3v+eMP 03U5sAfY1brEuvKtrHUxo5XU6Bw93raGUuzAzsocRhZjQiaD9t0YvKeu8wnsxns+Pgkc oVFvy+mUNS3NjkM8duVDvuydxT8vOChoyUNLg= MIME-Version: 1.0 Received: by 10.229.233.196 with SMTP id jz4mr6719139qcb.138.1288772338670; Wed, 03 Nov 2010 01:18:58 -0700 (PDT) Received: by 10.229.69.135 with HTTP; Wed, 3 Nov 2010 01:18:58 -0700 (PDT) In-Reply-To: <68E248E0-8619-4859-BFFE-1B5F5ABBC51F@airwired.net> References: <68E248E0-8619-4859-BFFE-1B5F5ABBC51F@airwired.net> Date: Wed, 3 Nov 2010 11:18:58 +0300 Message-ID: From: Sergey Kandaurov To: Dan Allen , Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD-STABLE Mailing List Subject: Re: Fatal trap 18 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: Wed, 03 Nov 2010 08:46:39 -0000 On 3 November 2010 08:30, Dan Allen wrote: > FreeBSD 8.1-STABLE sometime after 10/28/2010 has caused a fatal boot erro= r on my Toshiba U205, 1.8 GHz Core Duo laptop. > > Many times every week I sync with STABLE and build everything. =A0I have = been doing this for years. > > I sync'd (via csup) and built on 10/28/2010 and everything was fine. > > Then I sync'd yesterday 11/1/2010 and it crashes on boot. =A0The diagnost= ics print out the following: > > --- > > Fatal trap 18: integer divide fault while in kernel mode > > kdb_backtrace > panic > trap_fatal > trap > calltrap > topo_probe > cpu_topo > smp_topo > sched_setup > mi_startup > > --- > > I reverted at the loader via boot /boot/kernel.old, resync'd today, rebui= lt, and things are still broken. > It's possible in theory to leave cpu_logical as zero in topo_probe_0x4(). So, it makes sense to add some sort of the check. Index: svn/freebsd/head/sys/amd64/amd64/mp_machdep.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- svn/freebsd/head/sys/amd64/amd64/mp_machdep.c (revision 214725) +++ svn/freebsd/head/sys/amd64/amd64/mp_machdep.c (working copy) @@ -239,6 +239,8 @@ cpu_logical++; } + if (cpu_logical =3D=3D 0) + cpu_logical =3D 1; /* XXX max_logical? */ cpu_cores /=3D cpu_logical; hyperthreading_cpus =3D cpu_logical; } --=20 wbr, pluknet