Bug 144459

Summary: sysctl reports error: unknown error <...> reading key '<key>'
Product: [Fedora] Fedora Reporter: Peter Bieringer <pb>
Component: procpsAssignee: Karel Zak <kzak>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: albert, borgan, kzak, redhat-bugzilla, reuben-redhatbugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-26 11:13:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Bieringer 2005-01-07 11:05:24 UTC
Description of problem:
sysctl reports strange error messages

Version-Release number of selected component (if applicable):
procps-3.2.3-5

How reproducible:
Always

Steps to Reproduce:
1. sysctl -a >/dev/null
    

Actual Results:  One box running FC3 (2.6.9-1.724_FC3)

# sysctl -a >/dev/null
error: unknown error 22 reading key 'net.ipv6.route.flush'
error: unknown error 22 reading key 'net.ipv4.route.flush'
error: unknown error 22 reading key 'fs.binfmt_misc.register'

Other box running FC3 (2.6.9-1.681_FC3)
# sysctl -a >/dev/null
error: unknown error 25 reading key 'dev.parport.parport0.autoprobe3'
error: unknown error 25 reading key 'dev.parport.parport0.autoprobe2'
error: unknown error 25 reading key 'dev.parport.parport0.autoprobe1'
error: unknown error 25 reading key 'dev.parport.parport0.autoprobe0'
error: unknown error 25 reading key 'dev.parport.parport0.autoprobe'
error: unknown error 22 reading key 'net.ipv6.route.flush'
error: unknown error 22 reading key 'net.ipv4.route.flush'
error: unknown error 22 reading key 'fs.binfmt_misc.registe


Expected Results:  Not such strange error messages, in FC2 I don't get
them.

Comment 1 Karel Zak 2005-01-07 12:55:37 UTC
The problem with error 22 is common (see google:
"/proc/sys/net/ipv4/route/flush Invalid argument" or "cat
/proc/sys/net/ipv4/route/flush").

The rest will fixed.

Comment 2 Karel Zak 2005-01-07 13:11:14 UTC
The bugfix will available in FC-4 (or in the current devel branch).

Comment 3 Robert Scheck 2005-01-28 18:52:54 UTC
I get the following anyway...could this also please fixed?

error: unknown error 22 reading key 'net.ipv6.route.flush'
error: unknown error 22 reading key 'net.ipv4.route.flush'

Comment 4 Karel Zak 2005-01-29 08:41:11 UTC
No. I have no idea how fix it. See comment #1

Comment 5 Karel Zak 2005-01-29 09:11:19 UTC
Note: small change is the next upstream release where it produces

error: "Invalid argument" reading key "net.ipv4.route.flush"

I will release 3.2.5 as soon as possible.

Comment 6 Karel Zak 2005-01-29 09:12:03 UTC
*** Bug 146534 has been marked as a duplicate of this bug. ***

Comment 7 Karel Zak 2005-04-25 11:53:20 UTC
*** Bug 152435 has been marked as a duplicate of this bug. ***

Comment 8 Karel Zak 2005-04-25 11:55:04 UTC
*** Bug 150807 has been marked as a duplicate of this bug. ***

Comment 9 Karel Zak 2005-04-25 12:06:05 UTC
It looks it's old story in linux kernel:

  http://lkml.org/lkml/2000/1/21/116
  http://lkml.org/lkml/2000/1/22/164  
  http://lkml.org/lkml/2000/1/23/29

We need some common way how detect which files from /proc/sys are write-only. I
agree that files in /proc/sys that cannot be read should not be +r.  

For example:

#ls -la /proc/sys/net/ipv4/route/flush
-rw-r--r--  1 root root 0 Apr 25 13:07 /proc/sys/net/ipv4/route/flush
# cat /proc/sys/net/ipv4/route/flush
cat: /proc/sys/net/ipv4/route/flush: Invalid argument

It's problem in all our kernels and distributions.


Comment 10 Dave Jones 2005-04-25 16:25:23 UTC
I've fixed up net and parport entries. They'll be mode 0200 in the next builds.
However, /proc/sys/fs/binfmt_misc/register is already mode 0200, and the warning
above shows, so there's still something not right in procps if its trying to
read files listed as --w------



Comment 11 Karel Zak 2005-04-25 16:59:34 UTC
Thanks. The command 'sysctl' doesn't check modes yet. I want to fix it in the
next build.

Comment 12 Karel Zak 2005-04-26 11:13:43 UTC
Fixed in FC-4. I don't want to fix it in old distributions (<=FC-3, <=RHEL4), it
could be a regression problem and the old kernels don't export /proc/sys
write-only files with the right mode.