Red Hat Bugzilla – Bug 907515
gtk2hs timer program compiled with ghc 7.4 segfaults on i686
Last modified: 2014-03-19 04:42:38 EDT
Description of problem:
I wrote a Haskell program using gtk2hs. It works fine on Fedora 17 under ghc 7.0.4. However it crashes with a segmentation fault when compiled on Fedora 18 or rawhide(19). The crash occurs the first time an action added to the gtk loop with timeoutAddFull runs.
I wrote a minimal test case that triggers the problem and posted it here:
It seems to be a compiler or run-time-system bug in ghc 7.4.1 and 7.4.2 or possibly gtk2hs, because the binary built on F18 or rawhide crashes when run on F17, and the binary built on F17 runs without a problem on F18.
Furthermore, if I disable selinux on the kernel command line at boot time, the crash vanishes in F18 and rawhide. I don't know why-- the crash doesn't trigger any selinux error messages, just a segmentation fault.
Jens Petersen reported to me that the crash does not occur on 64 bit test machines on Fedora 18, but he confirmed that it does occur on 32 bit test machines.
I've run into pointer alignment problems with ghc before, where alignment pragmas in C modules are somehow broken when the C module is linked with a ghc program, so that may be the case here?
Version-Release number of selected component (if applicable): ghc 7.4.1 and 7.4.2.
Steps to Reproduce:
Compile and run the test program posted in the haskell.org trac bug report
I'm also posting the bug here in case someone else runs into it.
I simplified the test-case further in the ticket just to use glib, but same story.
It would be good to retest with ghc-7.6.3 in F20.
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '18'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 18's end of life.
Thank you for reporting this issue and we are sorry that we may not be
able to fix it before Fedora 18 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior to Fedora 18's end of life.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
I believe this should be fixed in ghc-7.6.3.
(In reply to Jens Petersen from comment #4)
> I believe this should be fixed in ghc-7.6.3.
It is not, but will be in the coming 7.8.
I will backport Garret's patch committed upstream:
I can confirm that the patch fixes the issue in ghc-7.6.3-18.3.fc20.i686.
(still assigned for now since fix not built yet for f19)
ghc-7.4.2-11.2.fc19 has been submitted as an update for Fedora 19.
ghc-7.6.3-18.3.fc20 has been submitted as an update for Fedora 20.
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ghc-7.6.3-18.3.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
ghc-7.6.3-18.3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
ghc-7.4.2-11.2.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.