ghc-iserv: mmap 0 bytes at 0x0: Invalid argument
Summary
On macOS+nix, there are numerous test suite failures that look like this:
ghc-iserv: mmap 0 bytes at 0x0: Invalid argument
ghc-iserv: Try specifying an address with +RTS -xm<addr> -RTS
ghc-iserv: internal error: ocGetNames_MachO: failed to build segments
(GHC version 8.9.0.20190527 for x86_64_apple_darwin)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
ghc: ghc-iserv terminated (-6)
The affected tests include T5313
, T8639_api
, T8628
, T10052
, dynCompileExpr
, T16392
, T3372
, prog001
, ghci004
, ghci006
, ghci062
, print001
, print003
, static-plugins
, TH_scopedTvs
, etc.
Most (but not all) of the failures are in ext-interp
way:
=====> TH_scopedTvs(normal) 177 of 385 [0, 168, 9]
=====> TH_scopedTvs(ext-interp) 177 of 385 [0, 168, 9]
Compile failed (exit code 1) errors were:
ghc-iserv: mmap 0 bytes at 0x0: Invalid argument
ghc-iserv: Try specifying an address with +RTS -xm<addr> -RTS
ghc-iserv: internal error: ocGetNames_MachO: failed to build segments
(GHC version 8.9.0.20190527 for x86_64_apple_darwin)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
ghc: ghc-iserv terminated (-6)
I'd like to give the full list of affected tests but it is tiring to filter them out from other failures with other error messages! At the moment, many tests are broken in other ways, too:
=====> T9878b(ghci) 39 of 385 [0, 36, 3]
Actual stderr output differs from expected:
--- /dev/null 2019-05-28 13:33:54.384195000 +0300
+++ "/var/folders/m5/mw3jn9j526z7_8sbfhhw7wzm0000gn/T/ghctest-r233v5pr/test spaces/testsuite/tests/ghci/scripts/T9878b.run/T9878b.run.stderr.normalised" 2019-05-28 13:34:05.684601884 +0300
@@ -0,0 +1 @@
+ld: warning: /nix/store/2qjjq7naq23hvn8iyizr9zjw2dgynkdw-libiconv-osx-10.11.6/lib/libiconv.dylib, ignoring unexpected dylib file
*** unexpected failure for T9878b(ghci)
=====> T15633a(ghci) 40 of 385 [0, 37, 3]
Actual stderr output differs from expected:
--- "/var/folders/m5/mw3jn9j526z7_8sbfhhw7wzm0000gn/T/ghctest-r233v5pr/test spaces/testsuite/tests/ghci/should_run/T15633a.run/T15633a.stderr.normalised" 2019-05-28 13:34:18.249339952 +0300
+++ "/var/folders/m5/mw3jn9j526z7_8sbfhhw7wzm0000gn/T/ghctest-r233v5pr/test spaces/testsuite/tests/ghci/should_run/T15633a.run/T15633a.run.stderr.normalised" 2019-05-28 13:34:18.249643011 +0300
@@ -1 +1,7 @@
+
+<no location info>: warning: [-Wmissed-extra-shared-lib (in -Wdefault)]
+ dlopen(libtinfo.dylib, 5): image not found
+ It's OK if you don't want to use symbols from it directly.
+ (the package DLL is loaded by the system linker
+ which manages dependencies by itself).
TcPluginGHCi
*** unexpected failure for T15633a(ghci)
The ld: warning
issue isn't new, but the mmap 0
and dlopen
are a recent addition. The full list of test failures goes like this:
Unexpected results from:
TEST="Capi_Ctype_002 ClosedFam1TH ClosedFam2TH Ppr027 Ppr040 Ppr043 T10052 T10279 T10296a T10306 T10508_api T10596 T10598_TH T10603 T10620 T10638 T10697_decided_1 T10697_decided_2 T10697_decided_3 T10796a T10796b T10810 T10811 T10820 T10828 T10828a T10828b T10891 T11046 T11145 T11341 T11345 T11462 T11463 T11484 T11525 T11629 T11680 T11721_TH T11797 T11798 T11809 T12045TH1 T12045TH2 T12387 T12403 T12407 T12458 T12478_1 T12478_2 T12478_3 T12478_4 T12478_5 T12503 T12513 T12530 T12646 T12977 T12993 T13018 T13098 T13123 T13199 T13366 T13550 T13604a T13618 T13642 T13776 T13781 T13782 T13807 T13825-debugger T13837 T13856 T13885 T13887 T13942 T13968 T14060 T14204 T14289 T14289b T14289c T14298 T14471 T14627 T14646 T14681 T14741 T1476 T14817 T14843 T14875 T14885a T14885b T14885c T15243 T15270A T15270B T15324 T15331 T15360a T15360b T15365 T1541 T15471 T15481 T15502 T15518 T15550 T15572 T15633a T15633b T15738 T15792 T15845 T15858 T15953 T15985 T16104 T16133 T16180 T16183 T16195 T16260 T16293b T16326_TH T16392 T16666 T1835 T2222 T2674 T2700 T2713 T2740 T2817 T3100 T3177 T3177a T3319 T3372 T3395 T3807 T3920 T4059 T4124 T4128 T4135 T4188 T4364 T4436 T4850 T5037 T5217 T5290 T5313 T5358 T5362 T5379 T5404 T5410 T5452 T5508 T5882 T5883 T5968 T5971 T5976 T6005 T6005a T6018th T6114 T706 T7241 T7386 T7477 T7484 T7667 T7667a T7681 T7910 T8031 T8100 T8186 T8242 T8412 T8499 T8507 T8557 T8628 T8639_api T8759 T8761 T8807 T8884 T8932 T8953 T8954 T8987 T9064 T9066 T9081 T9199 T9262 T9692 T9738 T9878b TEST=Capi_Ctype_001 TH_1tuple TH_Lift TH_Promoted1Tuple TH_PromotedList TH_PromotedTuple TH_RichKinds TH_RichKinds2 TH_Roles1 TH_Roles2 TH_Roles3 TH_Roles4 TH_StaticPointers TH_StringPrimL TH_TyInstWhere1 TH_TyInstWhere2 TH_class1 TH_dupdecl TH_emptycase TH_exn1 TH_exn2 TH_fail TH_finalizer TH_foreignCallingConventions TH_foreignInterruptible TH_implicitParams TH_implicitParamsErr1 TH_implicitParamsErr2 TH_implicitParamsErr3 TH_invalid_add_top_decl TH_linePragma TH_mkName TH_overlaps TH_overloadedlabels TH_pragma TH_rebindableAdo TH_recover TH_recover_warns TH_recursiveDo TH_reifyDecl1 TH_reifyDecl2 TH_reifyExplicitForAllFams TH_reifyInstances TH_reifyLocalDefs TH_reifyLocalDefs2 TH_reifyMkName TH_repE2 TH_repGuard TH_repGuardOutput TH_repPrim TH_repPrim2 TH_repPrimOutput TH_repPrimOutput2 TH_repUnboxedTuples TH_runIO TH_scopedTvs TH_sections TH_spliceD2 TH_spliceDecl1 TH_spliceDecl2 TH_spliceE1 TH_spliceE3 TH_spliceE4 TH_spliceE6 TH_spliceExpr1 TH_spliceGuard TH_spliceInst TH_tf1 TH_tf3 TH_tuple1 TH_unboxedSingleton TH_unresolvedInfix2 TcStaticPointers01 TcStaticPointers02 break001 break002 break003 break005 break006 break007 break008 break009 break010 break011 break012 break013 break014 break016 break017 break018 break019 break020 break021 break024 break025 break026 break027 break029 cc005 cc008 cc012 cc013 cc015 cc017 driver016 driver017 driver018 driver018a driver019 driver027 driver028 driver034 driver035 driver042stub driver044 driver045 dynCompileExpr dynbrk001 dynbrk002 dynbrk003 dynbrk004 dynbrk007 dynbrk008 dynbrk009 ffi-deriv1 getargs ghci004 ghci006 ghci024 ghci062 hist001 hist002 hpc_ghc_ghci keep-cafs linker_unload linkwhole listCommand001 listCommand002 print001 print002 print003 print004 print005 print006 print007 print008 print009 print010 print011 print012 print013 print014 print016 print017 print018 print019 print021 print022 print023 print024 print025 print026 print027 print028 print029 print030 print031 print032 print033 print034 print035 print037 prog001 readFail032 readFail048 result001 rn058 static-plugins"
I assign to @Ericson2314 because I suspect e529c65e might be involved.
Steps to reproduce
nix-shell https://github.com/alpmestan/ghc.nix/archive/master.tar.gz
- `./boot && ./configure
hadrian/build.sh --flavour=Quick test
Expected behavior
The tests should pass. (Perhaps not all of them for now, the scope of this ticket is limited to the ghc-iserv: mmap 0 bytes at 0x0: Invalid argument
issue).
Environment
- GHC version used: HEAD
- Operating System: macOS Mojave 10.14.4