Ticket #4038 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

segmentation fault between GHC-6.12.2 and gtk2hs

Reported by: guest Owned by: simonmar
Priority: highest Milestone: 6.12.3
Component: Runtime System Version: 6.12.2
Keywords: segmentation fault Cc: lazycat.manatee@…, jnf@…, petersen@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime crash Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I have test gtk2hs code with GHC-6.12.2, always got "segmentation fault", and same code works fine with GHC-6.12.1

I can't give a minimum program to recur this.

But i think GHC-6.12.2 break many gtk2hs binding that make gtk2hs code access null pointer to got "segmentation fault", and it's not fault of gtk2hs, because same version gtk2hs works fine with 6.10 and 6.12.1.

For test, you can install leksah with 6.12.2, i think Leksah will got "segmentation fault" error.

Can any GHC developer start a investigation?

Thanks,

-- Andy

Attachments

Completion.hs Download (2.6 KB) - added by guest 3 years ago.
This minimum program to recur this error, need rgb.txt file.
rgb.txt Download (17.0 KB) - added by guest 3 years ago.
This rgb.txt file is need by Completion.hs

Change History

Changed 3 years ago by jutaro

  • cc jnf@… added

Imortant bug for us, as Leksah stops working on 6.12.2. Not sure if changes in gtk2hs or ghc are the cause. Seems to me that the gtk2hs/demo/treeList/Completion example works on 6.12.1 but segfaults under 6.12.2. This would give a compact example. I tried a bit with -debug and gdb, but know too little. Would assume the gtk finalizers cause the crash, as I know which lines I need to comment out in Leksah to make it run, but when I trace these lines, no problems can be found. I tested on Ubuntu lucid 64 bit with newest gtk2hs from repo.

Jürgen

Changed 3 years ago by guest

andy@ubuntu:~/gtk2hs/demo/treeList$ gdb ./completion 
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/andy/gtk2hs/demo/treeList/completion...done.
(gdb) run
Starting program: /home/andy/gtk2hs/demo/treeList/completion 
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x0000000000ac5b44 in rts_getInt32 ()
(gdb) bt
#0  0x0000000000ac5b44 in rts_getInt32 ()
#1  0x00000000008d53b3 in GraphicsziUIziGtkziEntryziEntryCompletion_d37LB ()
#2  0x00007ffff788f6f7 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#3  0x00007ffff79d6dfc in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#4  0x00007ffff79d8bdd in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#5  0x00007ffff79d9039 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#6  0x00007ffff79d568f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7  0x00007ffff79d5f8b in gtk_tree_model_foreach ()
   from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00007ffff7890314 in gtk_entry_completion_complete ()
   from /usr/lib/libgtk-x11-2.0.so.0
#9  0x00007ffff7884778 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#10 0x00007ffff752cd56 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#11 0x00007ffff52e509b in ?? () from /lib/libglib-2.0.so.0
#12 0x00007ffff52e48c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#13 0x00007ffff52e8748 in ?? () from /lib/libglib-2.0.so.0
#14 0x00007ffff52e8c55 in g_main_loop_run () from /lib/libglib-2.0.so.0
#15 0x00007ffff78f6af7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x0000000000785b00 in gtkzm0zi10zi5_GraphicsziUIziGtkziGeneralziGeneral_mainGUI_info ()
#17 0x0000000000000000 in ?? ()

Above are backtrace from gdb for gtk2hs/demo/treeList/Completion , just paste this, haven't time to investigate this now.

-- Andy

Changed 3 years ago by guest

(gdb) bt
#0  0x000000000149ad37 in rts_getBool ()
#1  0x0000000000ae6e9e in gtk2hs_closure_marshal ()
#2  0x00007ffff59385de in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3  0x00007ffff594c598 in ?? () from /usr/lib/libgobject-2.0.so.0
#4  0x00007ffff594d8b9 in g_signal_emit_valist ()
   from /usr/lib/libgobject-2.0.so.0
#5  0x00007ffff594e033 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#6  0x00007ffff77aae9f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7  0x00007ffff768c654 in gtk_propagate_event ()
   from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00007ffff768d65b in gtk_main_do_event ()
   from /usr/lib/libgtk-x11-2.0.so.0
#9  0x00007ffff730180c in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#10 0x00007ffff507b8c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#11 0x00007ffff507f748 in ?? () from /lib/libglib-2.0.so.0
#12 0x00007ffff507fc55 in g_main_loop_run () from /lib/libglib-2.0.so.0
#13 0x00007ffff768daf7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x0000000000465047 in s1ius_info ()
#15 0x00007fffffffe090 in ?? ()
#16 0x00007ffff7dea212 in ?? () from /lib64/ld-linux-x86-64.so.2
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) q

Above is track from my project.

-- Andy

Changed 3 years ago by guest

This error just happend when you use ghc-6.12.2 install gtk2hs. And don't care which version of gtk2hs.

-- Andy

Changed 3 years ago by guest

This minimum program to recur this error, need rgb.txt file.

Changed 3 years ago by guest

This rgb.txt file is need by Completion.hs

Changed 3 years ago by simonmar

  • component changed from Compiler to Runtime System
  • priority changed from normal to highest
  • architecture changed from x86_64 (amd64) to Unknown/Multiple
  • milestone set to 6.12.3
  • owner set to simonmar
  • os changed from Linux to Unknown/Multiple

Sorry about this, I'm on it.

Changed 3 years ago by simonmar

  • status changed from new to merge

Fixed in HEAD:

Fri May  7 10:32:22 BST 2010  Simon Marlow <marlowsd@gmail.com>
  * Fix crash in nested callbacks (#4038)
  Broken by "Split part of the Task struct into a separate struct
  InCall".

it will neeed to be merged by hand, because it depends on another patch that was also merged by hand.

Changed 3 years ago by juhpetersen

  • cc petersen@… added

Changed 3 years ago by igloo

  • status changed from merge to closed
  • resolution set to fixed

Merged.

Note: See TracTickets for help on using tickets.