Bug 177986 - segfaults on ia64 on -c 'import gtk'
segfaults on ia64 on -c 'import gtk'
Product: Fedora
Classification: Fedora
Component: glib2 (Show other bugs)
ia64 Linux
medium Severity high
: ---
: ---
Assigned To: Matthias Clasen
Depends On:
Blocks: 177609
  Show dependency treegraph
Reported: 2006-01-16 19:18 EST by Jason Vas Dias
Modified: 2007-11-30 17:11 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-18 14:30:45 EST
Type: ---
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 Jason Vas Dias 2006-01-16 19:18:55 EST
Description of problem:

Python generates a SIGSEGV on the ia64 architecture if an attempt is made
to import the GTK module from a '-c' string, e.g. in the ia64 build root
on the 'boris' buildserver:
$ sudo /usr/sbin/chroot /mnt/build/beehive/dist-fc5-build/
# python -c 'import gtk'
Segmentation fault

This does not happen when the 'import gtk' is run from a .py file:
# echo 'import gtk' > /tmp/t.py
# chmod +x /tmp/t.py
# ./tmp/t.py
import: unable to open X server `'.
( OK ).

This is blocking the ia64 builds of packages such as avahi that test for
pygtk in their %configure :
checking for python module gtk... ./configure: line 24950:  1782 Segmentation
fault      $PYTHON -c "$prog" 1>&5 2>&5
configure: error: Could not find Python module gtk
error: Bad exit status from /usr/src/build/680721-ia64/install-tmp/rpm-tmp.44341

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
python -c 'import gtk'
Actual results:

Expected results:
As on i386:
$ python -c 'import gtk'
$ echo $?
Comment 1 Jason Vas Dias 2006-01-17 12:45:00 EST
On closer inspection, this appears to be a pygtk2 or gtk2 or glib2 bug , 
since python has not changed since Dec 17th, and avahi has been re-built
many times since then, while pygtk2 changed on Jan 15th, and glib2 changed
on Jan 16th.

So, with pygtk2-2.8.4-1, gtk2-2.8.10-2, and glib2-2.9.3-1, ONLY on ia64, 
in the 'boris' buildserver dist-fc5-build buildroot, this program run by 
avahi's %configure script generates a SIGSEGV:

bash-3.1# prog="
> import sys
> try:
>         import gtk
> except ImportError:
>         sys.exit(1)
> except:
>         sys.exit(0)
> sys.exit(0)"
bash-3.1# python -c "$prog"
Segmentation fault

The core file suggests the memory access violation occurs in libgobject:
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/python2.4/site-packages/cairo/_cairo.so
#0  0x2000000003e16b50 in g_type_check_instance ()
   from /usr/lib/libgobject-2.0.so.0

Installing glib2-2.9.3-1-debuginfo in the buildroot on boris, we see this 
SIGSEGV occurs in gtype.c:

Loaded symbols for /usr/lib/python2.4/site-packages/cairo/_cairo.so
#0  0x2000000003e16b50 in check_derivation_I (
    parent_type=611072, type_name=0x20000000048ebc68 "GtkObject") at gtype.c:423
423       GType ftype = NODE_FUNDAMENTAL_TYPE (node);

The same 'python -c "import gtk"' command works fine on all other architectures
- there's some problem with the way these packages are built on ia64.

Please can the pygtk2, gtk2 and glib2 maintainers take a look at this bug, as
it prevents any package that does a "python -c 'import gtk'" in the configure /
build stages (eg. avahi) from building on our beehive buildservers - thanks.
Comment 2 Matthias Clasen 2006-01-18 10:53:07 EST
Ok, found it. The problem is that g_object_compat_control() is inside
G_DISABLE_DEPRECATED, so the declaration is not seen when GTK+ is compiled,
which is bad when returning 64bit values on 64bit platforms.
Comment 3 Matthias Clasen 2006-01-18 14:30:45 EST
Should be fixed in gtk2-2.8.12-3
Comment 4 Jason Vas Dias 2006-01-18 15:11:17 EST
Yes, this is now fixed with gtk2-2.8.10-3 in Rawhide . Thank You ! 

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