[Haskell-cafe] any advice for tracking down a failure to compile (it just hangs) with ghc 9.2.4?

Doug Burke dburke.gw at gmail.com
Tue Sep 6 13:02:45 UTC 2022


Cheers - email sent to ghc-devs.

Doug

On Tue, Sep 6, 2022 at 8:08 AM Simon Jakobi <simon.jakobi at googlemail.com> wrote:
>
> Since this seems to be a regression in 9.2.4, I'd suggest not to wait too long with reporting this on GHC's issue tracker. The GHC devs can also give you advice on diagnosing this further.
>
> Am Di., 6. Sept. 2022 um 00:01 Uhr schrieb Doug Burke <dburke.gw at gmail.com>:
>>
>> I have noticed I can't run one of my tests when building with ghc
>> 9.2.4 (tried via stack and nix) that doesn't happen with ghc 9.2.3 (or
>> older versions).
>>
>> Is there a way to diagnose the problem (so I can look at the ghc bug
>> tracker or try and make the code smaller for testing)?
>>
>> I can see this behavior with the following reproducer (it's a bit
>> heavyweight at the moment!):
>>
>> % git clone https://gitlab.com/dburke/swish temp
>> % cd temp
>>
>> Added to get the timings, but it's not strictly necessary:
>>
>> % sed -i -e "s/-Wall /-Wall -ddump-timings /" swish.cabal
>>
>> Now try to build and run the test. The following build and run the
>> test quickly if using an older GHC (e.g. "--resolver lts" for the
>> stack case or "--argstr compiler ghc923" for the nix case).
>>
>> First with stack
>>
>> % sed -i -e "s/-Wall /-Wall -ddump-timings /" swish.cabal
>> % stack test --resolver nightly-2022-09-05 :test-rdfproof
>> Stack has not been tested with GHC versions above 9.0, and using
>> 9.2.4, this may fail
>> Stack has not been tested with Cabal versions above 3.4, but version
>> 3.6.3.0 was found, this may fail
>> swish> configure (lib + test)
>> Configuring swish-0.10.2.0...
>> swish> build (lib + test)
>> Preprocessing library for swish-0.10.2.0..
>> Building library for swish-0.10.2.0..
>> Preprocessing test suite 'test-rdfproof' for swish-0.10.2.0..
>> Building test suite 'test-rdfproof' for swish-0.10.2.0..
>> *** initializing unit database:
>> initializing unit database: alloc=7350056 time=8.753
>> *** initializing unit database:
>> initializing unit database: alloc=3999144 time=16.194
>> *** Chasing dependencies:
>> *** systool:cpp:
>> systool:cpp: alloc=271104 time=1.991
>> Chasing dependencies: alloc=10233768 time=8.400
>> [2 of 2] Compiling Main
>> *** Parser [Main]:
>> Parser [Main]: alloc=24346344 time=33.067
>> *** Renamer/typechecker [Main]:
>> Renamer/typechecker [Main]: alloc=101896128 time=134.992
>> *** Desugar [Main]:
>> Desugar [Main]: alloc=24628816 time=24.813
>> *** Simplifier [Main]:
>> Simplifier [Main]: alloc=667236400 time=775.137
>> *** Specialise [Main]:
>> Specialise [Main]: alloc=45057312 time=40.543
>> *** Float out(FOS {Lam = Just 0,
>>                    Consts = True,
>>                    OverSatApps = False}) [Main]:
>> Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False})
>> [Main]: alloc=208806472 time=330.396
>> *** Simplifier [Main]:
>> Simplifier [Main]: alloc=603245992 time=747.067
>> *** Simplifier [Main]:
>> Simplifier [Main]: alloc=564322584 time=709.583
>> *** Simplifier [Main]:
>> Simplifier [Main]: alloc=728039528 time=835.525
>> *** Float inwards [Main]:
>> *** Called arity analysis [Main]:
>> *** Simplifier [Main]:
>> Float inwards [Main]: alloc=23720 time=0.017
>> Called arity analysis [Main]: alloc=25848 time=0.016
>> Progress 0/2
>>
>>
>> Now with nix
>>
>> % nix-shell --argstr compiler ghc924
>> ... wait an indeterminate amount of time
>> % ghc --version
>> The Glorious Glasgow Haskell Compilation System, version 9.2.4
>> % cabal test test-rdfproof
>> Warning: The package list for 'hackage.haskell.org' is 19 days old.
>> Run 'cabal update' to get the latest list of available packages.
>> Resolving dependencies...
>> Build profile: -w ghc-9.2.4 -O1
>> In order, the following will be built (use -v for more details):
>>  - swish-0.10.2.0 (lib) (first run)
>>  - swish-0.10.2.0 (test:test-rdfproof) (first run)
>> Configuring library for swish-0.10.2.0..
>> Preprocessing library for swish-0.10.2.0..
>> Building library for swish-0.10.2.0..
>> [ 1 of 55] Compiling Data.Interned.URI
>> [ 2 of 55] Compiling Data.Ord.Partial
>> [ 3 of 55] Compiling Data.String.ShowLines
>> [ 4 of 55] Compiling Network.URI.Ord
>> [ 5 of 55] Compiling Swish.GraphClass
>> ...
>> ... a lot more, including some annoying non-exhaustive patterns I
>> don't know how to fix
>> ... but that's for a different post
>> ...
>> [55 of 55] Compiling Swish
>> Configuring test suite 'test-rdfproof' for swish-0.10.2.0..
>> Preprocessing test suite 'test-rdfproof' for swish-0.10.2.0..
>> Building test suite 'test-rdfproof' for swish-0.10.2.0..
>> *** initializing unit database:
>> initializing unit database: alloc=7389248 time=4.436
>> *** initializing unit database:
>> initializing unit database: alloc=4001312 time=11.992
>> *** Chasing dependencies:
>> *** systool:cpp:
>> systool:cpp: alloc=319464 time=0.520
>> Chasing dependencies: alloc=12863280 time=6.581
>> [1 of 2] Compiling TestHelpers      ( tests/TestHelpers.hs,
>> /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/TestHelpers.o
>> )
>> *** Parser [TestHelpers]:
>> Parser [TestHelpers]: alloc=5469952 time=2.325
>> *** Renamer/typechecker [TestHelpers]:
>> Renamer/typechecker [TestHelpers]: alloc=94049744 time=106.001
>> *** Desugar [TestHelpers]:
>> Desugar [TestHelpers]: alloc=5551840 time=2.974
>> *** Simplifier [TestHelpers]:
>> Simplifier [TestHelpers]: alloc=45720248 time=28.537
>> *** Specialise [TestHelpers]:
>> Specialise [TestHelpers]: alloc=2198344 time=0.717
>> *** Float out(FOS {Lam = Just 0,
>>                    Consts = True,
>>                    OverSatApps = False}) [TestHelpers]:
>> Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False})
>> [TestHelpers]: alloc=6183280 time=3.109
>> *** Simplifier [TestHelpers]:
>> Simplifier [TestHelpers]: alloc=27272104 time=16.042
>> *** Simplifier [TestHelpers]:
>> Simplifier [TestHelpers]: alloc=20805544 time=12.332
>> *** Simplifier [TestHelpers]:
>> Simplifier [TestHelpers]: alloc=6175584 time=2.825
>> *** Float inwards [TestHelpers]:
>> Float inwards [TestHelpers]: alloc=26272 time=0.012
>> *** Called arity analysis [TestHelpers]:
>> Called arity analysis [TestHelpers]: alloc=28392 time=0.012
>> *** Simplifier [TestHelpers]:
>> Simplifier [TestHelpers]: alloc=14755744 time=7.017
>> *** Demand analysis [TestHelpers]:
>> Demand analysis [TestHelpers]: alloc=2061096 time=1.296
>> *** Constructed Product Result analysis [TestHelpers]:
>> Constructed Product Result analysis [TestHelpers]: alloc=466968 time=0.197
>> *** Worker Wrapper binds [TestHelpers]:
>> Worker Wrapper binds [TestHelpers]: alloc=436552 time=0.201
>> *** Simplifier [TestHelpers]:
>> Simplifier [TestHelpers]: alloc=31897488 time=18.652
>> *** Exitification transformation [TestHelpers]:
>> Exitification transformation [TestHelpers]: alloc=29808 time=0.013
>> *** Float out(FOS {Lam = Just 0,
>>                    Consts = True,
>>                    OverSatApps = True}) [TestHelpers]:
>> Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = True})
>> [TestHelpers]: alloc=5508568 time=4.009
>> *** Common sub-expression [TestHelpers]:
>> Common sub-expression [TestHelpers]: alloc=27896 time=0.013
>> *** Float inwards [TestHelpers]:
>> Float inwards [TestHelpers]: alloc=26272 time=0.021
>> *** Simplifier [TestHelpers]:
>> Simplifier [TestHelpers]: alloc=24835440 time=15.291
>> *** Demand analysis [TestHelpers]:
>> Demand analysis [TestHelpers]: alloc=2214560 time=1.044
>> *** CoreTidy [TestHelpers]:
>> CoreTidy [TestHelpers]: alloc=2814672 time=1.457
>> *** CorePrep [TestHelpers]:
>> CorePrep [TestHelpers]: alloc=1965920 time=2.636
>> *** CoreToStg [TestHelpers]:
>> CoreToStg [TestHelpers]: alloc=3134560 time=1.484
>> *** CodeGen [TestHelpers]:
>> CodeGen [TestHelpers]: alloc=80232584 time=46.410
>> *** WriteIface [/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/TestHelpers.hi]:
>> WriteIface [/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/TestHelpers.hi]:
>> alloc=1780688 time=0.766
>> *** systool:as:
>> systool:as: alloc=137200 time=0.360
>> [2 of 2] Compiling Main             ( tests/RDFProofTest.hs,
>> /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
>> )
>> *** Parser [Main]:
>> Parser [Main]: alloc=25235720 time=8.851
>> *** Renamer/typechecker [Main]:
>> Renamer/typechecker [Main]: alloc=58415520 time=45.291
>> *** Desugar [Main]:
>> Desugar [Main]: alloc=22098688 time=46.709
>> *** Simplifier [Main]:
>> Simplifier [Main]: alloc=654052760 time=511.390
>> *** Specialise [Main]:
>> Specialise [Main]: alloc=44439912 time=34.132
>> *** Float out(FOS {Lam = Just 0,
>>                    Consts = True,
>>                    OverSatApps = False}) [Main]:
>> Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False})
>> [Main]: alloc=208317448 time=252.154
>> *** Simplifier [Main]:
>> Simplifier [Main]: alloc=601002912 time=546.343
>> *** Simplifier [Main]:
>> Simplifier [Main]: alloc=564371608 time=546.970
>> *** Simplifier [Main]:
>> Simplifier [Main]: alloc=726902400 time=613.423
>> *** Float inwards [Main]:
>> Float inwards [Main]: alloc=23720 time=0.024
>> *** Called arity analysis [Main]:
>> Called arity analysis [Main]: alloc=25856 time=0.013
>> *** Simplifier [Main]:
>>
>> At this point my laptop just sits there making whooshing noises as if
>> it's trying to become an aeroplane, but it never gets to where it's
>> going (to mix up my metaphors).
>>
>> Any help would be appreciated,
>> Doug
>> _______________________________________________
>> Haskell-Cafe mailing list
>> To (un)subscribe, modify options or view archives go to:
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>> Only members subscribed via the mailman list are allowed to post.


More information about the Haskell-Cafe mailing list