* Can't access /proc file for writing
@ 2005-05-19 6:24 Miguel Angelo Rozsas
2005-05-19 6:24 ` Jean Delvare
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Miguel Angelo Rozsas @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
Hi There !
Anyone can you help me, please ?
My system is a ASUS P4T, P4 1.4GHz, running RH9, with the last stable
kernel 2.4.22 (from kernel.org), whith the linux-2.4.22-i2c-2.8.1.patch
patch applied and lm_sensors-2.8.1.tar.gz installed.
Output of sensors-detect:
BIOS vendor (ACPI): ASUS
System vendor (DMI): System Manufacturer
BIOS version (DMI): ASUS P4T ACPI BIOS Revision 1005
We can start with probing for (PCI) I2C or SMBus adapters.
You do not need any special privileges for this.
Do you want to probe now? (YES/no):
Probing for PCI bus adapters...
Use driver `i2c-i801' for device 00:1f.3: Intel 82801BA ICH2
Probe succesfully concluded.
I have no problem following the instructions on
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/QUICKSTART, except when
I have tried to do:
# sensors -s
as99127f-i2c-0-2d: Can't access /proc file for writing;
Run as root?
#
Looking at /proc/bus I've noticed that i2c* are 0444 !
# ls -l /proc/bus/i2c*
-r--r--r-- 1 root root 0 Nov 2 00:11 /proc/bus/i2c
-r--r--r-- 1 root root 0 Nov 2 00:11 /proc/bus/i2c-0
running just sensors, looks like fine (...almost...Why -12V and -5V
readings are wrong ?):
# sensors
as99127f-i2c-0-2d
Adapter: SMBus I801 adapter at e800
Algorithm: Non-I2C SMBus adapter
VCore 1: +1.70 V (min = +1.58 V, max = +1.92 V)
VCore 2: +1.82 V (min = +1.58 V, max = +1.92 V)
+3.3V: +3.36 V (min = +2.98 V, max = +3.63 V)
+5V: +5.06 V (min = +4.52 V, max = +5.48 V)
+12V: +12.16 V (min = +10.83 V, max = +13.15 V)
-12V: -2.30 V (min = -15.06 V, max = -12.32 V)
-5V: -1.23 V (min = -5.49 V, max = -4.50 V)
fan1: 0 RPM (min = 3000 RPM, div = 2)
fan2: 0 RPM (min = 3000 RPM, div = 2)
fan3: 5037 RPM (min = 3000 RPM, div = 2)
temp1: +45?C (limit = +60?C)
temp2: +42.0?C (limit = +120?C, hysteresis = +100?C)
temp3: +255.4?C (limit = +120?C, hysteresis = +100?C)
vid: +1.750 V
alarms:
beep_enable:
Sound alarm enabled
eeprom-i2c-0-50
Adapter: SMBus I801 adapter at e800
Algorithm: Non-I2C SMBus adapter
eeprom-i2c-0-51
Adapter: SMBus I801 adapter at e800
Algorithm: Non-I2C SMBus adapter
eeprom-i2c-0-52
Adapter: SMBus I801 adapter at e800
Algorithm: Non-I2C SMBus adapter
eeprom-i2c-0-53
Adapter: SMBus I801 adapter at e800
Algorithm: Non-I2C SMBus adapter
Finally the questions:
1) Why the permissions for /proc/bus/i2c* are 0444 ?
2) Why the reading for-12V and -5V are wrong ?
How can fix this ?
any help will be appreciated.
thanks in advance,
PS: Sorry any mistakes in my text. English isn't my native language.
--
Miguel Angelo Rozsas
miguel@rozsas.xx.nom.br
^ permalink raw reply [flat|nested] 8+ messages in thread
* Can't access /proc file for writing
2005-05-19 6:24 Can't access /proc file for writing Miguel Angelo Rozsas
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Miguel Angelo Rozsas
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
> Anyone can you help me, please ?
I'll do my best.
> My system is a ASUS P4T, P4 1.4GHz, running RH9, with the last
> stable kernel 2.4.22 (from kernel.org), whith the
> linux-2.4.22-i2c-2.8.1.patch patch applied and
> lm_sensors-2.8.1.tar.gz installed.
Looks OK. Any additional patch (ACL, GRSEC) applied?
> Looking at /proc/bus I've noticed that i2c* are 0444 !
That's perfectly normal, see below.
> running just sensors, looks like fine (...almost...Why -12V and -5V
> readings are wrong ?):
Either because "sensors -s" failed, or because these voltages aren't
used on your system (most systems don't use these voltages anymore, so
some don't bother monitoring them).
> 1) Why the permissions for /proc/bus/i2c* are 0444 ?
This is normal. These files only advertise about existing busses. Real
files are in /proc/sys/dev/sensors.
> 2) Why the reading for-12V and -5V are wrong ?
> How can fix this ?
Move to /proc/sys/dev/sensors, and show us what "ls -lR" returns.
We have had half a dozen reports of problems similar to yours, and I
have to say we never really found what was causing the problem (so
couldn't solve it). If you system is specific in any way, please let us
know (of course, i's hard to say what "specific" means here, since we
don't really know what we're after).
> PS: Sorry any mistakes in my text. English isn't my native language.
It's not mine either, but we understand each other, isn't it? :)
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Can't access /proc file for writing
2005-05-19 6:24 Can't access /proc file for writing Miguel Angelo Rozsas
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Miguel Angelo Rozsas
@ 2005-05-19 6:24 ` Miguel Angelo Rozsas
2005-05-19 6:24 ` Miguel Angelo Rozsas
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Miguel Angelo Rozsas @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
Hi Jean, thanks for answered !
On Sun, 2003-11-02 at 07:52, Jean Delvare wrote:
> > Anyone can you help me, please ?
>
> I'll do my best.
>
> > My system is a ASUS P4T, P4 1.4GHz, running RH9, with the last
> > stable kernel 2.4.22 (from kernel.org), whith the
> > linux-2.4.22-i2c-2.8.1.patch patch applied and
> > lm_sensors-2.8.1.tar.gz installed.
>
> Looks OK. Any additional patch (ACL, GRSEC) applied?
No, just the vanilla kernel from kernel.org and the i2c patches.
>
> Either because "sensors -s" failed, or because these voltages aren't
> used on your system (most systems don't use these voltages anymore, so
> some don't bother monitoring them).
I think is because "sensors -s" failed. I have a virtual machine powered
by vmware and in the the BIOS setup has a option to show theses values
and I can read right now, -11.9V and -4.98V...
The comments in the /etc/sensors.conf in the section for the
"as99127f-*" chipset, say the formulas are just a guess, because ASUS
won't released a datasheet for this chipset.
With the virtual machine help, I believe I can figure out a more precise
formula for theses readings. For this, I need to set up values with
"sensors -s", Am I right ? If I will successfully, I can contribute back
to community, with more precise configuration lines for this particular
system.
>
> > 1) Why the permissions for /proc/bus/i2c* are 0444 ?
>
> This is normal. These files only advertise about existing busses. Real
> files are in /proc/sys/dev/sensors.
> Move to /proc/sys/dev/sensors, and show us what "ls -lR" returns.
>
Too long to put in-line. I am sending as an attached file.
> We have had half a dozen reports of problems similar to yours, and I
> have to say we never really found what was causing the problem (so
> couldn't solve it). If you system is specific in any way, please let us
> know (of course, i's hard to say what "specific" means here, since we
> don't really know what we're after).
>
No, nothing cross my mind....I have a DVD, a IDE_ZIP, a NVidia card,the
last patch for the BIOS and I am using XD2 (Ximian Desktop 2). I think
is worth to mention that in single user mode, the umask is 022. I
expected 222 to explain theses permissions....
> > PS: Sorry any mistakes in my text. English isn't my native language.
>
> It's not mine either, but we understand each other, isn't it? :)
I'm glad we did ! My English is far better than my French ! I visit
Toullouse/France several years ago, and without the help of a friend of
mine I was in trouble even for the basic needs. :-o I loved France, by
the way (in special, the country side in the spring - too beautiful) and
I hope to return to have a romantic time with my wife ;-)
best regards from Brazil,
--
Miguel Angelo Rozsas
miguel@rozsas.xx.nom.br
-------------- next part --------------
^[[00m/proc/sys/dev/sensors/:
total 0
dr-xr-xr-x 2 root root 0 Nov 2 13:38 ^[[00;34mas99127f-i2c-0-2d^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mchips^[[00m
dr-xr-xr-x 2 root root 0 Nov 2 13:38 ^[[00;34meeprom-i2c-0-50^[[00m
dr-xr-xr-x 2 root root 0 Nov 2 13:38 ^[[00;34meeprom-i2c-0-51^[[00m
dr-xr-xr-x 2 root root 0 Nov 2 13:38 ^[[00;34meeprom-i2c-0-52^[[00m
dr-xr-xr-x 2 root root 0 Nov 2 13:38 ^[[00;34meeprom-i2c-0-53^[[00m
/proc/sys/dev/sensors/as99127f-i2c-0-2d:
total 0
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00malarms^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mbeep^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mfan1^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mfan2^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mfan3^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mfan_div^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00min0^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00min1^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00min2^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00min3^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00min4^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00min5^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00min6^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mpwm1^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mpwm2^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mtemp1^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mtemp2^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mtemp3^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mvid^[[00m
-rw-r--r-- 1 root root 0 Nov 2 13:38 ^[[00mvrm^[[00m
/proc/sys/dev/sensors/eeprom-i2c-0-50:
total 0
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m00^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m10^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m20^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m30^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m40^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m50^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m60^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m70^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m80^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m90^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00ma0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mb0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mc0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00md0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00me0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mf0^[[00m
/proc/sys/dev/sensors/eeprom-i2c-0-51:
total 0
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m00^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m10^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m20^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m30^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m40^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m50^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m60^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m70^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m80^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m90^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00ma0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mb0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mc0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00md0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00me0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mf0^[[00m
/proc/sys/dev/sensors/eeprom-i2c-0-52:
total 0
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m00^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m10^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m20^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m30^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m40^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m50^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m60^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m70^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m80^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m90^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00ma0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mb0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mc0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00md0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00me0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mf0^[[00m
/proc/sys/dev/sensors/eeprom-i2c-0-53:
total 0
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m00^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m10^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m20^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m30^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m40^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m50^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m60^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m70^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m80^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00m90^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00ma0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mb0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mc0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00md0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00me0^[[00m
-r--r--r-- 1 root root 0 Nov 2 13:38 ^[[00mf0^[[00m
^[[m
^ permalink raw reply [flat|nested] 8+ messages in thread
* Can't access /proc file for writing
2005-05-19 6:24 Can't access /proc file for writing Miguel Angelo Rozsas
` (3 preceding siblings ...)
2005-05-19 6:24 ` Miguel Angelo Rozsas
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
> The comments in the /etc/sensors.conf in the section for the
> "as99127f-*" chipset, say the formulas are just a guess, because ASUS
> won't released a datasheet for this chipset.
>
> With the virtual machine help, I believe I can figure out a more
> precise formula for theses readings. For this, I need to set up values
> with"sensors -s", Am I right ? If I will successfully, I can
> contribute back to community, with more precise configuration lines
> for this particular system.
That would be interesting for sure, but we have to solve the /proc
problem before.
> > Move to /proc/sys/dev/sensors, and show us what "ls -lR" returns.
>
> Too long to put in-line. I am sending as an attached file.
OK, file permissions look good (most files have mode 644, which means
you are supposed to be allowed to write to them). Now I'd like you to
try actually writing to a file. For example, go to
/proc/sys/dev/sensors/as99127f-i2c-0-2d and do:
echo 70 > temp1
Then run sensors. Temp1's limit should now be 70 instead of 60.
If it works, this means that libsensors is having trouble.
If it doesn't, this means that the /proc interface itself is having
trouble.
> I think is worth to mention that in single user mode, the umask is
> 022. I expected 222 to explain theses permissions....
The mask as you set it in your shell is completely independant from the
/proc files permissions, which are set by the drivers.
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Can't access /proc file for writing
2005-05-19 6:24 Can't access /proc file for writing Miguel Angelo Rozsas
` (2 preceding siblings ...)
2005-05-19 6:24 ` Miguel Angelo Rozsas
@ 2005-05-19 6:24 ` Miguel Angelo Rozsas
2005-05-19 6:24 ` Jean Delvare
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Miguel Angelo Rozsas @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
On Sun, 2003-11-02 at 17:17, Jean Delvare wrote:
>
> That would be interesting for sure, but we have to solve the /proc
> problem before.
>
Yes, I agree.
> OK, file permissions look good (most files have mode 644, which means
> you are supposed to be allowed to write to them). Now I'd like you to
> try actually writing to a file. For example, go to
> /proc/sys/dev/sensors/as99127f-i2c-0-2d and do:
> echo 70 > temp1
>
Yes, it worked. I think I triggered some alarm or something like that.
The internal speaker started to beep, but the things goes back to the
normal after I echoed the previous value back to temp1. (Yes, I do "cat
temp1", first ). Currently the temp1 value is "60.0 127.0 40.0".
I set vrm to 9.0 too, without changes....
> Then run sensors. Temp1's limit should now be 70 instead of 60.
Playing with others variables, like In5_min and In5_max, I can see
changes in the output of sensors.
>
> If it works, this means that libsensors is having trouble.
>
Is it fine the directories have permissions 0444 ? The error message
show a write problem with the 0444 directory as99127f-i2c-0-2d, not with
the files...just a idea, in case you haven't noticed....
For your convenience, the error message was:
# sensors -s
as99127f-i2c-0-2d: Can't access /proc file for writing;
Run as root?
#
> If it doesn't, this means that the /proc interface itself is having
> trouble.
>
> > I think is worth to mention that in single user mode, the umask is
> > 022. I expected 222 to explain theses permissions....
>
> The mask as you set it in your shell is completely independant from the
> /proc files permissions, which are set by the drivers.
I see.
If you have a beta code, I will be happy to test in my system.
This is my personal workstation, so testing a beta code would be fine (I
hope !).
However, I prefer to not test an alpha code because the risk to damage
my system beyond repair is too much for me. You know, I don't have a
tape for take a full backup, just the essential in CDR and Zip disks.
Let me know if I can help, or if you want some more information.
thank you for your help so far,
--
Miguel Angelo Rozsas
miguel@rozsas.xx.nom.br
^ permalink raw reply [flat|nested] 8+ messages in thread
* Can't access /proc file for writing
2005-05-19 6:24 Can't access /proc file for writing Miguel Angelo Rozsas
` (4 preceding siblings ...)
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
> > OK, file permissions look good (most files have mode 644, which
> > means you are supposed to be allowed to write to them). Now I'd like
> > you to try actually writing to a file. For example, go to
> > /proc/sys/dev/sensors/as99127f-i2c-0-2d and do:
> > echo 70 > temp1
>
> Yes, it worked. I think I triggered some alarm or something like that.
> The internal speaker started to beep, but the things goes back to the
> normal after I echoed the previous value back to temp1. (Yes, I do
> "cat temp1", first ). Currently the temp1 value is "60.0 127.0 40.0".
OK, so the /proc interface is OK, which means the library is causing the
trouble.
> I set vrm to 9.0 too, without changes....
The VRM setting only impacts the VID computing, which in turns only
impacts VCore's limits.
> Is it fine the directories have permissions 0444 ? The error message
> show a write problem with the 0444 directory as99127f-i2c-0-2d, not
> with the files...just a idea, in case you haven't noticed....
> For your convenience, the error message was:
>
> # sensors -s
> as99127f-i2c-0-2d: Can't access /proc file for writing;
> Run as root?
The message was about the chip id. It happens that the directory is
named after the chip id, still the directory's permissions are OK. Write
permission to a directory allows you to create files there, and that's
not something that can happen on the /proc virtual filesystem.
Could you please run "strace sensors -s 2> /tmp/sensors-s.strace" (as
root) and send us the /tmp? I don't know much about strace but I
remember that it's what we asked last time a similar problem was
reported ;) Maybe someone else on the list will be able to interpret the
trace.
Thanks.
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Can't access /proc file for writing
2005-05-19 6:24 Can't access /proc file for writing Miguel Angelo Rozsas
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Miguel Angelo Rozsas
2005-05-19 6:24 ` Miguel Angelo Rozsas
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Miguel Angelo Rozsas @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
On Mon, 2003-11-03 at 19:00, Jean Delvare wrote:
>
> Could you please run "strace sensors -s 2> /tmp/sensors-s.strace" (as
> root) and send us the /tmp? I don't know much about strace but I
> remember that it's what we asked last time a similar problem was
> reported ;) Maybe someone else on the list will be able to interpret the
> trace.
Hi !
The strace for "sensors -s" is attached.
I hope you guys can figure out what is happening.
I don't understand the strace either, but I saw several "Inappropriate
ioctl for device" and "(Permission denied)" messages in the output.
Please, let me know if you need something else, ok ?
Many thanks for the help.
[]s,
--
Miguel Angelo Rozsas
miguel@rozsas.xx.nom.br
-------------- next part --------------
execve("/usr/local/bin/sensors", ["/usr/local/bin/sensors", "-s"], [/* 39 vars */]) = 0
uname({sys="Linux", node="hahasiah.rozsas.xx.nom.br", ...}) = 0
brk(0) = 0x8060728
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size‰964, ...}) = 0
old_mmap(NULL, 89964, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3) = 0
open("/usr/local/lib/libsensors.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\214R\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size\x116278, ...}) = 0
old_mmap(NULL, 177220, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002d000
old_mmap(0x4003a000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xc000) = 0x4003a000
old_mmap(0x40048000, 66628, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40048000
close(3) = 0
open("/lib/i686/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300Z\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size\x1548424, ...}) = 0
old_mmap(NULL, 1275588, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40059000
old_mmap(0x4018b000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x132000) = 0x4018b000
old_mmap(0x4018e000, 9924, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4018e000
close(3) = 0
open("/lib/i686/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\2004\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size!2020, ...}) = 0
old_mmap(NULL, 138496, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40191000
old_mmap(0x401b2000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x20000) = 0x401b2000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x401b3000
munmap(0x40017000, 89964) = 0
brk(0) = 0x8060728
brk(0x8061728) = 0x8061728
brk(0) = 0x8061728
brk(0x8062000) = 0x8062000
open("/etc/sensors.conf", O_RDONLY) = 3
_sysctl({{CTL_DEV, 2, 1}, 3, 0x40047340, 200, (nil), 0}) = 0
open("/proc/bus/i2c", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
read(4, "i2c-0\tsmbus \tSMBus I801 adapt"..., 4096) = 82
read(4, "", 4096) = 0
close(4) = 0
munmap(0x40017000, 4096) = 0
brk(0) = 0x8062000
brk(0x8065000) = 0x8065000
ioctl(3, SNDCTL_TMR_TIMEBASE, 0xbfffe780) = -1 ENOTTY (Inappropriate ioctl for device)
fstat64(3, {st_mode=S_IFREG|0644, st_sizeC659, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
read(3, "# Sensors configuration file use"..., 8192) = 8192
read(3, "were detected first, \'i2c-0\' in\n"..., 8192) = 8192
brk(0) = 0x8065000
brk(0x8066000) = 0x8066000
brk(0) = 0x8066000
brk(0x8067000) = 0x8067000
brk(0) = 0x8067000
brk(0x8068000) = 0x8068000
brk(0) = 0x8068000
brk(0x8069000) = 0x8069000
read(3, "6_max -5 * 0.95\n set in6_min "..., 8192) = 8192
brk(0) = 0x8069000
brk(0x806a000) = 0x806a000
brk(0) = 0x806a000
brk(0x806b000) = 0x806b000
brk(0) = 0x806b000
brk(0x806c000) = 0x806c000
brk(0) = 0x806c000
brk(0x806d000) = 0x806d000
brk(0) = 0x806d000
brk(0x806e000) = 0x806e000
read(3, "OS.\n# Likewise, Johannes Drechse"..., 8192) = 8192
brk(0) = 0x806e000
brk(0x806f000) = 0x806f000
read(3, "e reversed on your board, this i"..., 8192) = 8192
brk(0) = 0x806f000
brk(0x8070000) = 0x8070000
brk(0) = 0x8070000
brk(0x8071000) = 0x8071000
brk(0) = 0x8071000
brk(0x8072000) = 0x8072000
read(3, " \"vt1211-*\" \"vt8231-*\"\n#\n# temp1"..., 8192) = 2699
read(3, "", 4096) = 0
brk(0) = 0x8072000
brk(0x8073000) = 0x8073000
read(3, "", 8192) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE, 0xbfffe770) = -1 ENOTTY (Inappropriate ioctl for device)
_sysctl({{CTL_DEV, 2, 100, 515}, 4, 0x40047340, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 515}, 4, (nil), 134725272, 0x40047340, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 514}, 4, 0x40047340, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e8}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e8}, 4, (nil), 134725272, 0x40047340, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 514}, 4, 0x40047340, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e8}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e8}, 4, (nil), 134725272, 0x40047340, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 514}, 4, 0x40047340, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e9}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e9}, 4, (nil), 134725272, 0x40047340, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 514}, 4, 0x40047340, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e9}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e9}, 4, (nil), 134725272, 0x40047340, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 3ea}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3ea}, 4, (nil), 134725272, 0x40047340, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 3ea}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3ea}, 4, (nil), 134725272, 0x40047340, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 3eb}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3eb}, 4, (nil), 134725272, 0x40047340, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 3eb}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3eb}, 4, (nil), 134725272, 0x40047340, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 3ec}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3ec}, 4, (nil), 134725272, 0x40047340, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 3ec}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3ec}, 4, (nil), 134725272, 0x40047340, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 3ed}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3ed}, 4, (nil), 134725272, 0x40047340, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 3ed}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3ed}, 4, (nil), 134725272, 0x40047340, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 3ee}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3ee}, 4, (nil), 134725272, 0x40047340, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 3ee}, 4, 0x40047340, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3ee}, 4, (nil), 134725272, 0x40047340, 8}) = -1 EACCES (Permission denied)
write(2, "as99127f-i2c-0-2d: Can\'t access "..., 56as99127f-i2c-0-2d: Can't access /proc file for writing;
) = 56
write(2, "Run as root?\n", 13Run as root?
) = 13
exit_group(1) = ?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Can't access /proc file for writing
2005-05-19 6:24 Can't access /proc file for writing Miguel Angelo Rozsas
` (5 preceding siblings ...)
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Jean Delvare
6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
Hi again Miguel,
Sorry for the delay, it took a while before I could get some spare time
to learn how to use strace. Now I know enough to help.
> The strace for "sensors -s" is attached.
> I hope you guys can figure out what is happening.
> I don't understand the strace either, but I saw several
> "Inappropriate ioctl for device" and "(Permission denied)"
> messages in the output.
The "Inappropriate ioctl for device" is normal (in the sense it also
happens on systems where "sensors -s" doesn't fail). The problem is with
the "(Permission denied)". That said, your strace output doesn't reveal
anything. The sysctl calls are failing, but it doesn't show why.
> Please, let me know if you need something else, ok ?
I do. As I was stracing sensors, I found and fixed a couple of problems,
mainly memory leaks. Also, other changes were made to support sysfs
(Linux 2.6). Although we did not explicitely fix your problem, there
might have been some side effects. So, I'd like you to check the latest
versions of i2c and lm_sensors2 out of CVS, and give it a try. Don't
forget to run "ldconfig" after installing lm_sensors, since the library
version changed.
With that new version installed, I'd like you to retry "sensors -s". If
it still doesn't work, I'd like you to provide the strace output anew.
If it isn't significantly different from the first time, please apply
the attached patch (move in lm_sensors2 and run "patch -p0 <
lib-proc.diff), compile again, install again, and strace again. It might
reveal something interesting.
> Many thanks for the help.
You're welcome. I hope we'll find something. If the operations above
don't lead us anywhere, there is another thing we might try. We'll see
then.
Thanks.
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
-------------- next part --------------
Index: lib/proc.c
=================================RCS file: /home/cvs/lm_sensors2/lib/proc.c,v
retrieving revision 1.18
diff -u -r1.18 proc.c
--- lib/proc.c 24 Nov 2003 20:18:47 -0000 1.18
+++ lib/proc.c 24 Nov 2003 20:22:57 -0000
@@ -18,6 +18,7 @@
*/
#include <stddef.h>
+#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <sys/sysctl.h>
@@ -358,6 +359,10 @@
value /= 10.0;
* ((long *) (buf + the_feature->offset)) = (long) value;
buflen = the_feature->offset + sizeof(long);
+ getuid();
+ geteuid();
+ getgid();
+ getegid();
if (sysctl(sysctl_name, 4, NULL, 0, buf, buflen))
return -SENSORS_ERR_PROC;
}
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-05-19 6:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19 6:24 Can't access /proc file for writing Miguel Angelo Rozsas
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Miguel Angelo Rozsas
2005-05-19 6:24 ` Miguel Angelo Rozsas
2005-05-19 6:24 ` Miguel Angelo Rozsas
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.