[Haskell-cafe] Re: Does readFile "/proc/mounts" hang for you?
Thomas DuBuisson
thomas.dubuisson at gmail.com
Wed Jan 21 21:13:25 EST 2009
Strace tells me that its doing some crazy IO control:
"""
...
open("/proc/mounts", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7ffff7470b70) = -1 ENOTTY
(Inappropriate ioctl for device)
select(4, [3], [], NULL, {0, 0}) = 0 (Timeout)
select(4, [3], [], NULL, {134, 217727} <unfinished ...>
"""
I'm too rusty on any sort of low level work to draw meaning out of
this without work, but...
See that failed ioctl that seems to be completely ignored, right
before hanging in our 'select' call?
And see the select call that says 'wait 134 seconds'? If you wait it
out you get:
select(4, [3], [], NULL, {134, 217727}
... so its a loop that I doubt you'll exit.
Tom
On Wed, Jan 21, 2009 at 2:43 PM, Krzysztof Skrzętnicki <gtener at gmail.com> wrote:
> Same for me:
> Linux tenserwer 2.6.28-ARCH #1 SMP PREEMPT Tue Jan 6 10:26:22 UTC 2009
> i686 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux
> The Glorious Glasgow Haskell Compilation System, version 6.10.1
>
> All best
>
> Christopher Skrzętnicki
>
> On Wed, Jan 21, 2009 at 23:27, Ertugrul Soeylemez <es at ertes.de> wrote:
>> David Fox <ddssff at gmail.com> wrote:
>>
>>> I posted a bug about this
>>> (http://hackage.haskell.org/trac/ghc/ticket/2971) but its so odd I had
>>> to ask here. Using ghc 6.10.1, both readFile "/proc/mounts" and
>>> Data.ByteString.Lazy.Char8.readFile "/proc/mounts" hang on an amd64
>>> machine running Linux. Also, Data.ByteString.readFile "/proc/mounts"
>>> returns the empty string. Is this behavior present for others? On
>>> i386?
>>
>> I can confirm this on Athlon64 X2 with GHC 6.10.1 running Linux 2.6.25.
>> Same behavior here.
>>
>>
>> Greets,
>> Ertugrul.
>>
>>
>> --
>> nightmare = unsafePerformIO (getWrongWife >>= sex)
>> http://blog.ertes.de/
>>
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list