From owner-freebsd-current@FreeBSD.ORG Sat Sep 4 19:54:10 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C35CD106564A for ; Sat, 4 Sep 2010 19:54:10 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 125408FC0C for ; Sat, 4 Sep 2010 19:54:09 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA04946 for ; Sat, 04 Sep 2010 22:54:08 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OryoS-000CXv-Av for freebsd-current@FreeBSD.org; Sat, 04 Sep 2010 22:54:08 +0300 Message-ID: <4C82A3DF.2000809@freebsd.org> Date: Sat, 04 Sep 2010 22:54:07 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100822 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <4C7F782B.8050507@freebsd.org> <4C7FA1BF.30206@freebsd.org> In-Reply-To: <4C7FA1BF.30206@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: problem with amd64 minidump 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, 04 Sep 2010 19:54:10 -0000 on 02/09/2010 16:08 Andriy Gapon said the following: > on 02/09/2010 13:10 Andriy Gapon said the following: >> >> Not sure if this is some local issue or a problem in FreeBSD code. >> I remember minidumps working perfectly well for me, but now I can not get data >> from them. >> Example: >> dmesg -M /var/crash/vmcore.4 >> dmesg: _kvm_vatop: direct map address 0xffffff012fffffe0 not in minidump >> dmesg: kvm_read: invalid address (0xffffff012fffffe0) > > Not sure if it can help, but it seems that this virtual address in DMAP > corresponds to a physical address in the last page of RAM. > Do we use that for anything special? Message buffer? > I had a quick look at getmemsize() function in sys/amd64/amd64/machdep.c and it > looks like the following code in the function could be doing just that: > > Maxmem = atop(phys_avail[pa_indx]); > > /* Trim off space for the message buffer. */ > phys_avail[pa_indx] -= round_page(MSGBUF_SIZE); > > /* Map the message buffer. */ > msgbufp = (struct msgbuf *)PHYS_TO_DMAP(phys_avail[pa_indx]); > > Oh, and yeah: > (gdb) p msgbufp > $4 = (struct msgbuf *) 0xffffff012fffffe0 > > But we do dump the message buffer. > But somehow its dmap address is not resolved correctly. > > This should ring a bell for someone knowledgeable of minidump and libkvm code, I > believe. Just for the record: this was triggered by having non-default MSGBUF_SIZE, see r212174 for the fix. -- Andriy Gapon