Bug 144459 - sysctl reports error: unknown error <...> reading key '<key>'
sysctl reports error: unknown error <...> reading key '<key>'
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: procps (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Brian Brock
:
: 146534 150807 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-07 06:05 EST by Peter Bieringer
Modified: 2007-11-30 17:10 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-26 07:13:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Bieringer 2005-01-07 06:05:24 EST
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 07:55:37 EST
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 08:11:14 EST
The bugfix will available in FC-4 (or in the current devel branch).
Comment 3 Robert Scheck 2005-01-28 13:52:54 EST
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 03:41:11 EST
No. I have no idea how fix it. See comment #1
Comment 5 Karel Zak 2005-01-29 04:11:19 EST
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 04:12:03 EST
*** Bug 146534 has been marked as a duplicate of this bug. ***
Comment 7 Karel Zak 2005-04-25 07:53:20 EDT
*** Bug 152435 has been marked as a duplicate of this bug. ***
Comment 8 Karel Zak 2005-04-25 07:55:04 EDT
*** Bug 150807 has been marked as a duplicate of this bug. ***
Comment 9 Karel Zak 2005-04-25 08:06:05 EDT
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 12:25:23 EDT
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 12:59:34 EDT
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 07:13:43 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.