[Haskell-cafe] GHC 8.6.2 zombie processes?

Viktor Dukhovni ietf-dane at dukhovni.org
Fri Nov 30 02:34:45 UTC 2018


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
  PID ELAPSED COMMAND
98525   55:47 /home/viktor/.local/lib/ghc-8.6.2.20181122/bin/ghc -B/home/viktor/.local/lib/ghc-8.6.2.20181122 --make -fbuilding-cabal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir .stack-work/dist/x86_64-freebsd/Cabal-2.4.0.1/build -odir .stack-work/dist/x86_64-freebsd/Cabal-2.4.0.1/build -hidir .stack-work/dist/x86_64-freebsd/Cabal-2.4.0.1/build -stubdir .stack-work/dist/x86_64-freebsd/Cabal-2.4.0.1/build -i -i.stack-work/dist/x86_64-freebsd/Cabal-2.4.0.1/build -i. -i.stack-work/dist/x86_64-freebsd/Cabal-2.4.0.1/build/autogen -i.stack-work/dist/x86_64-freebsd/Cabal-2.4.0.1/build/global-autogen -I.stack-work/dist/x86_64-freebsd/Cabal-2.4.0.1/build/autogen -I.stack-work/dist/x86_64-freebsd/Cabal-2.4.0.1/build/global-autogen -I.stack-work/dist/x86_64-freebsd/Cabal-2.4.0.1/build -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-2.4.0.1/build/autogen/cabal_macros.h -this-unit-id Cabal-2.4.1.0-IaB5GUEm19R82R9cEdbB1D -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /usr/home/viktor/.stack/snapshots/x86_64-freebsd/nightly-2018-11-28/8.6.2.20181122/pkgdb -package-db .stack-work/dist/x86_64-freebsd/Cabal-2.4.0.1/package.conf.inplace -package-id array-0.5.3.0 -package-id base-4.12.0.0 -package-id binary-0.8.6.0 -package-id bytestring-0.10.8.2 -package-id containers-0.6.0.1 -package-id deepseq-1.4.4.0 -package-id directory-1.3.3.0 -package-id filepath-1.4.2.1 -package-id mtl-2.2.2 -package-id parsec-3.1.13.0 -package-id pretty-1.1.3.6 -package-id process-1.6.3.0 -package-id text-1.2.3.1 -package-id time-1.8.0.2 -package-id transformers-0.5.5.0 -package-id unix-2.7.2.2 -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
460

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?

-- 
	Viktor.



More information about the Haskell-Cafe mailing list