duplicate output when dumping from ddb

Andriy Gapon avg at FreeBSD.org
Mon Aug 15 12:59:59 UTC 2011


on 15/08/2011 13:24 Sergey Kandaurov said the following:
> On 10 August 2011 23:04, Navdeep Parhar <nparhar at gmail.com> 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


More information about the freebsd-current mailing list