Re: [Haskell-cafe] hGetContents: resource exhausted

2010-08-05 Thread Donn Cave
Quoth Lally Singh ,
...
> That fixed the signal problem!
>
> Sadly that just gets me far enough to Setup +RTS -V0 -RTS build, which
> runs ghc, which then dies from the same signal problem :-(

Well, yeah - a solution it is not, but we sure know a lot about the
problem now.  Your ghc is fundamentally broken - hGetContents, a
very commonly used base library function, can't survive the runtime's
own timer signals.  Obviously this doesn't happen for other users,
maybe even on OpenSolaris?  I'm sure someone has a clue how this
could happen.

Donn Cave, d...@avvanta.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hGetContents: resource exhausted

2010-08-05 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/5/10 03:47 , Lally Singh wrote:
> Sadly that just gets me far enough to Setup +RTS -V0 -RTS build, which
> runs ghc, which then dies from the same signal problem :-(

export GHCRTS=-V0

However, I don't think that's a permanent solution.

- -- 
brandon s. allbery [linux,solaris,freebsd,perl]  allb...@kf8nh.com
system administrator  [openafs,heimdal,too many hats]  allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university  KF8NH
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxa0zUACgkQIn7hlCsL25Vo0QCghmstJwsJNnPgFSEajWKqC/K2
/vMAoJ24hBOhbktVWYC3Zriztv4pM0mj
=miDR
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hGetContents: resource exhausted

2010-08-05 Thread Lally Singh
On Wed, Jul 28, 2010 at 4:21 PM, Donn Cave  wrote:
> Quoth Lally Singh ,
>
>> Ah, it's getting EAGAIN from fds created from prior pipe() calls.  The
>> other sides look like they were DUP2'd to fds 0&1, I'm guessing for a
>> fork/exec().
>
> Well, that isn't a big surprise - it's the way you would expect to
> get EAGAIN.  So ... evidently the GHC runtime is broken somehow on
> OpenSolaris?  I personally have no idea what's going on there, but
> while we're waiting for someone with a clue, here are a couple more
> random things to try:
>
> Have you compiled and run separately?  instead of
>
>> runghc Setup.hs configure
>
>  ghc --make Setup
>  Setup configure
>
> It shouldn't make any difference on its own, but then you can try
> options on the compile, like "ghc -threaded", and runtime flags like
> "Setup +RTS -V0 -RTS"  I suggest that because it cuts down on
> signal interrupts from the runtime, and your symptoms suggest a
> signal interrupt.

That fixed the signal problem!

Sadly that just gets me far enough to Setup +RTS -V0 -RTS build, which
runs ghc, which then dies from the same signal problem :-(
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hGetContents: resource exhausted

2010-07-28 Thread Donn Cave
Quoth Lally Singh ,

> Ah, it's getting EAGAIN from fds created from prior pipe() calls.  The
> other sides look like they were DUP2'd to fds 0&1, I'm guessing for a
> fork/exec().

Well, that isn't a big surprise - it's the way you would expect to
get EAGAIN.  So ... evidently the GHC runtime is broken somehow on
OpenSolaris?  I personally have no idea what's going on there, but
while we're waiting for someone with a clue, here are a couple more
random things to try:

Have you compiled and run separately?  instead of

> runghc Setup.hs configure

  ghc --make Setup
  Setup configure

It shouldn't make any difference on its own, but then you can try
options on the compile, like "ghc -threaded", and runtime flags like
"Setup +RTS -V0 -RTS"  I suggest that because it cuts down on
signal interrupts from the runtime, and your symptoms suggest a
signal interrupt.

Donn Cave, d...@avvanta.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hGetContents: resource exhausted

2010-07-28 Thread Lally Singh
Ah, it's getting EAGAIN from fds created from prior pipe() calls.  The
other sides look like they were DUP2'd to fds 0&1, I'm guessing for a
fork/exec().

On Mon, Jul 26, 2010 at 10:23 PM, Brandon S Allbery KF8NH
 wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 7/26/10 21:01 , Donn Cave wrote:
>> Much easier (but not guaranteed to help) you might be able to
>> see the actual error, at the system call level, if you can trace
>> system calls.  The utility for this varies by platform, but
>> e.g. "strace" or "ktrace".
>
> On Solaris it's truss.
>
> - --
> brandon s. allbery     [linux,solaris,freebsd,perl]      allb...@kf8nh.com
> system administrator  [openafs,heimdal,too many hats]  allb...@ece.cmu.edu
> electrical and computer engineering, carnegie mellon university      KF8NH
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2.0.10 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxOQw4ACgkQIn7hlCsL25WYwQCgxNsPquHR3fyqZxTAGJTeYlfQ
> +wEAn38Z6Phapm4vMgmgp1/0Y/GDqu2Y
> =KanW
> -END PGP SIGNATURE-
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hGetContents: resource exhausted

2010-07-26 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 7/26/10 21:01 , Donn Cave wrote:
> Much easier (but not guaranteed to help) you might be able to
> see the actual error, at the system call level, if you can trace
> system calls.  The utility for this varies by platform, but
> e.g. "strace" or "ktrace".

On Solaris it's truss.

- -- 
brandon s. allbery [linux,solaris,freebsd,perl]  allb...@kf8nh.com
system administrator  [openafs,heimdal,too many hats]  allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university  KF8NH
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxOQw4ACgkQIn7hlCsL25WYwQCgxNsPquHR3fyqZxTAGJTeYlfQ
+wEAn38Z6Phapm4vMgmgp1/0Y/GDqu2Y
=KanW
-END PGP SIGNATURE-
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hGetContents: resource exhausted

2010-07-26 Thread Donn Cave
Quoth Lally Singh ,
...
> I've got my own source build of ghc.  Is there anything I can put in
> to track down what's going on?

Much easier (but not guaranteed to help) you might be able to
see the actual error, at the system call level, if you can trace
system calls.  The utility for this varies by platform, but
e.g. "strace" or "ktrace".

Donn Cave, d...@avvanta.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hGetContents: resource exhausted

2010-07-26 Thread Lally Singh
On Mon, Jul 26, 2010 at 7:59 AM, Ben Millwood  wrote:
> On Mon, Jul 26, 2010 at 10:47 AM, Magnus Therning  wrote:
>> On Sun, Jul 25, 2010 at 23:47, Lally Singh  wrote:
>>> Hey all,
>>>
>>>  This is on OpenSolaris.  Simple attempts to build cabal packages
>>> give me this error, and I don't know what it means.  Here's an
>>> example:
>>> [07/25 18:51::la...@sol type-level]$ runghc Setup.hs configure
>>> Configuring type-level-0.2.4...
>>> Setup.hs: fd:8: hGetContents: resource exhausted (Resource temporarily
>>> unavailable)
>>> Setup.hs: fd:8: resource exhausted
>>>
>>> Does anyone know what this means?  I'm trying to just get the llvm
>>> bindings installed (requiring mtl & type-level).
>>
>> A quick guess: you're running out of filedescriptors.
>>
>
> The error gives the descriptor number as 8, so I don't think that's
> terribly likely :)
> Resource temporarily unavailable is the string that corresponds to the
> EAGAIN error, which is typically presented by operations that would
> block being used in non-blocking mode. I have no idea what would cause
> it to be a fatal error in a hGetContents call.

I checked that my ulimit was > 8 :-)  It was 256, I knocked it up to
65,535, but that didn't help.

I've got my own source build of ghc.  Is there anything I can put in
to track down what's going on?

Thanks for all the help folks,

-Lally
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hGetContents: resource exhausted

2010-07-26 Thread Ben Millwood
On Mon, Jul 26, 2010 at 10:47 AM, Magnus Therning  wrote:
> On Sun, Jul 25, 2010 at 23:47, Lally Singh  wrote:
>> Hey all,
>>
>>  This is on OpenSolaris.  Simple attempts to build cabal packages
>> give me this error, and I don't know what it means.  Here's an
>> example:
>> [07/25 18:51::la...@sol type-level]$ runghc Setup.hs configure
>> Configuring type-level-0.2.4...
>> Setup.hs: fd:8: hGetContents: resource exhausted (Resource temporarily
>> unavailable)
>> Setup.hs: fd:8: resource exhausted
>>
>> Does anyone know what this means?  I'm trying to just get the llvm
>> bindings installed (requiring mtl & type-level).
>
> A quick guess: you're running out of filedescriptors.
>

The error gives the descriptor number as 8, so I don't think that's
terribly likely :)
Resource temporarily unavailable is the string that corresponds to the
EAGAIN error, which is typically presented by operations that would
block being used in non-blocking mode. I have no idea what would cause
it to be a fatal error in a hGetContents call.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hGetContents: resource exhausted

