NetBSD Problem Report #55407

From  Mon Jun 22 13:15:20 2020
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 477211A9217
	for <>; Mon, 22 Jun 2020 13:15:20 +0000 (UTC)
Message-Id: <>
Date: Mon, 22 Jun 2020 15:14:29 +0200 (CEST)
Subject: fstat cannot display descriptors of chrooted processes
X-Send-Pr-Version: 3.95

>Number:         55407
>Category:       kern
>Synopsis:       fstat cannot display descriptors of chrooted processes
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 22 13:20:00 +0000 2020
>Last-Modified:  Wed Jun 24 10:10:01 +0000 2020
>Originator:     Michael van Elst
>Release:        NetBSD 9.0_STABLE
                                Michael van Elst
                                "A potential Snark may lurk in every tree."

System: NetBSD 9.0_STABLE NetBSD 9.0_STABLE (GENERIC64) #0: Tue Mar 3 18:56:34 UTC 2020 evbarm
Architecture: aarch64
Machine: evbarm

fstat only prints errors for chrooted processes. E.g.

# fstat -p 25353
USER     CMD          PID   FD MOUNT       INUM MODE         SZ|DV R/W
fstat: can't read filedesc at 0xffff009c4e849600 for pid 25353

The failure is present also when fstat is run within the same chroot.
procfs shows all descriptors.

This seems to be no problem on amd64, i386 or arm.


Run fstat on a system using chrooted processes on aarch64.


From: "Jukka Ruohonen" <>
Subject: PR/55407 CVS commit: src
Date: Wed, 24 Jun 2020 10:05:08 +0000

 Module Name:	src
 Committed By:	jruoho
 Date:		Wed Jun 24 10:05:08 UTC 2020

 Modified Files:
 	src/distrib/sets/lists/tests: mi
 	src/etc/mtree: NetBSD.dist.tests
 Added Files:
 	src/tests/usr.bin/fstat: Makefile

 Log Message:
 Check that fstat(1) works (cf. PR kern/55407).

 To generate a diff of this commit:
 cvs rdiff -u -r1.847 -r1.848 src/distrib/sets/lists/tests/mi
 cvs rdiff -u -r1.165 -r1.166 src/etc/mtree/NetBSD.dist.tests
 cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/fstat/Makefile \

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


NetBSD Home
NetBSD PR Database Search

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