NetBSD Problem Report #56277

From dholland@netbsd.org  Fri Jun 25 22:45:04 2021
Return-Path: <dholland@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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 84AF71A921F
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 25 Jun 2021 22:45:04 +0000 (UTC)
Message-Id: <20210625224504.02FA284D3A@mail.netbsd.org>
Date: Fri, 25 Jun 2021 22:45:03 +0000 (UTC)
From: dholland@NetBSD.org
Reply-To: dholland@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: ktruss -o /dev/stderr doesn't work
X-Send-Pr-Version: 3.95

>Number:         56277
>Category:       kern
>Synopsis:       ktruss -o /dev/stderr doesn't work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 25 22:50:00 +0000 2021
>Originator:     David A. Holland
>Release:        NetBSD 9.9.85 (20210623)
>Organization:
>Environment:
System: NetBSD valkyrie 9.99.85 NetBSD 9.99.85 (VALKYRIE) #7: Wed Jun 23 18:32:25 EDT 2021  dholland@valkyrie:/usr/src/sys/arch/amd64/compile/VALKYRIE amd64
Architecture: x86_64
Machine: amd64
>Description:

% ktruss -o /dev/stderr ls
ktruss: file /dev/stderr, pid 29871: Unknown error: -5

ktracing ktruss shows:

  26761  26761 ktruss   CALL  ktrace(0x7f7fff219f92,0x2000000,0x1be,0x6889)
  26761  26761 ktruss   RET   ktrace -1 errno -5 Unknown error: -5

-5 is EDUPFD, clearly part of the workings of /dev/stderr, but this
should not escape to userland.

>How-To-Repeat:
	as above
>Fix:
	torches and pitchforks

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.