NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.82k stars 13.92k forks source link

Segfault in Setup when building Haskell packages #52439

Open basvandijk opened 5 years ago

basvandijk commented 5 years ago

Issue description

When building the HEAD revision of haskell-opencv on nixpkgs master I get a segfault when compiling one of the executables. This doesn't happen on release-18.09.

Unsurprisingly, when I keep the build directory like:

nix-build -A haskellPackages.opencv --keep-failed --option sandbox false

and then build manually I also get the segfault:

⚡ root@bassbox > ⌚13:59:53 > /tmp/nix-build-opencv-0.0.2.1.drv-0/opencv-src >
$ ./Setup build                                               
Preprocessing library for opencv-0.0.2.1..
Building library for opencv-0.0.2.1..
Preprocessing test suite 'test-opencv' for opencv-0.0.2.1..
Building test suite 'test-opencv' for opencv-0.0.2.1..
Preprocessing test suite 'doc-images-opencv' for opencv-0.0.2.1..
Building test suite 'doc-images-opencv' for opencv-0.0.2.1..
[3 of 3] Compiling Main             ( doc/images.hs, dist/build/doc-images-opencv/doc-images-opencv-tmp/Main.o )
[1]    18313 segmentation fault  ./Setup build

However, when I then build again the segfault disappears and I have a successful build:

 ⚡ root@bassbox > ⌚14:00:15 > /tmp/nix-build-opencv-0.0.2.1.drv-0/opencv-src >
$ ./Setup build
Preprocessing library for opencv-0.0.2.1..
Building library for opencv-0.0.2.1..
Preprocessing test suite 'test-opencv' for opencv-0.0.2.1..
Building test suite 'test-opencv' for opencv-0.0.2.1..
Preprocessing test suite 'doc-images-opencv' for opencv-0.0.2.1..
Building test suite 'doc-images-opencv' for opencv-0.0.2.1..
Linking dist/build/doc-images-opencv/doc-images-opencv ...

@nh2 and I are currently bisecting this. We'll update this ticket when we have more information.

Steps to reproduce

Clone haskell-opencv, set nixpkgs-version.nix to the latest nixpkgs and build it using nix-build -A haskellPackages.opencv

