Bug 907515 - gtk2hs timer program compiled with ghc 7.4 segfaults on i686
gtk2hs timer program compiled with ghc 7.4 segfaults on i686
Product: Fedora
Classification: Fedora
Component: ghc (Show other bugs)
i686 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Jens Petersen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-02-04 10:34 EST by Garrett Mitchener
Modified: 2014-03-19 04:42 EDT (History)
3 users (show)

See Also:
Fixed In Version: ghc-7.4.2-11.2.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-02-17 16:08:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Garrett Mitchener 2013-02-04 10:34:24 EST
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.

How reproducible:

Every time

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.
Comment 1 Jens Petersen 2013-02-04 22:33:04 EST
I simplified the test-case further in the ticket just to use glib, but same story.
Comment 2 Jens Petersen 2013-09-28 04:02:25 EDT
It would be good to retest with ghc-7.6.3 in F20.
Comment 3 Fedora End Of Life 2013-12-21 06:08:14 EST
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.
Comment 4 Jens Petersen 2013-12-24 02:02:51 EST
I believe this should be fixed in ghc-7.6.3.
Comment 5 Jens Petersen 2014-01-28 20:33:07 EST
(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:
Comment 6 Jens Petersen 2014-01-29 00:38:29 EST
I can confirm that the patch fixes the issue in ghc-7.6.3-18.3.fc20.i686.
Comment 7 Jens Petersen 2014-01-29 00:39:16 EST
(still assigned for now since fix not built yet for f19)
Comment 8 Fedora Update System 2014-01-29 03:25:57 EST
ghc-7.4.2-11.2.fc19 has been submitted as an update for Fedora 19.
Comment 9 Fedora Update System 2014-01-29 03:26:11 EST
ghc-7.6.3-18.3.fc20 has been submitted as an update for Fedora 20.
Comment 10 Fedora Update System 2014-01-29 22:37:15 EST
Package ghc-7.6.3-18.3.fc20:
* 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).
Comment 11 Fedora Update System 2014-02-17 16:08:48 EST
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.
Comment 12 Fedora Update System 2014-03-19 04:42:38 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.