Bug 29682

Summary: /proc/pid/status broken for irqN processes.
Product: Base System Reporter: Josef Karthauser <joe>
Component: kernAssignee: Mike Barcroft <mike>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Josef Karthauser 2001-08-13 22:00:05 UTC
	Processes that use procfs, like wmtop, are broken under -current.
	This is because the /proc/pid/status file is a space separated
	list of entries, but irq threads in -current contain spaces in
	their names.  This makes it impossible to parse the status file
	correctly.
	
	genius# cat /proc/15/status
	swi5: task queue 15 0 0 0 -1,-1 noflags 997626444,23 0,0 0,0 nochan 0 0
	0,0 -

	The field 'swi5: task queue' should is a single field, but
	contains spaces.

Fix: I've fixed it locally by replacing spaces with underscores
	whilst constructing the status file in
	sys/fs/procfs/procfs_status.c.

	The following patch illustrates the idea, but please note that
	it's a hack[tm], not a recommendation:
Comment 1 Mike Barcroft freebsd_committer freebsd_triage 2001-09-27 19:29:29 UTC
State Changed
From-To: open->analyzed


I've fixed the problem in -CURRENT by replacing unprintable characters 
and spaces with their octal form variants.  This will be MFC'd shortly. 


Comment 2 Mike Barcroft freebsd_committer freebsd_triage 2001-09-27 19:29:29 UTC
Responsible Changed
From-To: freebsd-bugs->mike


Over to me.
Comment 3 Mike Barcroft freebsd_committer freebsd_triage 2002-11-10 20:09:28 UTC
State Changed
From-To: analyzed->closed


I never got around to MFCing this.  The originator can MFC it if he 
likes.