NetBSD Problem Report #55924

From martin@aprisoft.de  Wed Jan 13 19:09:55 2021
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6C4571A9217
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 13 Jan 2021 19:09:55 +0000 (UTC)
Message-Id: <20210113190945.7B89C5CC7B9@emmas.aprisoft.de>
Date: Wed, 13 Jan 2021 20:09:45 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: dmesg(8) broken on aarch64
X-Send-Pr-Version: 3.95

>Number:         55924
>Category:       kern
>Synopsis:       dmesg(8) broken on aarch64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 13 19:10:00 +0000 2021
>Last-Modified:  Tue Jan 26 10:05:01 +0000 2021
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.77
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD h-pulse.aprisoft.de 9.99.77 NetBSD 9.99.77 (GENERIC64) #172: Wed Jan 13 17:48:51 CET 2021 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/evbarm/compile/GENERIC64 evbarm
Architecture: aarch64
Machine: evbarm
>Description:

This is on a hummingboard pulse board, booting via u-boot in uefi mode from SD
card. The issue started 1 or 2 weeks ago.

Raw dmesg(8) output is 38734 characters on this machine right now
and only starts to make sens at character 37130:

[ 702754.047093] [ 702754.047093] [ 702763.267027] [     7.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [  
    1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000000] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.
 000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.00000
 3] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.000003] [     1.162130] [     1.162130] [     1.172128] [     1.172128] [     1.182129] [     1.192129] [     1.192129] [     1.202130] [     1.212130] [     1.244626] [     1.254626] [     1.254626] [     1.254626] [     1.254626] [     1.254626] [     1.364631] [     1.374635] 
<<--- garbage -- real kernel output starting at 37130 ---->>
[     1.374635] ld1: 7624 MB, 3872 cyl, 64 head, 63 sec, 512 bytes/sect x 15613952 sectors
[     1.394634] ld1: 4-bit width, High-Speed/SDR25, 50.000 MHz
[     2.814722] uhub2 at uhub0 port 1: vendor 04b4 (0x04b4) product 6500 (0x6500), class 9/0, rev 3.00/50.10, addr 1
[     2.825653] uhub2: 4 ports with 4 removable, self powered
[     2.834724] uhub3 at uhub1 port 1: vendor 04b4 (0x04b4) product 6502 (0x6502), class 9/0, rev 2.10/50.10, addr 2
[     2.844726] uhub3: multiple transaction translators
[     2.854725] uhub3: 4 ports with 4 removable, self powered
[     3.224749] cgd: self-test aes-xts-256
[     3.224749] cgd: self-test aes-xts-512
[     3.224749] cgd: self-test aes-cbc-128
[     3.224749] cgd: self-test aes-cbc-256
[     3.224749] cgd: self-test 3des-cbc-192
[     3.224749] cgd: self-test blowfish-cbc-448
[     3.224749] cgd: self-test aes-cbc-128 (encblkno8)
[     3.224749] cgd: self-tests passed
[     3.234749] WARNING: 6 errors while detecting hardware; check system log.
[     3.245569] boot device: ld1
[     3.254751] root on ld1a dumps on ld1b
[     3.264752] mountroot: trying ffs...
[     3.264752] root file system type: ffs
[     3.274755] kern.module.path=/stand/evbarm/9.99.77/modules
[     3.274755] WARNING: no TOD clock present
[     3.287031] WARNING: using filesystem time
[     3.291127] WARNING: CHECK AND RESET THE DATE!
[     3.295579] init: copying out path `/sbin/init' 11
[     7.755879] entropy: ready
[     9.315990] enet0: link state UP (was UNKNOWN)
[     9.736025] enet0: link state DOWN (was UP)
[    12.736240] enet0: link state UP (was DOWN)

The garbage includes parts of kernel output from before the last boot, but
with bits flipped every now and then.

>How-To-Repeat:
boot current/aarch64 ?

>Fix:
n/a

>Audit-Trail:
From: Rin Okuyama <rokuyama.rk@gmail.com>
To: gnats-bugs@netbsd.org, Martin Husemann <martin@NetBSD.org>
Cc: 
Subject: Re: kern/55924: dmesg(8) broken on aarch64
Date: Tue, 26 Jan 2021 18:17:17 +0900

 I cannot reproduce this problem with GENERIC64 obtained from
 HEAD/202101251420Z on my RockPro64 (with u-boot/uefi).

 Is this typical to HummingBoard Pulse or its SoC or etc.?

 Thanks,
 rin

From: Martin Husemann <martin@duskware.de>
To: Rin Okuyama <rokuyama.rk@gmail.com>
Cc: gnats-bugs@netbsd.org, Martin Husemann <martin@NetBSD.org>
Subject: Re: kern/55924: dmesg(8) broken on aarch64
Date: Tue, 26 Jan 2021 11:03:40 +0100

 On Tue, Jan 26, 2021 at 06:17:17PM +0900, Rin Okuyama wrote:
 > I cannot reproduce this problem with GENERIC64 obtained from
 > HEAD/202101251420Z on my RockPro64 (with u-boot/uefi).
 > 
 > Is this typical to HummingBoard Pulse or its SoC or etc.?

 It seems to be specific to this board/soc - it always show random
 corruption and in the week where I filed the PR it was especially
 bad.

 Usually there is a meaningfull dmesg at the end of the output, but apparently
 some random noise confused my terminal emulator.

 Would be great if we could clear the msgbuf early, but it seems there is no
 way to tell if this is a "cold" boot or a reboot and what parts of the
 buffer should be preserved.

 Martin

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.