Technical details

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.6, NixOS, 18.09pre-git (Jellyfish)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.1.3`
 - channels(root): `"nixos-17.03.982.b647a67dfe"`
 - nixpkgs: `/nix/store/ri1gi55p938rhrcv28fiicmsqiljwzlr-ahlshsgma50hzi07wya3rmn2mkfgrgyw-source`
nh2 commented 5 years ago

CC @NorfairKing, who I know also had this issue on another Haskell package.

nh2 commented 5 years ago

Bisection completed. It suggests that the first bad commit is 81caec3568d96edc0a52762705dc0e2dae7e7c8b:

commit 81caec3568d96edc0a52762705dc0e2dae7e7c8b (refs/bisect/bad)
Author: Dmitry Vyal <dmitryvyal@gmail.com>
Date:   Sun Sep 2 11:18:35 2018 +0300

    openblas-0.3.1 -> 0.3.3

Bisection log:

% git bisect log
git bisect start
# good: [873173aa3833487147b3c34c056e121a57791be7] inboxer: 1.1.4 -> 1.1.5 (#47047)
git bisect good 873173aa3833487147b3c34c056e121a57791be7
# bad: [1b769de74c5b7c4708e1a4aa8f46beca58ace5d8] Merge pull request #47716 from r-ryantm/auto-update/visualvm
git bisect bad 1b769de74c5b7c4708e1a4aa8f46beca58ace5d8
# skip: [2b4b7d4ef3bba661fbafbced814a8b39c65ea81a] Merge pull request #47233 from oxij/tree/mass-rebuild-noop-cleanups
git bisect skip 2b4b7d4ef3bba661fbafbced814a8b39c65ea81a
# bad: [56621c016d543f58817e0dc2c6189bf635ae9799] ffmpeg: unbreak build of older versions after #46078
git bisect bad 56621c016d543f58817e0dc2c6189bf635ae9799
# good: [0d91e3b5509bada40a1c83f5a503d294cad81749] mesa: add new required dep on libXrandr
git bisect good 0d91e3b5509bada40a1c83f5a503d294cad81749
# bad: [0ae8ac86510aae6491f49964f0b8af99dc2869e9] Merge pull request #47219 from lheckemann/xcb-1.13
git bisect bad 0ae8ac86510aae6491f49964f0b8af99dc2869e9
# good: [2744f5a3ada448b7d82a954ec71ab18e71583894] [cpan2nix] perlPackages.IOSocketSSL: 2.059 -> 2.060
git bisect good 2744f5a3ada448b7d82a954ec71ab18e71583894
# good: [7cf45d7a3cccb25d0c8b760fdfd3ff8284133f06] [cpan2nix] perlPackages.LogDispatch: 2.67 -> 2.68
git bisect good 7cf45d7a3cccb25d0c8b760fdfd3ff8284133f06
# good: [2e3d8413992e11fc66ed3ee53c2587075cf1f44d] Merge pull request #47106 from volth/cpan2nix-2018-09-21
git bisect good 2e3d8413992e11fc66ed3ee53c2587075cf1f44d
# bad: [81caec3568d96edc0a52762705dc0e2dae7e7c8b] openblas-0.3.1 -> 0.3.3
git bisect bad 81caec3568d96edc0a52762705dc0e2dae7e7c8b
# good: [14673d61ed94bcb9c54d24bacd7b15420d3e3fab] Merge master into staging
git bisect good 14673d61ed94bcb9c54d24bacd7b15420d3e3fab
# first bad commit: [81caec3568d96edc0a52762705dc0e2dae7e7c8b] openblas-0.3.1 -> 0.3.3

And I have manually checked that the identified commit segfaults and the one before doesn't.

NorfairKing commented 5 years ago

@nh2 What has openblas to do with haskell compilation? Does GHC use linear algebra for compilation?

nh2 commented 5 years ago

@NorfairKing I'd expect opencv to use it. I'm not sure if it's also used in your failing build.

NorfairKing commented 5 years ago

@nh2 I was compiling my blog server: cs-syd.eu Specifically the module that embeds the assets into the executable using yesod-static failed.

NorfairKing commented 5 years ago
nix-store -qR '/nix/store/wpcxxk9vgdhs416m5ggcq4vvd5f9zfd3-site-0.0.0.drv' | grep openblas
 ✘

My drv doesn't depend on openblas either.

NorfairKing commented 5 years ago

I'm using this nixpkgs version:

{
  rev    = "771849af9e9081c11994a3eded6229f2adfe7496";
  sha256 = "0x4grfhwfvwyqklx4fq72yhd4fr4alb7ndzxzbvs9426136qd6sa";
}
NorfairKing commented 5 years ago

I tried to build 20 times, 2 successes and 18 failures:


nix-store --delete /nix/store/18cx4f0q70z46wgz7nyz9a073m05hpk4-site-0.0.0 && time nix-build --no-link```
nh2 commented 5 years ago

When I revert the commit above on top of 3ab361cb57b1c37a46b568e97d2e5025a1361c0c, I get this when running opencv's tests:

      Feature Detection
        houghLinesP:                                 
  libgomp: Out of memory allocating 927712937064 bytes

927 GB, nice.

The next time I run it, I get something different:

    Feature Detection
      houghLinesP:                                 
libgomp: Thread creation failed: Resource temporarily unavailable
free(): invalid pointer

So looks like master isn't happy with openblas-0.3.1.

nh2 commented 5 years ago

I'm trying now with openblas-0.3.4.

nh2 commented 5 years ago

I'm trying now with openblas-0.3.4.

Doesn't help: The tests hang for 15 hours already at 100% CPU, strace shows a loop of:

[pid  8658] rt_sigreturn({mask=[]})     = 64
[pid  8658] --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
[pid  8658] rt_sigreturn({mask=[]})     = 64
[pid  8658] --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
[pid  8658] rt_sigreturn({mask=[]})     = 64
[pid  8658] --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
basvandijk commented 5 years ago

Unsurprisingly disabling openblas in opencv3 gets rids of the segfault. It does fail on the libgomp error that @nh2 reported earlier:

$ cd haskell-opencv
$ nix-build -E \
  "let pkgs = import ./. {}; \
   in pkgs.haskellPackages.opencv.override { \
     opencv3 = pkgs.opencv3.override { \
       enableOpenblas = false; \
     }; \
   }"
...
    Feature Detection
      houghLinesP:
libgomp: Out of memory allocating 927712937064 bytes
basvandijk commented 5 years ago

The segfault is also not present when building with openblas-0.3.2. So it has to be caused by something in https://github.com/xianyi/OpenBLAS/compare/v0.3.2..v0.3.3.

nh2 commented 5 years ago

I'm trying now with openblas-0.3.4.

Doesn't help: The tests hang for 15 hours already at 100%

I forgot to mention: That one succeeds past the linker step where we usually get the segfault:

[3 of 3] Compiling Main             ( doc/images.hs, dist/build/doc-images-opencv/doc-images-opencv-tmp/Main.o )
Linking dist/build/doc-images-opencv/doc-images-opencv ...
Preprocessing benchmark 'bench-opencv' for opencv-0.0.2.1..
...
nh2 commented 5 years ago

However, when I then build again the segfault disappears and I have a successful build:

This part is still utmost suspicious (it happens to me reliably as well).

Doing rm dist/build/doc-images-opencv/doc-images-opencv-tmp/Main.o and building again re-triggers the segfault.

nh2 commented 5 years ago

I've built with ./Setup build -v and confirmed that indeed it's crashing as part of the GHC invocation, not something further up:

niklas@ares:/tmp/nix-build-opencv-0.0.2.1.drv-0/opencv-src$ /nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/bin/ghc --make -no-link -fbuilding-cabal-package -O -static -outputdir dist/build/doc-images-opencv/doc-images-opencv-tmp -odir dist/build/doc-images-opencv/doc-images-opencv-tmp -hidir dist/build/doc-images-opencv/doc-images-opencv-tmp -stubdir dist/build/doc-images-opencv/doc-images-opencv-tmp -i -idist/build/doc-images-opencv/doc-images-opencv-tmp -idoc -idist/build/doc-images-opencv/autogen -idist/build/global-autogen -Idist/build/doc-images-opencv/autogen -Idist/build/global-autogen -Idist/build/doc-images-opencv/doc-images-opencv-tmp -I/nix/store/j573pqybmmy6n2wjb9mw9h657hmqf7wb-opencv-3.4.4/include -optP-include -optPdist/build/doc-images-opencv/autogen/cabal_macros.h -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /tmp/nix-build-opencv-0.0.2.1.drv-0/package.conf.d -package-db dist/package.conf.inplace -package-id base-4.11.1.0 -package-id bytestring-0.10.8.2 -package-id containers-0.5.11.0 -package-id data-default-0.7.1.1-JU0tK7MsWQxFeBDXsMopAU -package-id directory-1.3.1.5 -package-id Glob-0.9.3-7ezF27bLnby7o45COKo9bc -package-id haskell-src-exts-1.20.3-KjyAxm84ddk16DoDOnTGLG -package-id JuicyPixels-3.2.9.5-228KAmffah2EHAhe61mJze -package-id linear-1.20.8-4ZVKNh6PPLgAMGxipcwitY -package-id opencv-0.0.2.1-HWLEHw8y7ZcCelxlYQnnuM -package-id primitive-0.6.3.0-DaZpcxwJp2TGn8ITSgfI4C -package-id template-haskell-2.13.0.0 -package-id text-1.2.3.1 -package-id transformers-0.5.5.0 -package-id vector-0.12.0.2-4IpdnxtqTfNJ9xEZNSAM2c -XHaskell2010 -XBangPatterns -XDataKinds -XLambdaCase -XOverloadedStrings -XPackageImports -XPolyKinds -XScopedTypeVariables -XTupleSections -XTypeFamilies -XTypeOperators ExampleExtractor Language.Haskell.Meta.Syntax.Translate doc/images.hs -Wall -fwarn-incomplete-patterns -threaded -funbox-strict-fields -rtsopts -j4 -split-sections

