From owner-freebsd-current@FreeBSD.ORG Sat Dec 16 17:42:13 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B55D716A403; Sat, 16 Dec 2006 17:42:13 +0000 (UTC) (envelope-from Yuriy.Tsibizov@gfk.ru) Received: from mx.gfk.ru (mx.gfk.ru [84.21.231.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9609943CAA; Sat, 16 Dec 2006 17:42:11 +0000 (GMT) (envelope-from Yuriy.Tsibizov@gfk.ru) Received: from ex.hhp.local by mx.gfk.ru (MDaemon PRO v9.5.3) with ESMTP id md50000781632.msg; Sat, 16 Dec 2006 20:42:08 +0300 Received: from dialup-chibis.gfk.ru ([10.0.6.45]) by ex.hhp.local with Microsoft SMTPSVC(6.0.3790.1830); Sat, 16 Dec 2006 20:42:01 +0300 Date: Sat, 16 Dec 2006 20:42:03 +0300 (MSK) From: Yuriy Tsibizov X-X-Sender: chibis@free.home.local To: Andrey Chernov In-Reply-To: <20061216133547.GA1754@nagual.pp.ru> Message-ID: <20061216203900.G599@free.home.local> References: <20061216133547.GA1754@nagual.pp.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-OriginalArrivalTime: 16 Dec 2006 17:42:02.0184 (UTC) FILETIME=[7E75A480:01C72139] X-Spam-Processed: mx.gfk.ru, Sat, 16 Dec 2006 20:42:08 +0300 (not processed: message from valid local sender) X-MDRemoteIP: 10.0.0.30 X-Return-Path: Yuriy.Tsibizov@gfk.ru X-Envelope-From: Yuriy.Tsibizov@gfk.ru X-MDAV-Processed: mx.gfk.ru, Sat, 16 Dec 2006 20:42:08 +0300 Cc: current@freebsd.org, kmacy@freebsd.org Subject: Re: Fatal trap at booting after last kmacy@ changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 17:42:13 -0000 > Last kernel got immediately fatal trap at boot, right after timer probe. > This is what I write by hand from the console: > > Fatal trap 12: page fault while in kernel mode > fault code: supervisor read, page not present > stopped at sleepq_add+0xf6: cmpl $0,0(%rax,%eax,8) > > stack trace: > sleepq_add > cv_timedwait > _sema_timedwait > ata_queue_request > ... It seems that with INVARIANTS &sq is referenced while sq is NULL... This should fix it: Index: subr_sleepqueue.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_sleepqueue.c,v retrieving revision 1.32 diff -u -r1.32 subr_sleepqueue.c --- subr_sleepqueue.c 16 Dec 2006 07:50:39 -0000 1.32 +++ subr_sleepqueue.c 16 Dec 2006 17:34:27 -0000 @@ -295,6 +295,7 @@ * into the sleep queue already in use by this wait channel. */ if (sq == NULL) { + sq = td->td_sleepqueue; #ifdef INVARIANTS int i; for (i = 0; i < NR_SLEEPQS; i++) @@ -313,7 +314,6 @@ sleepq_max_depth = sc->sc_max_depth; } #endif - sq = td->td_sleepqueue; LIST_INSERT_HEAD(&sc->sc_queues, sq, sq_hash); sq->sq_wchan = wchan; #ifdef INVARIANTS Yuriy.