[Haskell-cafe] GHCI segfault for program that works fine when compiled

erik eraker at gmail.com
Wed Sep 14 03:31:57 UTC 2016


I posted a question on Stackoverflow and reddit's /r/haskell today (see
below), the gist of which was that GHCI segfaults when I attempt to create
a connection to a Postgresql instance using a function from the
postgresql-simple library; however, when I compile and run my code it works

I thought it was perhaps odd that GHCI would segfault when the compiled
code worked fine (this is on GHC 8.0.1 and GHC 7.10.3), and then I
discovered that if I start GHCI in the following way, I can create a
connection to my database without any issues:

$ stack ghci --library-profiling --ghci-options="-fexternal-interpreter"

It seems likely that I have a weird install of Postgresql +
postgresql-libpq (albeit probably not too weird for anyone on OSX who uses
the EnterpriseDB installer, like I did). As a result, I was unsure if
exploring this issue further would be of interest to anyone.

Anyway, I am posting here because I was encouraged to do so by a commenter
on my Stackoverflow question. In addition, in both places, I received the
suggestion to open a GHC ticket, but owing to my limited experience in
Haskell, I am hesitant to do so. I do not know how to get a real stack
trace for my segfault. Moreover, I would likely require a fair bit of
hand-holding to produce any useful data, and I wasn't sure if pursuing this
any further would be of value to anyone.

More information can be seen here:

Stackoverflow question:

Reddit Thread:

Should I open a GHC ticket? If so, what are some good strategies for
producing useful information for that ticket?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160913/2e12197d/attachment.html>

More information about the Haskell-Cafe mailing list