[Msys2-users] Debugging undeterministic segfaults

Gintautas Miliauskas gintautas.miliauskas at gmail.com
Tue Nov 4 22:20:12 UTC 2014


Hi David,

ghc should appear as inplace/bin/ghc-stage2.exe after a successful build.

The warnings are expected.

Did you run make with parallelism? I don't have a smoking gun, but the
build seems to be somewhat stable with -j1, while it crashes a lot of the
time with -j5 (I have a 4-core CPU). I have only tried a couple of runs
with -j1 (takes a while...), so I can't say for sure that non-parallel
builds are stable, but 2/2 runs succeeded.

Another data point: I ran the validate script in a loop and stored the
logs, and most crashes seem to be in rts/, but not all of them. Not sure
why.

$ grep Segmentation *.log
1.log:make[1]: ***
[libraries/base/dist-install/build/Text/Show/Functions.o] Segmentation fault
10.log:make[1]: *** [rts/dist/build/Hpc.o] Segmentation fault
11.log:make[1]: *** [rts/dist/build/RtsFlags.thr_l_o] Segmentation fault
12.log:make[1]: *** [rts/dist/build/sm/GCAux.o] Segmentation fault
13.log:make[1]: *** [rts/dist/build/win32/GetEnv.thr_l_o] Segmentation fault
14.log:make[1]: *** [rts/dist/build/sm/Scav.l_o] Segmentation fault
15.log:make[1]: *** [compiler/stage1/build/RegAlloc/Linear/State.o]
Segmentation fault
18.log:make[1]: ***
[libraries/filepath/dist-install/build/.depend-v.haskell] Segmentation fault
19.log:make[1]: *** [libraries/base/dist-install/build/.depend-v.haskell]
Segmentation fault
4.log:make[1]: *** [rts/dist/build/RtsDllMain.o] Segmentation fault
5.log:make[1]: *** [rts/dist/build/sm/Evac_thr.thr_o] Segmentation fault
6.log:make[1]: *** [rts/dist/build/sm/Scav_thr.thr_l_o] Segmentation fault
7.log:make[1]: *** [rts/dist/build/Linker.thr_debug_o] Segmentation fault
8.log:make[1]: *** [rts/dist/build/sm/Storage.debug_o] Segmentation fault
9.log:make[1]: *** [rts/dist/build/hooks/OutOfHeap.thr_debug_o]
Segmentation fault


On Tue, Nov 4, 2014 at 7:43 PM, David Macek <david.macek.0 at gmail.com> wrote:

> Hi. I just built GHC from master
> (1c35f9f1cb7a293da85d649904ce731a65824cfe) in my somewhat outdated MSYS2. I
> followed the wiki page with a few exceptions.
>
> - I cleared my PATH before running the shell (I left only Windows and
> System32)
> - my installation is not up-to-date
> - I do not have msys2 libtool, automake nor binutils; if the build used
> any of those, they came from mingw64 or from the host ghc
> - I had to run boot in pure msys2 shell, because mingw64 perl caused it to
> fail
>
> I saw no segfaults, but I may have missed them. I did not get a ghc.exe,
> but that may be correct behavior for all I know. My simple test program
> compiled and ran fine. I saw a lot of warnings during ghc's build though:
>
> - checking for DocBook DTD... I/O error : Attempt to load network entity
> http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
> - something with not finding any implementation of a module out of [
> xxx.dylib, xxx, ... ], I think it was in cabal builds
> - "could not find link destionations for: xxx"
>
> I hope it helps somehow. Maybe your issues come from mixing msys2 and
> mingw toolchain after all.
>
>
>
> --
> David Macek
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Msys2-users mailing list
> Msys2-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/msys2-users
>



-- 
Gintautas Miliauskas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141104/23099eab/attachment.html>


More information about the ghc-devs mailing list