2010-07-26 Thread Magnus Therning
On Sun, Jul 25, 2010 at 23:47, Lally Singh  wrote:
> Hey all,
>
>  This is on OpenSolaris.  Simple attempts to build cabal packages
> give me this error, and I don't know what it means.  Here's an
> example:
> [07/25 18:51::la...@sol type-level]$ runghc Setup.hs configure
> Configuring type-level-0.2.4...
> Setup.hs: fd:8: hGetContents: resource exhausted (Resource temporarily
> unavailable)
> Setup.hs: fd:8: resource exhausted
>
> Does anyone know what this means?  I'm trying to just get the llvm
> bindings installed (requiring mtl & type-level).

A quick guess: you're running out of filedescriptors.

/M

-- 
Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
magnus@therning.org          Jabber: magnus@therning.org
http://therning.org/magnus         identi.ca|twitter: magthe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] hGetContents: resource exhausted

2010-07-25 Thread Lally Singh
Hey all,

  This is on OpenSolaris.  Simple attempts to build cabal packages
give me this error, and I don't know what it means.  Here's an
example:
[07/25 18:51::la...@sol type-level]$ runghc Setup.hs configure
Configuring type-level-0.2.4...
Setup.hs: fd:8: hGetContents: resource exhausted (Resource temporarily
unavailable)
Setup.hs: fd:8: resource exhausted

Does anyone know what this means?  I'm trying to just get the llvm
bindings installed (requiring mtl & type-level).

Cheers,
-Lally
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe