GHC 8.6.2 zombie processes?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

GHC 8.6.2 zombie processes?

Viktor Dukhovni

It seems that GHC 8.6.2 does not reap defunct child processes in a
timely manner when compiling many modules (e.g. "base" when stack is
building a new sandbox).  This is especially visible when using
LLVM 6.0 whose optimizer is particularly CPU-intensive (read
mind-numbingly slow) on my X86_84 FreeBSD system:

The process:

$ ps -wwwwwww -o pid,etime,args -p 98525
98525   55:47 /home/viktor/.local/lib/ghc- -B/home/viktor/.local/lib/ghc- --make -fbuilding-cabal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir .stack-work/dist/x86_64-freebsd/Cabal- -odir .stack-work/dist/x86_64-freebsd/Cabal- -hidir .stack-work/dist/x86_64-freebsd/Cabal- -stubdir .stack-work/dist/x86_64-freebsd/Cabal- -i -i.stack-work/dist/x86_64-freebsd/Cabal- -i. -i.stack-work/dist/x86_64-freebsd/Cabal- -i.stack-work/dist/x86_64-freebsd/Cabal- -I.stack-work/dist/x86_64-freebsd/Cabal- -I.stack-work/dist/x86_64-freebsd/Cabal- -I.stack-work/dist/x86_64-freebsd/Cabal- -I/usr/local/Cellar/postgresql/10.0/include -I/usr/local/include -I/usr/local/opt/icu4c/include -optP-include -optP.stack-work/dist/x86_64-freebsd/Cabal- -this-unit-id Cabal- -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /usr/home/viktor/.stack/snapshots/x86_64-freebsd/nightly-2018-11-28/ -package-db .stack-work/dist/x86_64-freebsd/Cabal- -package-id array- -package-id base- -package-id binary- -package-id bytestring- -package-id containers- -package-id deepseq- -package-id directory- -package-id filepath- -package-id mtl-2.2.2 -package-id parsec- -package-id pretty- -package-id process- -package-id text- -package-id time- -package-id transformers- -package-id unix- -XHaskell2010 Distribution.Backpack Distribution.Backpack.Configure Distribution.Backpack.ComponentsGraph Distribution.Backpack.ConfiguredComponent Distribution.Backpack.DescribeUnitId Distribution.Backpack.FullUnitId Distribution.Backpack.LinkedComponent Distribution.Backpack.ModSubst Distribution.Backpack.ModuleShape

generated multiple hundreds of "zombies":

$ ps $(pgrep -P 98525) | egrep -c defunct

I guess the build taking an hour is far more an issue than a few
hundred zombies, but this message is about the zombies.  Is this
a feature or a bug?


Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
Only members subscribed via the mailman list are allowed to post.