[3 of 3] Compiling Main             ( doc/images.hs, dist/build/doc-images-opencv/doc-images-opencv-tmp/Main.o )
Segmentation fault (core dumped)

Expanding the ghc invocation (which is a bash script):

niklas@ares:/tmp/nix-build-opencv-0.0.2.1.drv-0/opencv-src$ rm dist/build/doc-images-opencv/doc-images-opencv-tmp/Main.o niklas@ares:/tmp/nix-build-opencv-0.0.2.1.drv-0/opencv-src$ /nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/lib/ghc-8.4.4/bin/ghc -B/nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/lib/ghc-8.4.4 --make -no-link -fbuilding-cabal-package -O -static -outputdir dist/build/doc-images-opencv/doc-images-opencv-tmp -odir dist/build/doc-images-opencv/doc-images-opencv-tmp -hidir dist/build/doc-images-opencv/doc-images-opencv-tmp -stubdir dist/build/doc-images-opencv/doc-images-opencv-tmp -i -idist/build/doc-images-opencv/doc-images-opencv-tmp -idoc -idist/build/doc-images-opencv/autogen -idist/build/global-autogen -Idist/build/doc-images-opencv/autogen -Idist/build/global-autogen -Idist/build/doc-images-opencv/doc-images-opencv-tmp -I/nix/store/j573pqybmmy6n2wjb9mw9h657hmqf7wb-opencv-3.4.4/include -optP-include -optPdist/build/doc-images-opencv/autogen/cabal_macros.h -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /tmp/nix-build-opencv-0.0.2.1.drv-0/package.conf.d -package-db dist/package.conf.inplace -package-id base-4.11.1.0 -package-id bytestring-0.10.8.2 -package-id containers-0.5.11.0 -package-id data-default-0.7.1.1-JU0tK7MsWQxFeBDXsMopAU -package-id directory-1.3.1.5 -package-id Glob-0.9.3-7ezF27bLnby7o45COKo9bc -package-id haskell-src-exts-1.20.3-KjyAxm84ddk16DoDOnTGLG -package-id JuicyPixels-3.2.9.5-228KAmffah2EHAhe61mJze -package-id linear-1.20.8-4ZVKNh6PPLgAMGxipcwitY -package-id opencv-0.0.2.1-HWLEHw8y7ZcCelxlYQnnuM -package-id primitive-0.6.3.0-DaZpcxwJp2TGn8ITSgfI4C -package-id template-haskell-2.13.0.0 -package-id text-1.2.3.1 -package-id transformers-0.5.5.0 -package-id vector-0.12.0.2-4IpdnxtqTfNJ9xEZNSAM2c -XHaskell2010 -XBangPatterns -XDataKinds -XLambdaCase -XOverloadedStrings -XPackageImports -XPolyKinds -XScopedTypeVariables -XTupleSections -XTypeFamilies -XTypeOperators ExampleExtractor Language.Haskell.Meta.Syntax.Translate doc/images.hs -Wall -fwarn-incomplete-patterns -threaded -funbox-strict-fields -rtsopts -j4 -split-sections

[3 of 3] Compiling Main             ( doc/images.hs, dist/build/doc-images-opencv/doc-images-opencv-tmp/Main.o )

<no location info>: error:
    /tmp/nix-build-opencv-0.0.2.1.drv-0/ghc17140_0/ghc_10.s: hClose: resource exhausted (No space left on device)
Segmentation fault (core dumped)

This is just because I'm out of disk space right no, but interesting about it is that it still segfaults after this critical error!

