[Haskell-cafe] how to debug segfaults in ghc-compiled executable?

Johannes Waldmann johannes.waldmann at htwk-leipzig.de
Wed May 8 09:00:41 UTC 2019


Dear Cafe,

I keep getting spurious segfaults from a dynamically
linked executable compiled by ghc. In dmesg:

[402186.145258] pure-matchbox:w[25362]: segfault at 7f98644a5c00 ip
00000000017ab65e sp 00007f98377f9988 error 4
[402186.145262] Code: b8 0a 7e 77 01 48 83 ec 08 48 89 df 48 89 c3 31 c0
ff d3 48 83 c4 08 48 8b 1c 25 50 90 a7 01 48 89 c1 48 6b c9 18 48 83 c1
10 <48> 83 3c 0b 00 74 30 48 8b 1c 25 50 90 a7 01 48 6b c0 18 48 83 c0

How can I find out what part of the program this refers to?

The error might be related to external libraries (used by hmatrix-glpk)
but I don't know how to verify this.

When I look at the output of `nm´ for this executable,
I am not seeing any address like  00017ab65e.

I do not have a concrete reproducible test case,
but the bug happens statistically (say, in one out of 1000 runs).

- J.


More information about the Haskell-Cafe mailing list