commercialhaskell / stack-ide

Stack-based JSON interface to ide-backend
98 stars 23 forks source link

'<stdin>: hGetBufSome: resource exhausted (Not enough space)' when running on Windows #93

Open ncreep opened 8 years ago

ncreep commented 8 years ago

Continuing the discussion from here.

Running on a Windows 7 64bit, I get the following when running stack ide start on a project:

{"tag":"ResponseWelcome","contents":[0,1,1]}
{"tag":"ResponseLog","contents":"[Info] Initializing ide-backend session @(ideba_FcNvVmq71td3LXgYeLF4lp:IdeSession.Update .\\IdeSession\\Update.hs:197:3)\n"}
{"tag":"ResponseLog","contents":"[Debug] Session dir = D:\\linear-extra\\session.4796 @(ideba_FcNvVmq71td3LXgYeLF4lp:IdeSession.Update .\\IdeSession\\Update.hs:210:3)\n"}
{"tag":"ResponseLog","contents":"[Debug] Dist dir = D:\\linear-extra\\.stack-work\\dist\\d96ab9d9\\ @(ideba_FcNvVmq71td3LXgYeLF4lp:IdeSession.Update .\\IdeSession\\Update.hs:212:3)\n"}
{"tag":"ResponseLog","contents":"[Debug] Local working dir = D:\\linear-extra\\ @(ideba_FcNvVmq71td3LXgYeLF4lp:IdeSession.Update .\\IdeSession\\Update.hs:219:17)\n"}
{"tag":"ResponseLog","contents":"[Info] Searching for ide-backend-server on this path: D:\\linear-extra\\.stack-work\\install\\x86_64-windows\\lts-3.7\\7.10.2\\bin\\:C:\\Users\\Daniel\\AppData\\Roaming\\stack\\snapshots\\x86_64-windows\\lts-3.7\\7.10.2\\bin\\ @(ideba_FcNvVmq71td3LXgYeLF4lp:IdeSession.RPC.Client .\\IdeSession\\RPC\\Client.hs:319:5)\n"}
{"tag":"ResponseLog","contents":"[Info] Found ide-backend-server - using this one: C:\\Users\\Daniel\\AppData\\Roaming\\local\\bin\\ide-backend-server.exe @(ideba_FcNvVmq71td3LXgYeLF4lp:IdeSession.RPC.Client .\\IdeSession\\RPC\\Client.hs:321:5)\n"}
{"tag":"ResponseLog","contents":"[Debug] Recompile required, starting... @(ideba_FcNvVmq71td3LXgYeLF4lp:IdeSession.Update.ExecuteSessionUpdate .\\IdeSession\\Update\\ExecuteSessionUpdate.hs:223:5)\n"}
{"tag":"ResponseFatalError","contents":"<stdin>: hGetBufSome: resource exhausted (Not enough space)"}

Process exited with ExitFailure 1: C:\Users\Daniel\AppData\Roaming\local\bin\stack-ide.exe 
--verbose 
--include=D:\linear-extra\;D:\linear-extra\src\;D:\linear-extra\.stack-work\dist\d96ab9d9\build\autogen\;D:\linear-extra\.stack-work\dist\d96ab9d9\build\;D:\linear-extra\;D:\linear-extra\test\;D:\linear-extra\.stack-work\dist\d96ab9d9\build\autogen\;D:\linear-extra\.stack-work\dist\d96ab9d9\build\ 
--local-work-dir=D:\linear-extra\ 
--ide-backend-tools-path=D:\linear-extra\.stack-work\install\x86_64-windows\lts-3.7\7.10.2\bin\;C:\Users\Daniel\AppData\Roaming\stack\snapshots\x86_64-windows\lts-3.7\7.10.2\bin\;
--dist-dir=D:\linear-extra\.stack-work\dist\d96ab9d9\ 
--ghc-option=-hide-all-packages 
--ghc-option=-iD:\linear-extra\ 
--ghc-option=-iD:\linear-extra\src\ 
--ghc-option=-iD:\linear-extra\.stack-work\dist\d96ab9d9\build\autogen\ 
--ghc-option=-iD:\linear-extra\.stack-work\dist\d96ab9d9\build\ 
--ghc-option=-stubdir=D:\linear-extra\.stack-work\dist\d96ab9d9\build\ 
--ghc-option=-package=base 
--ghc-option=-package=binary-0.7.5.0 
--ghc-option=-package=lens-4.12.3 
--ghc-option=-package=linear-1.19.1.3 
--ghc-option=-rtsopts 
--ghc-option=-with-rtsopts=-N 
--ghc-option=-iD:\linear-extra\ 
--ghc-option=-iD:\linear-extra\test\ 
--ghc-option=-iD:\linear-extra\.stack-work\dist\d96ab9d9\build\autogen\ 
--ghc-option=-iD:\linear-extra\.stack-work\dist\d96ab9d9\build\ 
--ghc-option=-stubdir=D:\linear-extra\.stack-work\dist\d96ab9d9\build\ 
--ghc-option=-package=base 
--package-db=C:\Users\Daniel\AppData\Roaming\stack\snapshots\x86_64-windows\lts-3.7\7.10.2\pkgdb\;D:\linear-extra\.stack-work\install\x86_64-windows\lts-3.7\7.10.2\pkgdb\         

The source of the exception is this line in ValueStream.hs.

ncreep commented 8 years ago

I found a similar issue on the bytestring issue tracker. I submitted a minimal example, that doesn't depend on stack-ide, that fails in the same way (see here).

lukexi commented 8 years ago

I wonder what the differences are in our environment — I'm running under MSYS2 using Cmder on Windows 8 x64.

ncreep commented 8 years ago

I'm using Cmder as well, but I'm on a Windows 7 x64. Though I see the same error when I use plain cmd.

ncreep commented 8 years ago

Even more strangely, the error goes away when using WinGhci