Making some space, the No space left on device goes away and the segfault stays. Showing the core dump with gdb:

niklas@ares:/tmp/nix-build-opencv-0.0.2.1.drv-0/opencv-src$ /usr/bin/gdb /nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/lib/ghc-8.4.4/bin/ghc core
...
Reading symbols from /nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/lib/ghc-8.4.4/bin/ghc...(no debugging symbols found)...done.
[New LWP 17576]
...
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Core was generated by `/nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/lib/ghc-8.4.4/bin/ghc -B/'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f7a31534880 in blas_memory_free () from /nix/store/ww2lj137v7mpkxcsmpnv67xa2ybrff77-openblas-0.3.3/lib/libopenblas.so.0
...
(gdb) bt
#0  0x00007f7a31534880 in blas_memory_free () from /nix/store/ww2lj137v7mpkxcsmpnv67xa2ybrff77-openblas-0.3.3/lib/libopenblas.so.0
#1  0x00007f7a31535325 in blas_thread_shutdown_ () from /nix/store/ww2lj137v7mpkxcsmpnv67xa2ybrff77-openblas-0.3.3/lib/libopenblas.so.0
#2  0x00007f7a315348bb in blas_shutdown () from /nix/store/ww2lj137v7mpkxcsmpnv67xa2ybrff77-openblas-0.3.3/lib/libopenblas.so.0
#3  0x00007f7a313bb014 in gotoblas_quit () from /nix/store/ww2lj137v7mpkxcsmpnv67xa2ybrff77-openblas-0.3.3/lib/libopenblas.so.0
#4  0x00007f7a950cb3b7 in _dl_fini () from /nix/store/1mnsmslnx5anjfksac6417xfzzglrwhr-glibc-2.27/lib/ld-linux-x86-64.so.2
#5  0x00007f7a8a3f9351 in __run_exit_handlers () from /nix/store/1mnsmslnx5anjfksac6417xfzzglrwhr-glibc-2.27/lib/libc.so.6
#6  0x00007f7a8a3f943a in exit () from /nix/store/1mnsmslnx5anjfksac6417xfzzglrwhr-glibc-2.27/lib/libc.so.6
#7  0x00007f7a8b4c3bfb in stg_exit () from /nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/lib/ghc-8.4.4/bin/../rts/libHSrts_thr-ghc8.4.4.so
#8  0x00007f7a8b4c404e in shutdownHaskellAndExit () from /nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/lib/ghc-8.4.4/bin/../rts/libHSrts_thr-ghc8.4.4.so
#9  0x00007f7a8b4b46ff in hs_main () from /nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/lib/ghc-8.4.4/bin/../rts/libHSrts_thr-ghc8.4.4.so
#10 0x000000000042a8b9 in main ()

So this does point directly at blas_memory_free () from blas_thread_shutdown_ () (note above I'm using openblas 0.3.3.

nh2 commented 5 years ago

@basvandijk To debug further I must be able to iterate more quickly, right now I'm stuck in this dependency that will recompile GHC when I change openblas:

/nix/store/749p6rgih94vdcd8bdvbigbiwcl3pqcf-openblas-0.3.3.drv
/nix/store/xvlapll4syvnsi22w6jyvgwsi8sv1j7i-python3.7-numpy-1.15.3.drv
/nix/store/1c1plclk0w7k70h5hjfazsp0pbkm5jpj-python3.7-Cython-0.29.drv
/nix/store/abqd6m4v1l3lrzkiglkd1sws98prcm0j-python3.7-PyStemmer-1.3.0.drv
/nix/store/1wkm45qp3am1i6n85gbdwhprmbqdgbcy-python3.7-snowballstemmer-1.2.1.drv
/nix/store/8iixy91cdws6qim9d6vbmw348y53p2bj-python3.7-sphinx-1.7.9.drv
/nix/store/lp43k60dkccaksv6lsvkljgypnwnxvhi-ghc-8.4.4.drv
/nix/store/539hw3c9kmrivsy5d9i5cxxbn05bvsfj-cabal2nix-2.12.drv
/nix/store/f5l6viwsn94pbfihh349j3v6psvrj71h-cabal2nix-opencv.drv
/nix/store/f5l6viwsn94pbfihh349j3v6psvrj71h-cabal2nix-opencv.drv

Even with your commit d899185 it'll build GHC (though not via cabal2nix so at least I can see it immediately). Maybe we can LD_LIBRARY_PATH openblas to iterate quickly.

basvandijk commented 5 years ago

@nh2 instead of overriding openblas globally you could override it only for opencv3 as in:

$ nix-build -E \
  "let pkgs = import ./. {}; \
   in pkgs.haskellPackages.opencv.override { \
        opencv3 = pkgs.opencv3.override { \
          openblas = myOpenblas; \ 
        }; \
      }"
nh2 commented 5 years ago

Maybe we can LD_LIBRARY_PATH openblas to iterate quickly.

This approach works for me, I run e.g.

niklas@ares:/tmp/nix-build-opencv-0.0.2.1.drv-0/opencv-src$ LD_LIBRARY_PATH=/nix/store/lr9r9pwmndbsnva9miap5aa1l4nlv5jx-openblas-0.3.3/lib:$LD_LIBRARY_PATH /usr/bin/time /nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/lib/ghc-8.4.4/bin/ghc -B/nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/lib/ghc-8.4.4 --make -no-link -fbuilding-cabal-package -O -static -outputdir dist/build/doc-images-opencv/doc-images-opencv-tmp -odir dist/build/doc-images-opencv/doc-images-opencv-tmp -hidir dist/build/doc-images-opencv/doc-images-opencv-tmp -stubdir dist/build/doc-images-opencv/doc-images-opencv-tmp -i -idist/build/doc-images-opencv/doc-images-opencv-tmp -idoc -idist/build/doc-images-opencv/autogen -idist/build/global-autogen -Idist/build/doc-images-opencv/autogen -Idist/build/global-autogen -Idist/build/doc-images-opencv/doc-images-opencv-tmp -I/nix/store/j573pqybmmy6n2wjb9mw9h657hmqf7wb-opencv-3.4.4/include -optP-include -optPdist/build/doc-images-opencv/autogen/cabal_macros.h -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /tmp/nix-build-opencv-0.0.2.1.drv-0/package.conf.d -package-db dist/package.conf.inplace -package-id base-4.11.1.0 -package-id bytestring-0.10.8.2 -package-id containers-0.5.11.0 -package-id data-default-0.7.1.1-JU0tK7MsWQxFeBDXsMopAU -package-id directory-1.3.1.5 -package-id Glob-0.9.3-7ezF27bLnby7o45COKo9bc -package-id haskell-src-exts-1.20.3-KjyAxm84ddk16DoDOnTGLG -package-id JuicyPixels-3.2.9.5-228KAmffah2EHAhe61mJze -package-id linear-1.20.8-4ZVKNh6PPLgAMGxipcwitY -package-id opencv-0.0.2.1-HWLEHw8y7ZcCelxlYQnnuM -package-id primitive-0.6.3.0-DaZpcxwJp2TGn8ITSgfI4C -package-id template-haskell-2.13.0.0 -package-id text-1.2.3.1 -package-id transformers-0.5.5.0 -package-id vector-0.12.0.2-4IpdnxtqTfNJ9xEZNSAM2c -XHaskell2010 -XBangPatterns -XDataKinds -XLambdaCase -XOverloadedStrings -XPackageImports -XPolyKinds -XScopedTypeVariables -XTupleSections -XTypeFamilies -XTypeOperators ExampleExtractor Language.Haskell.Meta.Syntax.Translate doc/images.hs -Wall -fwarn-incomplete-patterns -threaded -funbox-strict-fields -rtsopts -j4 -split-sections

and then

niklas@ares:/tmp/nix-build-opencv-0.0.2.1.drv-0/opencv-src$ LD_LIBRARY_PATH=/nix/store/lr9r9pwmndbsnva9miap5aa1l4nlv5jx-openblas-0.3.3/lib:$LD_LIBRARY_PATH /usr/bin/gdb /nix/store/wc4chfs9wgi67g1r7im93358h1j6cdkz-ghc-8.4.4/lib/ghc-8.4.4/bin/ghc core

That way I generated https://github.com/xianyi/OpenBLAS/issues/1923#issuecomment-448728671

NorfairKing commented 5 years ago

@nh2 @basvandijk I'm thinking that blas may be a red herring because the segfault that I see, happens in a closure that doesn't involve blas.

nh2 commented 5 years ago

@NorfairKing That's right, I also think that (https://github.com/xianyi/OpenBLAS/issues/1923#issuecomment-448715395).

We should gdb your failure, so we can see where it is; in the case of OpenBLAS gdb showed the error location precisely. Let me know when you have time.

NorfairKing commented 5 years ago

https://github.com/NorfairKing/nix-segfault-haskell Here's a minimal almost-reproducible example.

NorfairKing commented 5 years ago
[nixbld1@nona nix-segfault-haskell]$ rm dist/build/Lib.o 
[nixbld1@nona nix-segfault-haskell]$ /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/bin/ghc --make -fbuilding-cabal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -isrc -idist/build/autogen -idist/build/global-autogen -Idist/build/autogen -Idist/build/global-autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -this-unit-id segfault-0.0.0-G2YKYaaGIenGdA1YODfaB0 -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /tmp/nix-build-segfault-0.0.0.drv-2/package.conf.d -package-db dist/package.conf.inplace -package-id base-4.11.1.0 -package-id bytestring-0.10.8.2 -package-id file-embed-0.0.10.1-JBj0CTa3b3pL2aTV19QFZK -XHaskell2010 Lib Paths_segfault -j12 -split-sections
[2 of 2] Compiling Lib              ( src/Lib.hs, dist/build/Lib.o )
Segmentation fault (core dumped)
[nixbld1@nona nix-segfault-haskell]$ /usr/sbin/gdb /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/ghc 
app/            default.nix     .git/           myfile.png      package.yaml    segfault.cabal  src/
core.3212       dist/           .gitignore      nix/            README.md       Setup           stack.yaml
[nixbld1@nona nix-segfault-haskell]$ /usr/sbin/gdb /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/ghc core.3212 
GNU gdb (GDB) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/ghc...(no debugging symbols found)...done.
[New LWP 3232]
[New LWP 3244]
[New LWP 3252]
[New LWP 3230]
[New LWP 3231]
[New LWP 3212]
[New LWP 3213]
[New LWP 3242]
[New LWP 3226]
[New LWP 3227]
[New LWP 3233]
[New LWP 3251]
[New LWP 3225]
[New LWP 3241]
[New LWP 3245]
[New LWP 3224]
[New LWP 3214]
[New LWP 3237]
[New LWP 3235]
[New LWP 3215]
[New LWP 3238]
[New LWP 3216]
[New LWP 3248]
[New LWP 3253]
[New LWP 3234]
[New LWP 3266]
[New LWP 3239]
[New LWP 3247]
[New LWP 3250]
[New LWP 3249]
[New LWP 3240]
[New LWP 3228]
[New LWP 3229]
[New LWP 3246]
[New LWP 3236]
[New LWP 3243]

warning: File "/nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
    add-auto-load-safe-path /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libthread_db-1.0.so
line to your configuration file "/homeless-shelter/.gdbinit".
To completely disable this security protection add
    set auto-load safe-path /
line to your configuration file "/homeless-shelter/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
    info "(gdb)Auto-loading safe path"

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

warning: File "/nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Core was generated by `/nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/ghc -B/'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fad21c9ae9f in abort () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
[Current thread is 1 (LWP 3232)]
(gdb) bt
#0  0x00007fad21c9ae9f in abort () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad21cdb2ac in __libc_message () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#2  0x00007fad21cdb2ce in __libc_fatal () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#3  0x00007fad21a536a6 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#4  0x00007fad22d7fdd9 in waitCondition ()
   from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad22d6243b in yieldCapability ()
   from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#6  0x00007fad22d66e23 in schedule ()
   from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#7  0x00007fad22d6868c in scheduleWorker ()
   from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#8  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#9  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

