NetBSD Problem Report #46897

From campbell@mumble.net  Mon Sep  3 21:17:44 2012
Return-Path: <campbell@mumble.net>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id B9C7163B86D
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  3 Sep 2012 21:17:43 +0000 (UTC)
Message-Id: <20120903211737.05B4D604BB@jupiter.mumble.net>
Date: Mon,  3 Sep 2012 21:17:36 +0000 (UTC)
From: Taylor R Campbell <campbell+netbsd@mumble.net>
Reply-To: Taylor R Campbell <campbell+netbsd@mumble.net>
To: gnats-bugs@gnats.NetBSD.org
Subject: procfs uses too small a buffer for /proc/cpuinfo (or, I have too many cores)
X-Send-Pr-Version: 3.95

>Number:         46897
>Category:       kern
>Synopsis:       procfs uses too small a buffer for /proc/cpuinfo (or, I have too many cores)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 03 21:20:00 +0000 2012
>Closed-Date:    Tue Aug 09 04:06:40 +0000 2016
>Last-Modified:  Tue Aug 09 04:06:40 +0000 2016
>Originator:     Taylor R Campbell <campbell+netbsd@mumble.net>
>Release:        NetBSD 6.99.10
>Organization:
>Environment:
Architecture: amd64
Machine: amd64
>Description:

	I mounted procfs on a system with 24 cores (well, 24 threads --
	two CPUs, six cores per CPU, two threads per core).  I tried to
	see what /proc/cpuinfo would say about them, only to find:

		# cat /proc/cpuinfo
		cat: /proc/cpuinfo: No space left on device

	Evidently procfs_docpuinfo allocates an 8 KB buffer for the
	whole content of /proc/cpuinfo.  Estimating from the output of
	`cpuctl identify 0', this buffer would need to be expanded by a
	factor of three to fit all my cores.

>How-To-Repeat:

	On a system with too many cores and procfs, run

		cat /proc/cpuinfo

>Fix:

	Yes, please!  Perhaps multiply the buffer size by the number of
	cores?

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: msaitoh@NetBSD.org
State-Changed-When: Tue, 09 Aug 2016 04:06:40 +0000
State-Changed-Why:
This problem was fixed by christos@ in 2012:
http://mail-index.netbsd.org/source-changes/2014/04/05/msg053806.html

Thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.