monaba icon indicating copy to clipboard operation
monaba copied to clipboard

Possible memory leak while building from source

Open hails opened this issue 10 years ago • 13 comments

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).

hails avatar Oct 15 '15 23:10 hails

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

ahushh avatar Oct 16 '15 13:10 ahushh

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?

hails avatar Oct 16 '15 17:10 hails

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

ahushh avatar Oct 16 '15 19:10 ahushh

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

hails avatar Oct 16 '15 19:10 hails

gentoo

ahushh avatar Oct 16 '15 19:10 ahushh

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.

hails avatar Oct 16 '15 19:10 hails

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 avatar Oct 16 '15 20:10 ahushh

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

ahushh avatar Oct 16 '15 20:10 ahushh

Gonna test on a Digital Ocean droplet.

hails avatar Oct 16 '15 20:10 hails

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

hails avatar Oct 16 '15 21:10 hails

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

ahushh avatar Oct 16 '15 21:10 ahushh

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

hails avatar Oct 16 '15 21:10 hails

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

jeanlucaslima avatar Jan 22 '16 13:01 jeanlucaslima