-
Notifications
You must be signed in to change notification settings - Fork 848
cabal-install uses a lot of memory during stack init --solver
#1677
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
Comments
It seems highly likely that this is due to cabal-install, as Marking this as support / upstream on a hunch, but leaving it open for further investigation. |
Nope! Its not cabal-install and its not solver. The culprit seems to be cabal-install is forked as a separate process so it cannot contribute to stack's memory footprint. I don't think Then I replaced readProcessStdout with createProcess and the leak went away. So, it is somewhere in |
I seem to run into this issue as well. In my case 'stack init --solver' takes so much memory (>3GB) that my hard drive starts thrashing and I cannot finish solving. Is there a workaround until this issue has been fixed upstream? |
For this usecase I do see cabal pegging the CPU for a few seconds in htop. Cabal-install versions with this patch might have a bit better memory use. Tweaking the dependency solver behavior with "--max-backjumps N" where N is low or perhaps with "--reorder-goals" might work, but there isn't currently a way to pass extra options to the solve.r |
Yeah indeed it seems to be cabal. I ran solver on the lens package and saw cabal's RSS going upto 1.4GB in top output. I might have screwed up somewhere in my earlier experiment. We can explore if we can commit a change tweaking the cabal options for a better cabal memeory footprint. |
Thanks for you replies. In the end I limited the version ranges in my .cabal file and then I saw that there were no solutions to my selection of packages. A patch to one of the packages that made that package compatible with ghc 7.10 solved my issue. |
stack init --solver
?stack init --solver
There's nothing for us to do here, since it's an upstream issue. Closing this. If you think this is in error, please comment with more info. |
Steps to reproduce:
Debug output:
Using a maximum of 1.35GB of RAM is a bit too much IMO. Could be a problem with cabal of course, but I don't have time to investigate right now.
The text was updated successfully, but these errors were encountered: