Bug 907515 - gtk2hs timer program compiled with ghc 7.4 segfaults on i686
Summary: gtk2hs timer program compiled with ghc 7.4 segfaults on i686
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ghc
Version: 19
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-04 15:34 UTC by Garrett Mitchener
Modified: 2014-03-19 08:42 UTC (History)
3 users (show)

Fixed In Version: ghc-7.4.2-11.2.fc19
Clone Of:
Environment:
Last Closed: 2014-02-17 21:08:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Garrett Mitchener 2013-02-04 15:34:24 UTC
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:

http://hackage.haskell.org/trac/ghc/ticket/7629

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 

http://hackage.haskell.org/trac/ghc/ticket/7629

I'm also posting the bug here in case someone else runs into it.

Comment 1 Jens Petersen 2013-02-05 03:33:04 UTC
I simplified the test-case further in the ticket just to use glib, but same story.

Comment 2 Jens Petersen 2013-09-28 08:02:25 UTC
It would be good to retest with ghc-7.6.3 in F20.

Comment 3 Fedora End Of Life 2013-12-21 11:08:14 UTC
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 07:02:51 UTC
I believe this should be fixed in ghc-7.6.3.

Comment 5 Jens Petersen 2014-01-29 01:33:07 UTC
(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:
http://hackage.haskell.org/trac/ghc/ticket/7629

Comment 6 Jens Petersen 2014-01-29 05:38:29 UTC
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 05:39:16 UTC
(still assigned for now since fix not built yet for f19)

Comment 8 Fedora Update System 2014-01-29 08:25:57 UTC
ghc-7.4.2-11.2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/ghc-7.4.2-11.2.fc19

Comment 9 Fedora Update System 2014-01-29 08:26:11 UTC
ghc-7.6.3-18.3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ghc-7.6.3-18.3.fc20

Comment 10 Fedora Update System 2014-01-30 03:37:15 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2014-1787/ghc-7.6.3-18.3.fc20
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2014-02-17 21:08:48 UTC
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 08:42:38 UTC
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.