pygtk-2.16.0 causes python-2.7 to segfault if warning settings are changed from default to "error"

Bug #636372 reported by Lukasz Kies
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PyGTK
Won't Fix
High
Fedora
Won't Fix
Medium
PLD Linux
Fix Released
Undecided
Unassigned

Bug Description

python-pygtk-2.16.0 causes python-2.7 to segfault if warning settings are changed from default to "error".
Because PyGTK-2.10+ throws only warnings applications which use PyGTK change warning settings to catch an exception while importing gtk module and X display is not available.

[kiesiu@beth ~]$ python -c "import warnings; warnings.filterwarnings('error', module='gtk'); import gtk"
python: Objects/dictobject.c:759: PyDict_SetItem: Assertion `value' failed.
Aborted

[kiesiu@beth ~]$ rpm -q python-pygtk-gtk
python-pygtk-gtk-2.16.0-2.i686

It's a known bug for upstream (https://bugzilla.gnome.org/show_bug.cgi?id=623965) and downstream (https://bugzilla.redhat.com/show_bug.cgi?id=621887).

Revision history for this message
In , Michal (michal-redhat-bugs) wrote :

Description of problem:

Gajim crashes on startup in F-14. A minimal reproducer points to a bug either in pygtk2, gtk2, or python:

$ python
Python 2.7 (r27:82500, Jul 26 2010, 18:19:48)
[GCC 4.5.0 20100716 (Red Hat 4.5.0-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import warnings
>>> warnings.filterwarnings('error', module='gtk')
>>> import gtk
python: /builddir/build/BUILD/Python-2.7/Objects/dictobject.c:759: PyDict_SetItem: Assertion `value' failed.
Aborted (core dumped)

Version-Release number of selected component (if applicable):
pygtk2-2.17.0-7.fc14.x86_64
gtk2-2.21.5-2.fc14.x86_64
python-2.7-7.fc14.x86_64

How reproducible:
always

Steps to Reproduce:
1. execute the 3 lines in python

Actual results:
assertion failure

Expected results:
no crash

Revision history for this message
In , Michal (michal-redhat-bugs) wrote :

Added dmalcolm to CC.
David, could this be a bug in the warnings module itself?

Revision history for this message
In , Dave (dave-redhat-bugs) wrote :

This is a bug in pygtk2's initialization - it uses the deprecated PyCObject API. See bug 620216 and bug 620842.

Revision history for this message
In , Dave (dave-redhat-bugs) wrote :
Revision history for this message
Lukasz Kies (kiesiu) wrote :

Attached patch from Dave Malcolm (upstream developer) seems to resolve this problem.
I've build python-pygtk with this patch, test it and it looks to work fine to me (PLD Th).

Revision history for this message
Lukasz Kies (kiesiu) wrote :

Please find a patch for python-pygtk.spec in attachment.

Revision history for this message
Lukasz Kies (kiesiu) wrote :

After PyGTK is rebuilded it makes RuntimeError for all packages requires python-pygtk:
[kiesiu@beth packages]$ gimp
(gimp:19344): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error
Traceback (most recent call last):
  File "/usr/lib/gimp/2.0/python/gimpfu.py", line 801, in _run
  File "/usr/lib/gimp/2.0/plug-ins/python-console.py", line 33, in do_console
    import sys, gobject, gtk, gimpenums, gimpshelf, gimpui, pyconsole
  File "/usr/lib/gimp/2.0/python/gimpui.py", line 36, in <module>
RuntimeError: could not find _PyGtk_API object

Thus all packages require python-pygtk need to be rebuilded with new pygtk. For Th and python-pygtk-gtk there are:
poldek:/all-avail> what-requires python-pygtk-gtk
accerciser-1.10.1-3.noarch
apport-gtk-0.108.2-3.noarch
avant-window-navigator-0.3.2-5.i686
billreminder-0.3.2-3.i686
blueman-1.21-4.i686
bzr-gtk-0.95.0-7.i686
cankiri-0.2-2.noarch
ccsm-0.8.4-3.noarch
childsplay-1.5.1-3.noarch
compiz-fusion-icon-interface-gtk-0.1.0-0.080712git.4.noarch
d-feet-0.1.10-4.noarch
deluge-1.2.3-6.i686
dia-0.97.1-2.i686
driconf-0.9.1-4.i686
emesene-1.6.3-1.i686
firstboot-1.99-5.i686
gazpacho-0.7.2-3.noarch
gedit-plugins-2.30.0-2.i686
gimp-2.6.10-2.i686
git-core-gitview-1.7.2.3-1.i686
git-core-gitview-1.7.2.2-1.i686
gnofract4d-3.11-4.i686
gnome-desktop-2.30.2-1.i686
gnumeric-plugin-python-1.10.10-2.i686
gnumeric-plugin-python-1.10.9-1.i686
griffith-0.11-1.noarch
hotwire-0.721-4.noarch
mtp-lastfm-0.83-4.noarch
museek+-murmur-0.2-4.i686
nautilus-python-0.6.1-3.i686
neatx-0.1-0.r59.1.i686
nmap-zenmap-5.21-5.i686
ocfs2-tools-gtk-1.4.4-1.i686
pitivi-0.13.3-2.i686
postr-0.12.4-2.i686
python-decorator-3.0.1-2.noarch
python-gaphas-0.3.6-4.noarch
python-gnome-canvas-2.28.1-2.i686
python-gnome-desktop-libwnck-2.30.2-5.i686
python-gnome-desktop-totem-2.30.2-5.i686
python-gnome-extras-gda-2.25.3-20.i686
python-gnome-extras-gda-2.25.3-19.i686
python-gnome-extras-gtkspell-2.25.3-20.i686
python-gnome-extras-gtkspell-2.25.3-19.i686
python-gnome-extras-libgksu-2.25.3-20.i686
python-gnome-extras-libgksu-2.25.3-19.i686
python-gnome-extras-mozilla-2.25.3-20.i686
python-gnome-extras-mozilla-2.25.3-19.i686
python-gnome-packagekit-2.29.3-3.i686
python-kiwi-1.9.26-4.noarch
python-pygtk-devel-2.16.0-3.i686
python-pygtk-devel-2.16.0-2.i686
python-pygtk-glade-2.16.0-3.i686
python-pygtk-glade-2.16.0-2.i686
python-pynotify-0.1.1-6.i686
python-pynotify-0.1.1-5.i686
python-sexy-0.1.9-4.i686
python-vte-0.24.3-1.i686
quodlibet-2.2.1-4.i686
radiotray-0.6-2.noarch
sabayon-2.22.1-4.i686
smart-gui-0.52-6.i686
solfege-3.14.9-3.i686
sonata-1.6.2-3.i686
synce-gnome-0.11-4.noarch
system-config-users-1.2.80-3.noarch
tint2-0.11-1.i686
tint2-0.9-1.i686
totem-2.30.2-3.i686
wicd-1.7.0-2.i686
wifi-radar-2.0.s02-1.noarch
71 package(s) found.

