Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file resource limit reached on OSX when generating docs for GHC #495

Closed
cartazio opened this issue Apr 19, 2016 · 22 comments
Closed

file resource limit reached on OSX when generating docs for GHC #495

cartazio opened this issue Apr 19, 2016 · 22 comments

Comments

@cartazio
Copy link

see https://ghc.haskell.org/trac/ghc/ticket/11956

@cartazio
Copy link
Author

another (unrelated issue?) is the missing link destinations for a whole mess of things, do those correspond to module recursions and/or .hs-boot definitions?
makerun-warnings.txt

@cartazio
Copy link
Author

see https://github.com/haskell/haddock/files/226599/makerun-warnings.txt (attached file link) for the warning outputs regarding links

@mpickering
Copy link
Collaborator

I have also run into this and know where to fix it.

@cartazio
Copy link
Author

+1

It breaks the end of the haddock hyperlinekd source/doc generation for the ghc code base on mac without the ulimit intervention, so it'd be great to have this fixed before 8.0 gets cut properly :)

@cartazio
Copy link
Author

theres a related issue in the ghc.mk file for the haddock subdir that makes it fail to copy the solarized.css and the .js that does the lovely tool tip highlighting, I hope to dig into that tomorrow, thomie gave some hints about where it might be

@cartazio
Copy link
Author

@mpickering where does the issue lie may I ask?

@mpickering
Copy link
Collaborator

The fix needs to be something like this:

mpickering@04ef9d4

@cartazio
Copy link
Author

would using something like https://hackage.haskell.org/package/base-4.8.2.0/docs/Control-Concurrent-QSemN.html make sense or not be safe?

@cartazio
Copy link
Author

@mpickering whats that (force -> !file) ? i'm not familiar with that

@mpickering
Copy link
Collaborator

The intention is to force the whole file to be read into memory so the file handle could be closed. Is there a better way to do it without adding dependencies?

@cartazio
Copy link
Author

what do you mean by dependencies?

@cartazio
Copy link
Author

ohhh, i would probably just have the next line be something lik e

!_ <- length $! str
or something

@cartazio
Copy link
Author

this seems to be a semi lazy io challenge in particular, or am i missing something?

@cartazio
Copy link
Author

i've attached the shell invocation that came up in ghc that triggered the problem if you wanna try to use it to test stuff
badhaddock-invoke.txt
which should help I hope :)

@bgamari
Copy link
Collaborator

bgamari commented Apr 22, 2016

I think,

!_ <- return $ length str

or perhaps better,

_ <- Control.Exception.evaluate $ length str

should be perfectly sufficient, no?

@cartazio
Copy link
Author

True

On Friday, April 22, 2016, Ben Gamari notifications@github.com wrote:

I think,

!_ <- return $ length str

should be perfectly sufficient, no?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#495 (comment)

@mpickering
Copy link
Collaborator

If that is the recommended way then that's fine but it always felt a bit hacky to me?

@bgamari
Copy link
Collaborator

bgamari commented Apr 22, 2016

Matthew Pickering notifications@github.com writes:

If that is the recommended way then that's fine but it always felt a bit hacky to me?

Indeed, this is why I try to avoid lazy IO.

@bgamari
Copy link
Collaborator

bgamari commented May 27, 2016

@cartazio do you think you could put together and test a patch for this?

@mpickering
Copy link
Collaborator

Ben, applying the patch I linked to earlier will fix the problem.

mpickering@04ef9d4

@cartazio
Copy link
Author

I can test it next week, doing some fam travel so I don't have my -j10 friendly machine on me for a few days

bgamari pushed a commit to bgamari/haddock that referenced this issue Jun 16, 2016
Previously it was possible for files to be left open, leading to haskell#495
where we'd run out of handles on Darwin.
@alexbiehl
Copy link
Member

Fixed in e0ada17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants