NetBSD Problem Report #54269
From martin@duskware.de Tue Jun 4 10:09:30 2019
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 639877A14B
for <gnats-bugs@gnats.NetBSD.org>; Tue, 4 Jun 2019 10:09:30 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: crunched dmesg(8) misbehaves
X-Send-Pr-Version: 3.95
>Number: 54269
>Category: toolchain
>Synopsis: crunched dmesg(8) misbehaves
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kre
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 04 10:10:00 +0000 2019
>Closed-Date: Wed Jun 05 10:03:48 +0000 2019
>Last-Modified: Wed Jun 05 10:03:48 +0000 2019
>Originator: Martin Husemann
>Release: NetBSD 8.99.42
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD night-porter.duskware.de 8.99.42 NetBSD 8.99.42 (PORTER) #15: Mon Jun 3 18:52:37 CEST 2019 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/i386/compile/PORTER i386
Architecture: i386
Machine: i386
>Description:
When booted from i386 install floppies, the dmesg(8) command misbehaves.
The kernel boot messages itself are correct, e.g.:
[ 1.0000000] NetBSD 8.99.42 (INSTALL) #2: Tue Jun 4 08:22:21 CEST 2019
[ 1.0000000] martin@seven-days-to-the-wolves.aprisoft.de:/work/obj/i386/work/src/sys/arch/i386/compile/INSTALL
[ 1.0000000] total memory = 127 MB
[ 1.0000000] avail memory = 105 MB
[ 1.0000000] running cgd selftest aes-xts-256 aes-xts-512 done
but the output of dmesg (and also dmesg -t) are wrong, both show:
# dmesg|more
1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,0,
1.0000000] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 201 ,
1.0000000] 2018, 2019 The NetBSD Foundation, Inc. All rights reserved.
1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
1.0000000] The Regents of the University of California. All rights reserv.
1.0000000] NetBSD 8.99.42 (INSTALL) #2: Tue Jun 4 08:22:21 CEST 2019
1.0000000] martin@seven-days-to-the-wolves.aprisoft.de:/work/obj/i386/worsL
1.0000000] total memory = 127 MB
1.0000000] avail memory = 105 MB
>How-To-Repeat:
s/a
>Fix:
n/a
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: toolchain-manager->kre
Responsible-Changed-By: kre@NetBSD.org
Responsible-Changed-When: Tue, 04 Jun 2019 11:02:47 +0000
Responsible-Changed-Why:
This has nothing to do with crunchgen (or anything else toolchain
related) - it is a dmesg bug when compiled -DSMALL.
I am fixing it now.
It is no surprise that dmesg -t behaves the same, as a SMALL dmesg
simply ignores any args handed to it.
State-Changed-From-To: open->feedback
State-Changed-By: kre@NetBSD.org
State-Changed-When: Tue, 04 Jun 2019 11:38:35 +0000
State-Changed-Why:
When you get a chance to build and test new i386 boot floppies,
please confirm that the problem is now fixed.
From: "Robert Elz" <kre@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54269 CVS commit: src/sbin/dmesg
Date: Tue, 4 Jun 2019 11:37:39 +0000
Module Name: src
Committed By: kre
Date: Tue Jun 4 11:37:39 UTC 2019
Modified Files:
src/sbin/dmesg: dmesg.c
Log Message:
PR toolchain/54269
Make a SMALL dmesg even smaller.
When compiled -DSMALL, dmesg does nothing at all with the kernel
timestamps (it processes no options to be told what would be the
user's desire) so make it truly do (almost) nothing, rather than
some botched partial processing of them.
The "almost" is that a SMALL dmesg will now ignore spaces at the
beginning of each new message line ... those are (vanishingly)
unlikely to occur, as the kernel puts the timestamp (which starts
with '[' there) - fixing this would have meant even more #ifdef's
as the code that ignores that leading space is the only remaining
thing that (in a SMALL) dmesg looks at the value of the "tstamp"
variable, and if we don't keep some use of it, gcc complains...
These changes affect only SMALL dmesg (as installed on boot
floppies, etc) and have no intended effect on the version that's
installed on a normal (full size) running system.
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sbin/dmesg/dmesg.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: feedback->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Wed, 05 Jun 2019 10:03:48 +0000
State-Changed-Why:
Works, thanks!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.