[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#697402: bzr-gtk: causes crash in pydoc -k when python-gtk2 is also installed

Package: bzr-gtk
Version: 0.103.0+bzr792-3
Severity: critical

Dear Maintainer,

Having bzr-gtk and python-gtk2 installed at the same time causes "pydoc
-k foobarbaz" to crash, because

  1) pydoc has to import all packages in order to find out what modules
  they contain

  2) your package bzrlib.plugins.gtk.branchview causes gi.repository.Gtk
  to be imported

  3) python-gtk2's package gtk imports _gtk

  4) importing both of those modules causes a SIGSEGV

Anyone hoping to take a look at the crash itself might (or might not)
find this script helpful:

import sys
import resource
#import pkgutil

# A big stack wastes time/space in GDB.
# (This size was chosen for i386; adjust as needed.)
resource.setrlimit(resource.RLIMIT_STACK, (32*1024, -1))

# import bzrlib.plugins.gtk.branchview
from gi.repository import Gtk
import _gtk

#for importer, modname, ispkg in pkgutil.walk_packages():
#    print modname, ispkg, importer
#    sys.stdout.flush()
This is marked critical ONLY because having your package installed
causes "pydoc -k" to fail, not because I think you're actually to blame
for this: the ultimate problem is 4) above, which is of course a problem
with python-gi and python-gtk2; bzr-gtk just exposes this booby-trap to
"pydoc -k".

I would report a bug for that, too, but I don't know which package to
report it against :-(.

P.S. This would have been easier to debug if the python in wheezy had
debug syms available <http://bugs.debian.org/681348>.

Thanks to Jakub Wilk for building me a python with the patch I posted on
<http://paste.debian.net/220873/>: maybe all I got out of valgrind was
the fact that it was a stack overflow, but having debug symbols was

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages bzr-gtk depends on:
ii  bzr                      2.6.0~bzr6526-1
ii  gir1.2-gconf-2.0         3.2.5-1+build1
ii  gir1.2-gtk-3.0           3.4.2-4
ii  gir1.2-gtksource-3.0     3.4.2-1
ii  libcanberra-gtk3-module  0.28-6
ii  python                   2.7.3~rc2-1
ii  python-gi                3.2.2-1
ii  python2.6                2.6.8-0.2
ii  python2.7                2.7.3~rc2-2.1+valgrind

Versions of packages bzr-gtk recommends:
ii  bzr-dbus            0.1~bzr52-2
ii  gir1.2-freedesktop  1.32.1-1
ii  gir1.2-notify-0.7   0.7.5-1
ii  python-gi-cairo     3.2.2-1
pn  seahorse            <none>

Versions of packages bzr-gtk suggests:
ii  bzr-loom    2.2.0-2
pn  bzr-search  <none>

Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!

Reply to: