From owner-freebsd-current@FreeBSD.ORG Thu Dec 21 13:51:36 2006 Return-Path: X-Original-To: freebsd-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 3D99116A494 for ; Thu, 21 Dec 2006 13:51:36 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.freebsd.org (Postfix) with ESMTP id 6D6DA13C462 for ; Thu, 21 Dec 2006 13:51:35 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so2277233uge for ; Thu, 21 Dec 2006 05:51:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=usNd6G22InR1I0fYHUiOQn3WcJP13cqAV/DYvMwbFvX6Qp+rGexvWnHZ7zYYOjDfbH+uUhojg2gpa+TvGTf8b2ZqLs4xFMlHuTFBsPcrd8teK+ZNmo72qnMGiMZvO93LaXN6CixBUQ16RS4pbQLn9/XoHGWzEdxtQ1Ya8aEooKg= Received: by 10.82.113.6 with SMTP id l6mr1809330buc.1166647307910; Wed, 20 Dec 2006 12:41:47 -0800 (PST) Received: by 10.82.191.16 with HTTP; Wed, 20 Dec 2006 12:41:47 -0800 (PST) Message-ID: Date: Wed, 20 Dec 2006 12:41:47 -0800 From: "Kip Macy" To: "Dmitry Pryanishnikov" In-Reply-To: <20061220215753.H53808@atlantis.atlantis.dp.ua> MIME-Version: 1.0 References: <20061219175917.L84683@atlantis.atlantis.dp.ua> <20061220130559.P54963@atlantis.atlantis.dp.ua> <20061220124032.GC23698@deviant.kiev.zoral.com.ua> <20061220215753.H53808@atlantis.atlantis.dp.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Kostik Belousov , freebsd-current@freebsd.org, Kip Macy Subject: Re: ddb(4) spoils kernel stack in CURRENT? 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: Thu, 21 Dec 2006 13:51:36 -0000 I worried that gdb probably had workaround for the large stack argument. I'll have to dig it up, thanks for the heads up. -Kip On 12/20/06, Dmitry Pryanishnikov wrote: > > > Hello! > > On Wed, 20 Dec 2006, Kostik Belousov wrote: > >>> So it looks like a regression in CURRENT vs RELENG_6 (either ddb > 'spoils' > >>> the stack somehow, or kgdb fails to unwind it). > > > > Could you further localize the problem, i.e. try to backtrace CURRENT > dump > > Good news: I've managed to localize the bug! I'm Feeling Lucky (TM) ;) > just because CURRENT on my notebook was updated approx. at 17-Dec 00:00, > and it didn't manifest such a behaviour! So it was easy to identify the > regression - it comes with the following commit: > > ----------------------------------------------------------------------- > > Date: Sun, 17 Dec 2006 05:07:01 +0000 (UTC) > From: Kip Macy > To: src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org > Subject: cvs commit: src/sys/i386/i386 apic_vector.s exception.slocal_apic.c > trap.c vm86.c vm86bios.s src/sys/i386/include apicvar.h > src/sys/i386/isa atpic.c atpic_vector.s icu.h > > kmacy 2006-12-17 05:07:01 UTC > > FreeBSD src repository > > Modified files: > sys/i386/i386 apic_vector.s exception.s local_apic.c > trap.c vm86.c vm86bios.s > sys/i386/include apicvar.h > sys/i386/isa atpic.c atpic_vector.s icu.h > Log: > Evidently FreeBSD has long relied on the compiler to treat structures > passed by value (trap frames) as if they were in fact being passed by > reference. For better or worse, this incorrect behaviour is no longer > present in gcc 4.1. In this patch I convert all trapframe arguments to > be explicitly pass by reference. I also remove vm86_initflags, pushing > the very little work that it actually does up into vm86_prepcall. > > ----------------------------------------------------------------------- > > So kernel built from sources as of date=2006.12.17.05.00.00 gives dump > with analyzable backtrace, and kernel built from sources as of > date=2006.12.17.05.10.00 (which include this commit) gives dump > which confuses kgdb. I believe that commit itself is correct, > but kgdb contains some workaround against the old (incorrect) behaviour > of the kernel, so it's the kgdb that should be fixed. > > Sincerely, Dmitry > -- > Atlantis ISP, System Administrator > e-mail: dmitry@atlantis.dp.ua > nic-hdl: LYNX-RIPE > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >