<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Maybe open GHC ticket?</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">How can I repro with a *particular* GHC, for example my build of HEAD?</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">And how can I find the command line that finally hung, so I can try it repeatedly?</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 6 Sept 2022 at 14:02, Doug Burke <<a href="mailto:dburke.gw@gmail.com">dburke.gw@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have a test executable which will build with ghc 9.2.3 (and many<br>
older versions) but which appears to hang with GHC 9.2.4. I have<br>
exhausted what little I know of in debugging this, so any help in<br>
identifying the problem would be appreciated. Unfortunately it's a<br>
relatively large application, so the following reproducer requires<br>
some time/disk space.<br>
<br>
Thanks fo ryour time,<br>
Doug<br>
<br>
-----------------------------------------------------------------------------------------------------------------<br>
<br>
I am on a linux machine (ubuntu 22.04) and have seen this with builds<br>
either with stack or nix.<br>
<br>
% git clone <a href="https://gitlab.com/dburke/swish" rel="noreferrer" target="_blank">https://gitlab.com/dburke/swish</a> temp<br>
% cd temp<br>
% git rev-parse HEAD<br>
09c92e0fbbea9be86cac5c8e273e1d5915a9eeae<br>
<br>
Added to get the timings, but it's not strictly necessary:<br>
<br>
% sed -i -e "s/-Wall /-Wall -ddump-timings /" swish.cabal<br>
<br>
First a check of a successful build (with stack, GHC 9.0.2):<br>
<br>
% stack test --resolver lts-19.22 :test-rdfproof<br>
... wait a while<br>
[2 of 2] Compiling Main<br>
*** Parser [Main]:<br>
Parser [Main]: alloc=27576560 time=8.702<br>
*** Renamer/typechecker [Main]:<br>
Renamer/typechecker [Main]: alloc=61957416 time=85.052<br>
*** Desugar [Main]:<br>
Desugar [Main]: alloc=19485576 time=16.095<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=1024590752 time=937.479<br>
*** Specialise [Main]:<br>
Specialise [Main]: alloc=49779464 time=30.480<br>
*** Float out(FOS {Lam = Just 0,<br>
Consts = True,<br>
OverSatApps = False}) [Main]:<br>
Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False})<br>
[Main]: alloc=243444904 time=287.934<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=959971736 time=844.707<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=816465992 time=727.244<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=914290184 time=835.805<br>
Float inwards [Main]: alloc=17448 time=0.007<br>
Called arity analysis [Main]: alloc=19288 time=0.008<br>
*** Float inwards [Main]:<br>
*** Called arity analysis [Main]:<br>
*** Simplifier [Main]:<br>
*** Demand analysis [Main]:<br>
Simplifier [Main]: alloc=492772800 time=396.191<br>
Demand analysis [Main]: alloc=435384136 time=234.248<br>
*** Constructed Product Result analysis [Main]:<br>
Constructed Product Result analysis [Main]: alloc=67395816 time=27.498<br>
*** Worker Wrapper binds [Main]:<br>
Worker Wrapper binds [Main]: alloc=10456160 time=10.538<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=675869616 time=624.538<br>
Exitification transformation [Main]: alloc=20416 time=0.007<br>
*** Exitification transformation [Main]:<br>
*** Float out(FOS {Lam = Just 0,<br>
Consts = True,<br>
OverSatApps = True}) [Main]:<br>
Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = True})<br>
[Main]: alloc=212059304 time=172.872<br>
Common sub-expression [Main]: alloc=18768 time=0.008<br>
Float inwards [Main]: alloc=17448 time=0.006<br>
*** Common sub-expression [Main]:<br>
*** Float inwards [Main]:<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=430634768 time=397.868<br>
*** Demand analysis [Main]:<br>
Demand analysis [Main]: alloc=144629272 time=70.451<br>
*** CoreTidy [Main]:<br>
CoreTidy [Main]: alloc=48438688 time=44.112<br>
*** CorePrep [Main]:<br>
*** CodeGen [Main]:<br>
CorePrep [Main]: alloc=15032 time=0.012<br>
CodeGen [Main]: alloc=1738308168 time=1051.197<br>
*** systool:as:<br>
systool:as: alloc=118376 time=0.481<br>
*** initializing unit database:<br>
initializing unit database: alloc=15393080 time=21.985<br>
*** initializing unit database:<br>
initializing unit database: alloc=3745512 time=2.507<br>
*** Chasing dependencies:<br>
*** systool:cpp:<br>
systool:cpp: alloc=213016 time=0.552<br>
Chasing dependencies: alloc=11345152 time=5.353<br>
Linking .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.4.1.0/build/test-rdfproof/test-rdfproof<br>
...<br>
...<br>
... then it goes on to run the test<br>
...<br>
<br>
With 9.2.4 it will not build<br>
<br>
%<br>
... similar to above but with some information about the versions not<br>
... fully tested with stack<br>
...<br>
*** Parser [Main]:<br>
Parser [Main]: alloc=24346008 time=8.730<br>
*** Renamer/typechecker [Main]:<br>
Renamer/typechecker [Main]: alloc=58415776 time=44.077<br>
*** Desugar [Main]:<br>
Desugar [Main]: alloc=22148416 time=15.693<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=651048904 time=530.123<br>
*** Specialise [Main]:<br>
Specialise [Main]: alloc=44412080 time=31.885<br>
*** Float out(FOS {Lam = Just 0,<br>
Consts = True,<br>
OverSatApps = False}) [Main]:<br>
Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False})<br>
[Main]: alloc=207753368 time=259.238<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=599788216 time=548.107<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=562910904 time=474.847<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=725093584 time=643.255<br>
Float inwards [Main]: alloc=23720 time=0.011<br>
Called arity analysis [Main]: alloc=25856 time=0.012<br>
*** Float inwards [Main]:<br>
*** Called arity analysis [Main]:<br>
*** Simplifier [Main]:<br>
<br>
<br>
At this point it just makes my laptop fan spin faster wit h one of my<br>
CPUs pegged at 100%, but it never seems to print anything more.<br>
<br>
For those that prefer nix, you can try the following which shows the<br>
same behavior (these are using the same mangled cabal file to get the<br>
timings):<br>
<br>
% nix-shell --argstr compiler ghc923<br>
% cabal test test-rdfproof<br>
...<br>
[2 of 2] Compiling Main ( tests/RDFProofTest.hs,<br>
/home/dburke/rdf/temp/dist-newstyle/build/x86_64-linux/ghc-9.2.3/swish-0.10.2.0/t/test-rdfproof/build/test-rdfproof/test-rdfproof-tmp/Main.o<br>
)<br>
*** Parser [Main]:<br>
Parser [Main]: alloc=25233912 time=9.910<br>
*** Renamer/typechecker [Main]:<br>
Renamer/typechecker [Main]: alloc=57027880 time=45.911<br>
*** Desugar [Main]:<br>
Desugar [Main]: alloc=21808096 time=54.569<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=936319072 time=880.189<br>
*** Specialise [Main]:<br>
Specialise [Main]: alloc=41599784 time=23.425<br>
*** Float out(FOS {Lam = Just 0,<br>
Consts = True,<br>
OverSatApps = False}) [Main]:<br>
Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False})<br>
[Main]: alloc=204955224 time=226.189<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=610153728 time=654.735<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=566346328 time=549.298<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=801330080 time=802.428<br>
*** Float inwards [Main]:<br>
Float inwards [Main]: alloc=23160 time=0.012<br>
*** Called arity analysis [Main]:<br>
Called arity analysis [Main]: alloc=25296 time=0.013<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=423629864 time=320.611<br>
*** Demand analysis [Main]:<br>
Demand analysis [Main]: alloc=253018800 time=175.884<br>
*** Constructed Product Result analysis [Main]:<br>
Constructed Product Result analysis [Main]: alloc=74681224 time=28.675<br>
*** Worker Wrapper binds [Main]:<br>
Worker Wrapper binds [Main]: alloc=8622264 time=7.070<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=598294440 time=554.802<br>
*** Exitification transformation [Main]:<br>
Exitification transformation [Main]: alloc=26712 time=0.013<br>
*** Float out(FOS {Lam = Just 0,<br>
Consts = True,<br>
OverSatApps = True}) [Main]:<br>
Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = True})<br>
[Main]: alloc=179540608 time=226.938<br>
*** Common sub-expression [Main]:<br>
Common sub-expression [Main]: alloc=24800 time=0.014<br>
*** Float inwards [Main]:<br>
Float inwards [Main]: alloc=23168 time=0.010<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=382679152 time=318.224<br>
*** Demand analysis [Main]:<br>
Demand analysis [Main]: alloc=84192056 time=50.989<br>
*** CoreTidy [Main]:<br>
CoreTidy [Main]: alloc=45347360 time=44.571<br>
*** CorePrep [Main]:<br>
CorePrep [Main]: alloc=34753448 time=10.917<br>
*** CoreToStg [Main]:<br>
CoreToStg [Main]: alloc=108293568 time=114.768<br>
*** CodeGen [Main]:<br>
CodeGen [Main]: alloc=1475393208 time=858.854<br>
*** WriteIface [/home/dburke/rdf/temp/dist-newstyle/build/x86_64-linux/ghc-9.2.3/swish-0.10.2.0/t/test-rdfproof/build/test-rdfproof/test-rdfproof-tmp/Main.hi]:<br>
WriteIface [/home/dburke/rdf/temp/dist-newstyle/build/x86_64-linux/ghc-9.2.3/swish-0.10.2.0/t/test-rdfproof/build/test-rdfproof/test-rdfproof-tmp/Main.hi]:<br>
alloc=3732816 time=3.044<br>
*** systool:as:<br>
systool:as: alloc=132384 time=0.456<br>
*** initializing unit database:<br>
initializing unit database: alloc=7386016 time=4.306<br>
*** initializing unit database:<br>
initializing unit database: alloc=4000384 time=12.125<br>
*** Chasing dependencies:<br>
*** systool:cpp:<br>
systool:cpp: alloc=313896 time=0.486<br>
Chasing dependencies: alloc=12822240 time=6.459<br>
Linking /home/dburke/rdf/temp/dist-newstyle/build/x86_64-linux/ghc-9.2.3/swish-0.10.2.0/t/test-rdfproof/build/test-rdfproof/test-rdfproof<br>
...<br>
...<br>
<br>
versus<br>
<br>
% nix-shell --argstr compiler ghc924<br>
cabal test test-rdfproof<br>
Warning: The package list for '<a href="http://hackage.haskell.org" rel="noreferrer" target="_blank">hackage.haskell.org</a>' is 20 days old.<br>
Run 'cabal update' to get the latest list of available packages.<br>
Resolving dependencies...<br>
Build profile: -w ghc-9.2.4 -O1<br>
In order, the following will be built (use -v for more details):<br>
- swish-0.10.2.0 (test:test-rdfproof) (first run)<br>
Preprocessing test suite 'test-rdfproof' for swish-0.10.2.0..<br>
Building test suite 'test-rdfproof' for swish-0.10.2.0..<br>
*** initializing unit database:<br>
initializing unit database: alloc=7389248 time=4.462<br>
*** initializing unit database:<br>
initializing unit database: alloc=4001312 time=11.664<br>
*** Chasing dependencies:<br>
*** systool:cpp:<br>
systool:cpp: alloc=319464 time=0.481<br>
Chasing dependencies: alloc=12861208 time=6.331<br>
[2 of 2] Compiling Main ( tests/RDFProofTest.hs,<br>
/home/dburke/rdf/temp/dist-newstyle/build/x86_64-linux/ghc-9.2.4/swish-0.10.2.0/t/test-rdfproof/build/test-rdfproof/test-rdfproof-tmp/Main.o<br>
)<br>
*** Parser [Main]:<br>
Parser [Main]: alloc=25236056 time=23.982<br>
*** Renamer/typechecker [Main]:<br>
Renamer/typechecker [Main]: alloc=101830968 time=97.529<br>
*** Desugar [Main]:<br>
Desugar [Main]: alloc=24617072 time=19.187<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=665051592 time=558.078<br>
*** Specialise [Main]:<br>
Specialise [Main]: alloc=44894576 time=30.341<br>
*** Float out(FOS {Lam = Just 0,<br>
Consts = True,<br>
OverSatApps = False}) [Main]:<br>
Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False})<br>
[Main]: alloc=208060752 time=245.458<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=602721856 time=555.073<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=563887832 time=529.865<br>
*** Simplifier [Main]:<br>
Simplifier [Main]: alloc=727381840 time=606.367<br>
*** Float inwards [Main]:<br>
Float inwards [Main]: alloc=23720 time=0.012<br>
*** Called arity analysis [Main]:<br>
Called arity analysis [Main]: alloc=25848 time=0.012<br>
*** Simplifier [Main]:<br>
<br>
which again hangs<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>