Changed in pygtk:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
Lukasz Kies (kiesiu) wrote :

Any chances that someone with RW access will apply those patches in PLD and sent requests to rebuild affected packages?

Revision history for this message
Elan Ruusamäe (glen666) wrote :

main pkg built

python-pygtk-2.16.0-3.src.rpm (python-pygtk.spec -r HEAD) [th-x86_64:OK th-i486:OK th-i686:OK]

two packages manually increased release (due bad / absent %rel macro usage)
neatx-0.1-0.r59.2.src.rpm (neatx.spec -r HEAD) [th-x86_64:OK th-i486:OK th-i686:OK]
compiz-fusion-icon-0.1.0-0.080712git.5.src.rpm (compiz-fusion-icon.spec -r HEAD) [th-x86_64:OK th-i486:OK th-i686:OK]

the rest sent with ./relup.sh -i */*.spec

Revision history for this message
Elan Ruusamäe (glen666) wrote :

helper script for resolving poldek cap deps -> package name

Revision history for this message
Elan Ruusamäe (glen666) wrote :
Lukasz Kies (kiesiu)
Changed in pld-linux:
status: New → Fix Committed
Revision history for this message
Elan Ruusamäe (glen666) wrote :

failed builds from http://ep09.pld-linux.org/~builderth/queue.html#64854:

git-core-1.7.3-2.src.rpm (git-core.spec -r HEAD) [th-x86_64:FAIL_BUILD th-i486:FAIL_BUILD th-i686:FAIL_BUILD]
nmap-5.21-6.src.rpm (nmap.spec -r HEAD) [th-x86_64:FAIL_INSTALL th-i486:OK th-i686:OK]
wicd-1.7.0-4.src.rpm (wicd.spec -r HEAD) [th-x86_64:FAIL_FILES th-i486:FAIL_FILES th-i686:FAIL_FILES]

plz help fixing them!

Revision history for this message
Lukasz Kies (kiesiu) wrote :

wicd has some serious problems with python 2.7 (https://bugs.launchpad.net/pld-linux/+bug/602825) - upstream is already informed/

Revision history for this message
Lukasz Kies (kiesiu) wrote :

Glen,
There is some unresolved dependency on directory:

python-pygtk-gtk-2.16.0-3.i686 obsoleted by python-pygtk-gtk-2.16.0-4.i686
  greedy upgrade python-pygtk-glade-2.16.0-3.i686 to 2.16.0-4.i686 (unresolved python-pygtk-gtk = 2:2.16.0-3)
   python-pygtk-glade-2.16.0-3.i686 obsoleted by python-pygtk-glade-2.16.0-4.i686
error: python-pygtk-glade-2.16.0-4.i686: req /usr/lib/python2.7/site-packages/gtk-2.0/gtk not found
python-pygtk-gtk-2.16.0-4.i686 marks python-pygtk-atk-2.16.0-4.i686 (cap python-pygtk-atk = 2:2.16.0-4)
 python-pygtk-atk-2.16.0-3.i686 obsoleted by python-pygtk-atk-2.16.0-4.i686
python-pygtk-gtk-2.16.0-4.i686 marks python-pygtk-pango-2.16.0-4.i686 (cap python-pygtk-pango = 2:2.16.0-4)
 python-pygtk-pango-2.16.0-3.i686 obsoleted by python-pygtk-pango-2.16.0-4.i686
There are 4 packages to install (3 marked by dependencies), 4 to remove:

But poldek shows that this directory is already provided:

poldek:/all-avail> desc -f python-pygtk-gtk-2.16.0-4.i686
Package: python-pygtk-gtk-2.16.0-4.i686
/usr/lib/python2.7/site-packages/gtk-2.0: gtkunixprint.so
/usr/lib/python2.7/site-packages/gtk-2.0/gtk: __init__.pyc, __init__.pyo, _gtk.so, _lazyutils.pyc, _lazyutils.pyo, compat.pyc, compat.pyo,
    deprecation.pyc, deprecation.pyo, keysyms.pyc, keysyms.pyo

Any thoughts about this?

Revision history for this message
Patryk Zawadzki (patrys) wrote :

As you're spamming quite a number of people, please keep unrelated PLD stuff out of this bug.

Artur Frysiak (wiget)
Changed in pld-linux:
status: Fix Committed → Fix Released
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

This message is a notice that Fedora 14 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 14. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 14 reached 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 to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

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.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Changed in fedora:
importance: Unknown → Medium
status: Unknown → Won't Fix
Changed in pygtk:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.