The GDB output.

NorfairKing commented 5 years ago

Thread info

(gdb) thread apply all bt

Thread 36 (LWP 3243):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 35 (LWP 3236):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 34 (LWP 3246):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 33 (LWP 3229):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 32 (LWP 3228):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 31 (LWP 3240):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 30 (LWP 3249):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 29 (LWP 3250):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 28 (LWP 3247):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 27 (LWP 3239):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 26 (LWP 3266):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 25 (LWP 3234):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 24 (LWP 3253):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 23 (LWP 3248):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 22 (LWP 3216):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 21 (LWP 3238):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 20 (LWP 3215):
#0  0x00007fad21d4d501 in poll () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2417266c in ?? () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 19 (LWP 3235):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 18 (LWP 3237):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 17 (LWP 3214):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 16 (LWP 3224):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 15 (LWP 3245):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 14 (LWP 3241):
#0  0x00007fad2b2d4678 in ghc_X86ziPpr_zdwlvl_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../ghc-8.4.3/libHSghc-8.4.3-ghc8.4.3.so
#1  0x0000000000000000 in ?? ()

Thread 13 (LWP 3225):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 12 (LWP 3251):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 11 (LWP 3233):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 10 (LWP 3227):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 9 (LWP 3226):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 8 (LWP 3242):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 7 (LWP 3213):
#0  0x00007fad21d492cc in read () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad22d7fa44 in itimer_thread_func () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#3  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 6 (LWP 3212):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d68661 in scheduleWaitThread () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad22d55b2c in hs_main () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#6  0x000000000042a6f9 in main ()

