From owner-freebsd-current@FreeBSD.ORG Mon Aug 15 12:59:59 2011 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 6B1BF106564A for ; Mon, 15 Aug 2011 12:59:59 +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 B5C238FC08 for ; Mon, 15 Aug 2011 12:59:58 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA13425; Mon, 15 Aug 2011 15:59:55 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4E49184B.7090902@FreeBSD.org> Date: Mon, 15 Aug 2011 15:59:55 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110705 Thunderbird/5.0 MIME-Version: 1.0 To: Sergey Kandaurov References: In-Reply-To: X-Enigmail-Version: 1.2pre Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, Navdeep Parhar Subject: Re: duplicate output when dumping from ddb 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: Mon, 15 Aug 2011 12:59:59 -0000 on 15/08/2011 13:24 Sergey Kandaurov said the following: > On 10 August 2011 23:04, Navdeep Parhar wrote: >> "dump" or "call doadump" from within ddb display duplicate output. >> This is with a serial console. I have console="comconsole,vidconsole" >> in /boot/loader.conf and "-D -S115200" in /boot.config. >> >> db> dump >> Dumping 1883 out of 12255 MB:Dumping 1883 out of 12255 >> MB:..1%..1%..11%..11%..21%..21%..31%..31%..41%..41%..51%..51%..61%..61%..71%..71%..81%..81%..91%..91% >> >> Dump complete >> Dump complete >> db> >> >> Something seems to have changed in the last couple of months or so. >> > > Just to confirm with my "Same here". I use a serial console with same > settings, too. I am out of ideas how to fix it though. > Let me try to guess... do you have PRINTF_BUFR_SIZE defined? If you look at vprintf() in sys/kern/subr_prf.c, then it's possible that one message is printed by putchar() repeatedly called in kvprintf and the duplicate message is printed by cnputs() under PRINTF_BUFR_SIZE. Indeed, pca.flags is set to TOCONS | TOLOG in vprintf(), so putchar() would output a character (via cnputc) when kdb_active is true and also it would add the character to a buffer (via putbuf), because TOLOG is set. Maybe try to add !kdb_active condition for cnputs() call in vprintf(). -- Andriy Gapon