sol / doctest

An implementation of Python's doctest for Haskell
http://hackage.haskell.org/package/doctest
MIT License
371 stars 72 forks source link

mmap 131072 bytes at (nil): Cannot allocate memory #293

Open newhoggy opened 3 years ago

newhoggy commented 3 years ago

I am getting this error in Github Actions:

doctests: mmap 131072 bytes at (nil): Cannot allocate memory
doctests: Try specifying an address with +RTS -xm<addr> -RTS
doctests: internal error: m32_allocator_init: Failed to map
    (GHC version 8.10.3 for x86_64_unknown_linux)
    Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

This has been reported to GHC as well: https://gitlab.haskell.org/ghc/ghc/-/issues/19421

This is easily reproducible from this commit: https://github.com/input-output-hk/cardano-ledger-specs/pull/2147/commits/694a33f04a27b53b0cb57e42f3ad0affbed26625

The error can be seen here: https://github.com/input-output-hk/cardano-ledger-specs/runs/1958540147?check_suite_focus=true

It should be possible to reproduce it by forking the project and attempting to build this commit in Github Actions in the manner described by the .github/workflows/haskell.yml file.

newhoggy commented 3 years ago

On MacOS, there is also an error, but it is very different:

doctests: 
lookupSymbol failed in relocateSection (relocate external)
/Users/runner/.cabal/store/ghc-8.10.4/dbl-cnvrsn-2.0.2.0-2cca6009/lib/libHSdbl-cnvrsn-2.0.2.0-2cca6009.a: unknown symbol `__ZNK17double_conversion23DoubleToStringConverter11ToPrecisionEdiPNS_13StringBuilderE'
GHC runtime linker: fatal error: I found a duplicate definition for symbol
   __ZNK17double_conversion6VectorIcEixEi
whilst processing object file
   /Users/runner/.cabal/store/ghc-8.10.4/dbl-cnvrsn-2.0.2.0-2cca6009/lib/libHSdbl-cnvrsn-2.0.2.0-2cca6009.a
The symbol was previously defined in
   /Users/runner/.cabal/store/ghc-8.10.4/dbl-cnvrsn-2.0.2.0-2cca6009/lib/libHSdbl-cnvrsn-2.0.2.0-2cca6009.a(hs-double-conversion.o)
This could be caused by:
   * Loading two different object files which export the same symbol
   * Specifying the same object file twice on the GHCi command line
   * An incorrect `package.conf' entry, causing some object to be
     loaded twice.
doctests: 
lookupSymbol failed in relocateSection (relocate external)
/Users/runner/.cabal/store/ghc-8.10.4/dbl-cnvrsn-2.0.2.0-2cca6009/lib/libHSdbl-cnvrsn-2.0.2.0-2cca6009.a: unknown symbol `__ZN17double_conversion6StrtofENS_6VectorIKcEEi'
GHC runtime linker: fatal error: I found a duplicate definition for symbol
   __ZN17double_conversion7BitCastIdyEET_RKT0_
whilst processing object file
   /Users/runner/.cabal/store/ghc-8.10.4/dbl-cnvrsn-2.0.2.0-2cca6009/lib/libHSdbl-cnvrsn-2.0.2.0-2cca6009.a
The symbol was previously defined in
   /Users/runner/.cabal/store/ghc-8.10.4/dbl-cnvrsn-2.0.2.0-2cca6009/lib/libHSdbl-cnvrsn-2.0.2.0-2cca6009.a(double-conversion.o)
This could be caused by:
   * Loading two different object files which export the same symbol
   * Specifying the same object file twice on the GHCi command line
   * An incorrect `package.conf' entry, causing some object to be
     loaded twice.
GHC runtime linker: fatal error: I found a duplicate definition for symbol
   __ZN17double_conversion6Bignum9LessEqualERKS0_S2_
whilst processing object file
   /Users/runner/.cabal/store/ghc-8.10.4/dbl-cnvrsn-2.0.2.0-2cca6009/lib/libHSdbl-cnvrsn-2.0.2.0-2cca6009.a
The symbol was previously defined in
   /Users/runner/.cabal/store/ghc-8.10.4/dbl-cnvrsn-2.0.2.0-2cca6009/lib/libHSdbl-cnvrsn-2.0.2.0-2cca6009.a(bignum-dtoa.o)
This could be caused by:
   * Loading two different object files which export the same symbol
   * Specifying the same object file twice on the GHCi command line
   * An incorrect `package.conf' entry, causing some object to be
     loaded twice.
GHC runtime linker: fatal error: I found a duplicate definition for symbol
   __ZN17double_conversion7BitCastIdyEET_RKT0_
whilst processing object file
   /Users/runner/.cabal/store/ghc-8.10.4/dbl-cnvrsn-2.0.2.0-2cca6009/lib/libHSdbl-cnvrsn-2.0.2.0-2cca6009.a
The symbol was previously defined in
   /Users/runner/.cabal/store/ghc-8.10.4/dbl-cnvrsn-2.0.2.0-2cca6009/lib/libHSdbl-cnvrsn-2.0.2.0-2cca6009.a(double-conversion.o)
This could be caused by:
   * Loading two different object files which export the same symbol
   * Specifying the same object file twice on the GHCi command line
   * An incorrect `package.conf' entry, causing some object to be
     loaded twice.
doctests: Could not load Object Code /Users/runner/.cabal/store/ghc-8.10.4/dbl-cnvrsn-2.0.2.0-2cca6009/lib/libHSdbl-cnvrsn-2.0.2.0-2cca6009.a(fast-dtoa.o).

doctests: doctests: unable to load package `double-conversion-2.0.2.0'
andreasabel commented 3 years ago

@newhoggy: Did you find anything useful at #271?