NetBSD Problem Report #58590
From www@netbsd.org Tue Aug 13 14:00:20 2024
Return-Path: <www@netbsd.org>
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)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 0BD8B1A9244
for <gnats-bugs@gnats.NetBSD.org>; Tue, 13 Aug 2024 14:00:20 +0000 (UTC)
Message-Id: <20240813140018.9D2BE1A9245@mollari.NetBSD.org>
Date: Tue, 13 Aug 2024 14:00:18 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: kernhist(9) output lines have confusing magic numbers that are not documented
X-Send-Pr-Version: www-1.0
>Number: 58590
>Category: kern
>Synopsis: kernhist(9) output lines have confusing magic numbers that are not documented
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 13 14:05:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The NetBSD#1234@0 Foundation
>Environment:
>Description:
1694234729.898304 uvm_map_prepare#551025@0: called: (map=0x8fe3ad68, start=0x7defd000, size=1000, flags=0x101)
1694234729.898309 uvm_map_prepare#551025@0: uobj/offset 0x8fd4be28/0
1694234729.898319 uvm_map_findspace#456950@0: called: (map=0x8fe3ad68, hint=0x7defd000, len=4096, flags=0x101...
1694234729.898324 uvm_map_findspace#456950@0: uobj=0x8fd4be28, uoffset=0, align=0)
1694234729.898331 uvm_map_findspace#456950@0: <- VA 0x7defd000 vs range [0x1000->0x7ffff000]
1694234729.898336 uvm_map_findspace#456950@0: <- VA 0x7defd000 vs range [0x1000->0x7ffff000]
1694234729.898342 uvm_map_lookup_entry#5088438@0: called: (map=0x8fe3ad68,addr=0x7defd000,ent=0xc311fe14)
1694234729.898349 uvm_map_lookup_entry#5088438@0: <- failed!
What do the #5088438 and @0 numbers mean? Everything after the colon is written in the log format string itself, like UVMHIST_LOG(maphist,"<- failed!",0,0,0,0), but the # and @ stuff is added by kernhist(9) itself and the man page doesn't explain this format.
>How-To-Repeat:
read a kernhist
>Fix:
Just document a worked example in kernhist(9), instead of writing it out ambiguously in the current vague prose:
A kernel history is a fixed-size buffer, either statically or dynamically
allocated, that is written and read on a circular basis. Each entry
includes the time the entry was made, the CPU from which the entry was
recorded, the printf(3) like format string and length, the function name
and length, the unique call count for this function, and the 4 arguments.
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.