* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
@ 2005-11-11 11:45 bob
2005-11-11 14:00 ` tsv
0 siblings, 1 reply; 12+ messages in thread
From: bob @ 2005-11-11 11:45 UTC (permalink / raw)
Somehow I get very strange readings from statvfs() on Alpha.
On Intel
$ python
>>> import os
>>> print os.statvfs('/')
(4096, 4096, 1033182L, 234938L, 182454L, 525888L, 471255L, 471255L, 0, 255)
is correct. "df" with the same blocksize shows the same values
$ df -B 4096 /
Filesystem 4K-blocks Used Available Use% Mounted on
/dev/hdd1 1033182 798244 182454 82% /
But on Alpha
$ python
>>> import os
>>> print os.statvfs('/')
(1024, 1024, 738193209530565, 551989197028090, 469096328178340, 0, 0, 255, 0, 0)
that can't be right, the whole / partition is only 500 MB:
$ df -B 1024 /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 497861 325987 146170 70% /
469096328178340 is not an integer multiple of 146170.
BTW, this is not a python problem, perl Filesys::Statvfs has the
same issues.
Can anybody shed a light on this ?
thanks,
Bert.
--
/* Bert de Bruijn E-mail at home: bert+axp at debruijn.be */
/* * * when there was doubt, I ate it up, and spit it out * * */
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
^ permalink raw reply [flat|nested] 12+ messages in thread* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
2005-11-11 11:45 statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2) bob
@ 2005-11-11 14:00 ` tsv
2005-11-14 6:43 ` tsv
0 siblings, 1 reply; 12+ messages in thread
From: tsv @ 2005-11-11 14:00 UTC (permalink / raw)
Bert de Bruijn wrote:
>
> Somehow I get very strange readings from statvfs() on Alpha.
>
> On Intel
> $ python
>
>>>> import os
>>>> print os.statvfs('/')
>>>
> (4096, 4096, 1033182L, 234938L, 182454L, 525888L, 471255L, 471255L, 0,
> 255)
>
> is correct. "df" with the same blocksize shows the same values
> $ df -B 4096 /
> Filesystem 4K-blocks Used Available Use% Mounted on
> /dev/hdd1 1033182 798244 182454 82% /
>
> But on Alpha
> $ python
>
>>>> import os
>>>> print os.statvfs('/')
>>>
> (1024, 1024, 738193209530565, 551989197028090, 469096328178340, 0, 0,
> 255, 0, 0)
>
> that can't be right, the whole / partition is only 500 MB:
> $ df -B 1024 /
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/sda2 497861 325987 146170 70% /
>
> 469096328178340 is not an integer multiple of 146170.
>
>
> BTW, this is not a python problem, perl Filesys::Statvfs has the same
> issues.
>
>
> Can anybody shed a light on this ?
It seems that it is a problem with python and perl since pure C call to
glibc function returns correct values.
I'll check out since this doen't work in AC2 too.
Thanks,
--
Sergey Tikhonov
Solvo Ltd.
tsv at solvo.ru
^ permalink raw reply [flat|nested] 12+ messages in thread* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
2005-11-11 14:00 ` tsv
@ 2005-11-14 6:43 ` tsv
2005-11-14 6:48 ` tsv
0 siblings, 1 reply; 12+ messages in thread
From: tsv @ 2005-11-14 6:43 UTC (permalink / raw)
Sergey Tikhonov wrote:
> Bert de Bruijn wrote:
>
>>
>> Somehow I get very strange readings from statvfs() on Alpha.
>>
>> On Intel
>> $ python
>>
>>>>> import os
>>>>> print os.statvfs('/')
>>>>
>>>>
>> (4096, 4096, 1033182L, 234938L, 182454L, 525888L, 471255L, 471255L,
>> 0, 255)
>>
>> is correct. "df" with the same blocksize shows the same values
>> $ df -B 4096 /
>> Filesystem 4K-blocks Used Available Use% Mounted on
>> /dev/hdd1 1033182 798244 182454 82% /
>>
>> But on Alpha
>> $ python
>>
>>>>> import os
>>>>> print os.statvfs('/')
>>>>
>>>>
>> (1024, 1024, 738193209530565, 551989197028090, 469096328178340, 0, 0,
>> 255, 0, 0)
>>
>> that can't be right, the whole / partition is only 500 MB:
>> $ df -B 1024 /
>> Filesystem 1K-blocks Used Available Use% Mounted on
>> /dev/sda2 497861 325987 146170 70% /
>>
>> 469096328178340 is not an integer multiple of 146170.
>>
>>
>> BTW, this is not a python problem, perl Filesys::Statvfs has the same
>> issues.
>>
>>
>> Can anybody shed a light on this ?
>
>
> It seems that it is a problem with python and perl since pure C call
> to glibc function returns correct values.
> I'll check out since this doen't work in AC2 too.
Got it. The problem is in glibc with statvfs/statvfs64 functions on
alpha (X86_64 doesn't have such problems).
As far as I understood statvfs64 is mapped to statvfs function on 64 bit
machines, but "struct statvfs" has 32 bits long
fields on alpha if compiled without any specific 64bits macros and the
same fields become 64 bits long if compiled with
-D_LARGEILE64_SOURCE -D_FILE_OFFSET_BITS=64. The problem is that glibc
is compiled with 32 bits long fields,
but packages like python,perl,gnome uses the macros defined above during
building. I might be wrong in my findings, but after
recompilation python and gnome packages started to work.
For now I changed 64-bits fields in /usr/inclide/bits/typesizes.h
(__FSBLKCNT64_T_TYPE and __FSFILECNT64_T_TYPE) from
from __S64_TYPE/__U64_TYPE to __S32_TYPE/__S64_TYPE. Making evething
64-bits would require to rebuild whole AC2 tree. :(
Regards,
--
Sergey Tikhonov
Solvo Ltd.
tsv at solvo.ru
^ permalink raw reply [flat|nested] 12+ messages in thread* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
2005-11-14 6:43 ` tsv
@ 2005-11-14 6:48 ` tsv
2005-11-14 9:37 ` oliver
0 siblings, 1 reply; 12+ messages in thread
From: tsv @ 2005-11-14 6:48 UTC (permalink / raw)
Sergey Tikhonov wrote:
> Sergey Tikhonov wrote:
>
>> Bert de Bruijn wrote:
>>
>>>
>>> Somehow I get very strange readings from statvfs() on Alpha.
>>>
>>> On Intel
>>> $ python
>>>
>>>>>> import os
>>>>>> print os.statvfs('/')
>>>>>
>>>>>
>>>>>
>>> (4096, 4096, 1033182L, 234938L, 182454L, 525888L, 471255L, 471255L,
>>> 0, 255)
>>>
>>> is correct. "df" with the same blocksize shows the same values
>>> $ df -B 4096 /
>>> Filesystem 4K-blocks Used Available Use% Mounted on
>>> /dev/hdd1 1033182 798244 182454 82% /
>>>
>>> But on Alpha
>>> $ python
>>>
>>>>>> import os
>>>>>> print os.statvfs('/')
>>>>>
>>>>>
>>>>>
>>> (1024, 1024, 738193209530565, 551989197028090, 469096328178340, 0,
>>> 0, 255, 0, 0)
>>>
>>> that can't be right, the whole / partition is only 500 MB:
>>> $ df -B 1024 /
>>> Filesystem 1K-blocks Used Available Use% Mounted on
>>> /dev/sda2 497861 325987 146170 70% /
>>>
>>> 469096328178340 is not an integer multiple of 146170.
>>>
>>>
>>> BTW, this is not a python problem, perl Filesys::Statvfs has the
>>> same issues.
>>>
>>>
>>> Can anybody shed a light on this ?
>>
>>
>>
>> It seems that it is a problem with python and perl since pure C call
>> to glibc function returns correct values.
>> I'll check out since this doen't work in AC2 too.
>
>
> Got it. The problem is in glibc with statvfs/statvfs64 functions on
> alpha (X86_64 doesn't have such problems).
> As far as I understood statvfs64 is mapped to statvfs function on 64
> bit machines, but "struct statvfs" has 32 bits long
> fields on alpha if compiled without any specific 64bits macros and the
> same fields become 64 bits long if compiled with
> -D_LARGEILE64_SOURCE -D_FILE_OFFSET_BITS=64. The problem is that glibc
> is compiled with 32 bits long fields,
> but packages like python,perl,gnome uses the macros defined above
> during building. I might be wrong in my findings, but after
> recompilation python and gnome packages started to work.
>
> For now I changed 64-bits fields in /usr/inclide/bits/typesizes.h
> (__FSBLKCNT64_T_TYPE and __FSFILECNT64_T_TYPE) from
> from __S64_TYPE/__U64_TYPE to __S32_TYPE/__S64_TYPE. Making evething
> 64-bits would require to rebuild whole AC2 tree. :(
Sorry: __S64_TYPE/__U64_TYPE to __S32_TYPE/__U32_TYPE
>
> Regards,
>
--
Sergey Tikhonov
Solvo Ltd.
tsv at solvo.ru
^ permalink raw reply [flat|nested] 12+ messages in thread* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
2005-11-14 6:48 ` tsv
@ 2005-11-14 9:37 ` oliver
2005-11-14 17:54 ` michal
0 siblings, 1 reply; 12+ messages in thread
From: oliver @ 2005-11-14 9:37 UTC (permalink / raw)
On 11/14/2005 07:48 AM, Sergey Tikhonov wrote:
[ ... ]
>> Got it. The problem is in glibc with statvfs/statvfs64 functions on
>> alpha (X86_64 doesn't have such problems).
>> As far as I understood statvfs64 is mapped to statvfs function on 64
>> bit machines, but "struct statvfs" has 32 bits long
>> fields on alpha if compiled without any specific 64bits macros and the
>> same fields become 64 bits long if compiled with
>> -D_LARGEILE64_SOURCE -D_FILE_OFFSET_BITS=64. The problem is that glibc
>> is compiled with 32 bits long fields,
>> but packages like python,perl,gnome uses the macros defined above
>> during building. I might be wrong in my findings, but after
>> recompilation python and gnome packages started to work.
>>
>> For now I changed 64-bits fields in /usr/inclide/bits/typesizes.h
>> (__FSBLKCNT64_T_TYPE and __FSFILECNT64_T_TYPE) from
>> from __S64_TYPE/__U64_TYPE to __S32_TYPE/__S64_TYPE. Making evething
>> 64-bits would require to rebuild whole AC2 tree. :(
>
> Sorry: __S64_TYPE/__U64_TYPE to __S32_TYPE/__U32_TYPE
OK, this sounds like a fix, that should hit mainstream as well and maybe
the RH/FC glibc packages (if they're willing to cooperate)... I hope
you're going to post that to the gnu-people?
Best,
Oliver
^ permalink raw reply [flat|nested] 12+ messages in thread
* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
2005-11-14 9:37 ` oliver
@ 2005-11-14 17:54 ` michal
2005-11-14 19:39 ` tsv
0 siblings, 1 reply; 12+ messages in thread
From: michal @ 2005-11-14 17:54 UTC (permalink / raw)
On Mon, Nov 14, 2005 at 10:37:46AM +0100, Oliver Falk wrote:
> On 11/14/2005 07:48 AM, Sergey Tikhonov wrote:
> [ ... ]
> >>
> >>For now I changed 64-bits fields in /usr/inclide/bits/typesizes.h
>
> OK, this sounds like a fix, that should hit mainstream as well
Hm, this sounds more like a workaround for a bug in glibc applied in
order to avoid recompilation of everything which depends on glibc. It
appears that you will get screwed for a change if you will need from
stat values which do not fit into 32 bits. Not that this worked too
well so far. That probably violates some definitions/expectations too.
No idea what long range consequences are one way or another.
Michal
^ permalink raw reply [flat|nested] 12+ messages in thread* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
2005-11-14 17:54 ` michal
@ 2005-11-14 19:39 ` tsv
2005-11-14 23:50 ` oliver
0 siblings, 1 reply; 12+ messages in thread
From: tsv @ 2005-11-14 19:39 UTC (permalink / raw)
Michal Jaegermann wrote:
>On Mon, Nov 14, 2005 at 10:37:46AM +0100, Oliver Falk wrote:
>
>
>>On 11/14/2005 07:48 AM, Sergey Tikhonov wrote:
>>[ ... ]
>>
>>
>>>>For now I changed 64-bits fields in /usr/inclide/bits/typesizes.h
>>>>
>>>>
>>OK, this sounds like a fix, that should hit mainstream as well
>>
>>
>
>Hm, this sounds more like a workaround for a bug in glibc applied in
>order to avoid recompilation of everything which depends on glibc. It
>appears that you will get screwed for a change if you will need from
>stat values which do not fit into 32 bits. Not that this worked too
>well so far. That probably violates some definitions/expectations too.
>No idea what long range consequences are one way or another.
>
>
Yes, you are correct - it is work around. :) It is too late to rebuild
everything.
The correct fix will be in FC5 (devel).
Regards,
Sergey.
^ permalink raw reply [flat|nested] 12+ messages in thread
* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
2005-11-14 19:39 ` tsv
@ 2005-11-14 23:50 ` oliver
2005-11-15 15:13 ` tsv
0 siblings, 1 reply; 12+ messages in thread
From: oliver @ 2005-11-14 23:50 UTC (permalink / raw)
Sergey Tikhonov wrote:
> Michal Jaegermann wrote:
>
>> On Mon, Nov 14, 2005 at 10:37:46AM +0100, Oliver Falk wrote:
>>
>>
>>> On 11/14/2005 07:48 AM, Sergey Tikhonov wrote:
>>> [ ... ]
>>>
>>>>> For now I changed 64-bits fields in /usr/inclide/bits/typesizes.h
>>>>>
>>> OK, this sounds like a fix, that should hit mainstream as well
>>>
>>
>> Hm, this sounds more like a workaround for a bug in glibc applied in
>> order to avoid recompilation of everything which depends on glibc. It
>> appears that you will get screwed for a change if you will need from
>> stat values which do not fit into 32 bits. Not that this worked too
>> well so far. That probably violates some definitions/expectations
>> too. No idea what long range consequences are one way or another.
>>
>>
> Yes, you are correct - it is work around. :) It is too late to rebuild
> everything.
> The correct fix will be in FC5 (devel).
Oh yes, my mistake. I wanted Sergey to post the _real fix_ to
glibc-people; Of course not the workaround... :-)
-of
^ permalink raw reply [flat|nested] 12+ messages in thread
* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
2005-11-14 23:50 ` oliver
@ 2005-11-15 15:13 ` tsv
2005-11-15 15:46 ` michal
0 siblings, 1 reply; 12+ messages in thread
From: tsv @ 2005-11-15 15:13 UTC (permalink / raw)
Oliver Falk wrote:
> Sergey Tikhonov wrote:
>
>> Michal Jaegermann wrote:
>>
>>> On Mon, Nov 14, 2005 at 10:37:46AM +0100, Oliver Falk wrote:
>>>
>>>
>>>> On 11/14/2005 07:48 AM, Sergey Tikhonov wrote:
>>>> [ ... ]
>>>>
>>>>
>>>>>> For now I changed 64-bits fields in /usr/inclide/bits/typesizes.h
>>>>>>
>>>>>
>>>> OK, this sounds like a fix, that should hit mainstream as well
>>>>
>>>
>>>
>>> Hm, this sounds more like a workaround for a bug in glibc applied in
>>> order to avoid recompilation of everything which depends on glibc. It
>>> appears that you will get screwed for a change if you will need from
>>> stat values which do not fit into 32 bits. Not that this worked too
>>> well so far. That probably violates some definitions/expectations
>>> too. No idea what long range consequences are one way or another.
>>>
>>>
>> Yes, you are correct - it is work around. :) It is too late to
>> rebuild everything.
>> The correct fix will be in FC5 (devel).
>
>
> Oh yes, my mistake. I wanted Sergey to post the _real fix_ to
> glibc-people; Of course not the workaround... :-)
I submitted a bug report to glibc bugzilla. The problem is (with recent
findings from Bert de Bruijn) I am not sure what correct
fix should be. Back in 1999 the size of fields were changed from 64 bits
to 32.
Regards,
--
Sergey Tikhonov
Solvo Ltd.
tsv at solvo.ru
^ permalink raw reply [flat|nested] 12+ messages in thread
* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
2005-11-15 15:13 ` tsv
@ 2005-11-15 15:46 ` michal
2005-11-15 16:15 ` tsv
0 siblings, 1 reply; 12+ messages in thread
From: michal @ 2005-11-15 15:46 UTC (permalink / raw)
On Tue, Nov 15, 2005 at 06:13:27PM +0300, Sergey Tikhonov wrote:
>
> I submitted a bug report to glibc bugzilla. The problem is (with recent
> findings from Bert de Bruijn) I am not sure what correct
> fix should be. Back in 1999 the size of fields were changed from 64 bits
> to 32.
Did he tell you why? An attempt of compatibility with 32-bit programs
compiled for DU? Those were not linked with glibc anyway. Some other
reasons? What is a status of fields in question on other 64-bit
platforms served by glibc?
MIchal
^ permalink raw reply [flat|nested] 12+ messages in thread
* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
2005-11-15 15:46 ` michal
@ 2005-11-15 16:15 ` tsv
2005-11-15 16:26 ` michal
0 siblings, 1 reply; 12+ messages in thread
From: tsv @ 2005-11-15 16:15 UTC (permalink / raw)
Michal Jaegermann wrote:
>On Tue, Nov 15, 2005 at 06:13:27PM +0300, Sergey Tikhonov wrote:
>
>
>>I submitted a bug report to glibc bugzilla. The problem is (with recent
>>findings from Bert de Bruijn) I am not sure what correct
>>fix should be. Back in 1999 the size of fields were changed from 64 bits
>>to 32.
>>
>>
>
>Did he tell you why? An attempt of compatibility with 32-bit programs
>compiled for DU? Those were not linked with glibc anyway. Some other
>reasons? What is a status of fields in question on other 64-bit
>platforms served by glibc?
>
>
It was done for glibc version 2.0.109 to make "df" program to produce
the correct results.
X86_64 has fields 64 bits long in both modes.
We will see what Ulrich Drepper would say about the problem.
Regards,
--
Sergey Tikhonov
Solvo Ltd.
tsv at solvo.ru
^ permalink raw reply [flat|nested] 12+ messages in thread
* statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2)
2005-11-15 16:15 ` tsv
@ 2005-11-15 16:26 ` michal
0 siblings, 0 replies; 12+ messages in thread
From: michal @ 2005-11-15 16:26 UTC (permalink / raw)
On Tue, Nov 15, 2005 at 07:15:40PM +0300, Sergey Tikhonov wrote:
> Michal Jaegermann wrote:
>
> >On Tue, Nov 15, 2005 at 06:13:27PM +0300, Sergey Tikhonov wrote:
> >
> >
> >>I submitted a bug report to glibc bugzilla. The problem is (with recent
> >>findings from Bert de Bruijn) I am not sure what correct
> >>fix should be. Back in 1999 the size of fields were changed from 64 bits
> >>to 32.
> >>
> >>
> >
> >Did he tell you why? An attempt of compatibility with 32-bit programs
> >compiled for DU? Those were not linked with glibc anyway. Some other
> >reasons? What is a status of fields in question on other 64-bit
> >platforms served by glibc?
> >
> >
> It was done for glibc version 2.0.109 to make "df" program to produce
> the correct results.
Instead of fixing "df"? Amazing. This was bound to produce more
problems, both of the kind you were seeing recently and others,
elsewhere.
> X86_64 has fields 64 bits long in both modes.
That is exactly like I would expect them to look like in the context.
BTW - "df" on x86_64 does not have any problems with displaying correct
results; at least on current installations.
Michal
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-11-15 16:26 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-11 11:45 statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2) bob
2005-11-11 14:00 ` tsv
2005-11-14 6:43 ` tsv
2005-11-14 6:48 ` tsv
2005-11-14 9:37 ` oliver
2005-11-14 17:54 ` michal
2005-11-14 19:39 ` tsv
2005-11-14 23:50 ` oliver
2005-11-15 15:13 ` tsv
2005-11-15 15:46 ` michal
2005-11-15 16:15 ` tsv
2005-11-15 16:26 ` michal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox