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

Possible memory leak while building from source #14

Open
hails opened this issue Oct 15, 2015 · 13 comments
Open

Possible memory leak while building from source #14

hails opened this issue Oct 15, 2015 · 13 comments

Comments

@hails
Copy link
Contributor

hails commented Oct 15, 2015

When I try to compile/build from source, using either stackage and cabal, the process halts when it reaches the following step [25 of 32] Compiling Handler.Admin.Board ( Handler/Admin/Board.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Handler/Admin/Board.o ).
I'm currently with 8GB of RAM, SSD, and 2GB of swap (file), and the building process consumes everything before halting (high I/O, system lagging etc).

@ahushh
Copy link
Owner

ahushh commented Oct 16, 2015

As a temporary solution you can decrease GHC optimization level to -O0 in Monaba.cabal

@hails
Copy link
Contributor Author

hails commented Oct 16, 2015

Didn't work, but it seems to work when I use stackage stack build.
First, I tried to compile in three differents Digital Ocean droplets (Ubuntu and Debian) and got some dependencies errors, even using stackage.
Now, compiling (and hacking with a mix of cabal and stackage) on my Arch Linux setup kinda worked.
Should we perhaps make Monaba "stackage compliant" and recheck the dependencies?

@ahushh
Copy link
Owner

ahushh commented Oct 16, 2015

Hmm, it works for me when I use cabal and latest packages with GHC 7.10.2 following my readme.
I never used stackage before but I will surely take a look on it

@hails
Copy link
Contributor Author

hails commented Oct 16, 2015

What Linux distribution are you using to build Monaba with cabal?

@ahushh
Copy link
Owner

ahushh commented Oct 16, 2015

gentoo

@hails
Copy link
Contributor Author

hails commented Oct 16, 2015

That's strange, tried several times (even asked to a friend of mine to try buidling) and got almost the same errors (dependencies failing, memory leak, and so on).
Maybe it's just me being unlucky (and being hated back by cabal) or doing something wrong.

@ahushh
Copy link
Owner

ahushh commented Oct 16, 2015

I got memory leaking too, but -O0 always helped. Don't know how to fix it another way yet.
Just updated package list, inited sandbox and reinstalled dependencies, got no errors (except of nano-md5). What dependencies errors did you get?

@ahushh
Copy link
Owner

ahushh commented Oct 16, 2015

I updated dependencies versions according to yesod scaffold example, not sure if it helps

@hails
Copy link
Contributor Author

hails commented Oct 16, 2015

Gonna test on a Digital Ocean droplet.

@hails
Copy link
Contributor Author

hails commented Oct 16, 2015

Welp, this time everything went well.
I guess I can close the issue now?

@ahushh
Copy link
Owner

ahushh commented Oct 16, 2015

Let it be open to remind me that memory leak isn't fixed, -O0 still isn't a good way

@hails
Copy link
Contributor Author

hails commented Oct 16, 2015

Ok, if something like that happens again, I'll report it here.

@jeanlucaslima
Copy link

@ahushh the option -O0 should be on the documentation then

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

3 participants