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

hGetBufSome: resource exhausted Issue on Windows 7 #874

Closed
cricrazy opened this issue Jun 5, 2013 · 13 comments
Closed

hGetBufSome: resource exhausted Issue on Windows 7 #874

cricrazy opened this issue Jun 5, 2013 · 13 comments

Comments

@cricrazy
Copy link

cricrazy commented Jun 5, 2013

I installed pandoc on Windows7 (64bit) using the installer on the pandoc website. When I try to run pandoc from command prompt. This is the error I got.

C:\Users\cricrazy>pandoc
pandoc: : hGetBufSome: resource exhausted (Not enough space)

Plz Help.

2013-06-05 11_54_01-c__windows_system32_cmd exe

@jgm
Copy link
Owner

jgm commented Jun 8, 2013

I haven't seen this before. Does pandoc immediately return with this error when you run it without arguments? Or did you terminate standard input with Ctrl-Z? Can you also try pandoc --version and run pandoc with a file argument?

@cricrazy
Copy link
Author

Thanks John.

I took a screenshot of pandoc --version. I am attaching it here. I used the pandoc with the file argument and it works perfectly. I suppose, when I tried pandoc without any arguments, I got the above error.

Thanks for your help.
2013-06-10 08_21_37-c__windows_system32_cmd exe

@jgm
Copy link
Owner

jgm commented Jun 11, 2013

You didn't answer this question: " Does pandoc immediately return with this error when you run it without arguments? Or did you terminate standard input with Ctrl-Z?"

@arnoesterhuizen
Copy link

I've also encountered this error, and pandoc returns with this error immediately. I then discovered I didn't specify the input file, so it might be a similar problem.

@cricrazy
Copy link
Author

@jgm
It does return this error when I run without any arguments. I was not trying to terminate it with Ctrl-Z.
thanks.

@jgm
Copy link
Owner

jgm commented Jun 30, 2013

It would be really helpful to know whether you experience the same with earlier versions of pandoc. Can you try uninstalling pandoc and installing an earlier version? I am curious whether you see the same problem with 1.9.4.2,
1.10, 1.11. This would give valuable clues about where the problem lies.

@mrmagooey
Copy link

I get the same behaviour with 1.11.1 and 1.10. 1.9 I can run without the error. I am on Windows 7.

@jgm
Copy link
Owner

jgm commented Jul 3, 2013

Thanks @mrmagooey, that is helpful indeed. It suggests that the problem started with the following change in 1.0: "We no longer depend on utf8-string. Instead we use functions defined in Text.Pandoc.UTF8 that use Data.Text’s conversions."

@jgm
Copy link
Owner

jgm commented Jul 3, 2013

I created an EC2 instance running Windows 8 64-bit, and installed the latest Haskell Platform.
In GHCI I can confirm that

Data.ByteString.Lazy.hGetContents stdin

returns the error "hGetBufSome: resource exhausted (Not enough space)", while

Data.ByteString.hGetContents stdin

works fine. This suggests that the problem could be fixed by using strict instead of lazy bytestrings for input in Text.Pandoc.UTF8.

@jgm
Copy link
Owner

jgm commented Jul 4, 2013

Compiling the existing code on a Windows 64 box (Windows server 12 EC2 instance) also seems to fix the problem. The resulting binary runs on both 32-bit and 64-bit Windows. So the best solution going forward may be for me to move my build operation.

@jgm
Copy link
Owner

jgm commented Jul 4, 2013

Correction to last comment: on my Windows 12 Server 64-bit instance, I can't reproduce any of the problems I saw on 64-bit Windows 8 server. The new binary works well, but so do the old ones (e.g. 1.10.x). And I can't reproduce the problem seen above in GHCI. Unfortunately, this problem seems to arise for a very specific class of machines/OSs.

@jgm jgm closed this as completed in aab4c47 Jul 4, 2013
@jgm
Copy link
Owner

jgm commented Jul 4, 2013

OK - I'll just use strict bytestrings. That should solve the problem.

@jgm
Copy link
Owner

jgm commented Jul 4, 2013

I can confirm that a binary produced with this patch works on Windows 8 server, 64-bit.

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