Thread 5 (LWP 3231):
#0  0x00007fad21d57567 in epoll_wait () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad2415956a in base_GHCziEventziEPoll_new10_info () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../base-4.11.1.0/libHSbase-4.11.1.0-ghc8.4.3.so
#2  0x0000000000000000 in ?? ()

Thread 4 (LWP 3230):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 3 (LWP 3252):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 2 (LWP 3244):
#0  0x00007fad21a53592 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#1  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#2  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#3  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#4  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#6  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6

Thread 1 (LWP 3232):
#0  0x00007fad21c9ae9f in abort () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#1  0x00007fad21cdb2ac in __libc_message () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#2  0x00007fad21cdb2ce in __libc_fatal () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
#3  0x00007fad21a536a6 in pthread_cond_wait@@GLIBC_2.3.2 () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#4  0x00007fad22d7fdd9 in waitCondition () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#5  0x00007fad22d6243b in yieldCapability () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#6  0x00007fad22d66e23 in schedule () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#7  0x00007fad22d6868c in scheduleWorker () from /nix/store/6j6slxdhbbzxvhkn6yf7afm62r8n9fmf-ghc-8.4.3/lib/ghc-8.4.3/bin/../rts/libHSrts_thr-ghc8.4.3.so
#8  0x00007fad21a4d5a7 in start_thread () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libpthread.so.0
#9  0x00007fad21d5722f in clone () from /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/libc.so.6
nh2 commented 5 years ago

GHC ticket for the above: https://ghc.haskell.org/trac/ghc/ticket/16186

nh2 commented 5 years ago

I noticed that we have this problem with GHC 8.4.

I just encountered another bug, where haddock in a Stackage resolver with GHC 8.4 segfaulted:

https://github.com/haskell/haddock/issues/928#issuecomment-480896983

There it was fixed by upgrading everything to a Stackage LTS that has GHC 8.6. I wonder whether the underlying source for these segfaults is related.

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.