Python Exception <class 'TypeError'> iter() returned non-iterator of type '_iterator'

Bug #1449389 reported by Marius Gedminas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GLib
Fix Released
Medium
gdb (Ubuntu)
Invalid
Undecided
Unassigned
glib2.0 (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

I tried to gdb a gnome-shell segfault:

(gdb) bt
#0 0x00007f8cad51f638 in g_slice_alloc (magazine_chunks=0xf879b0) at /build/buildd/glib2.0-2.44.0/./glib/gslice.c:535
#1 0x00007f8cad51f638 in g_slice_alloc (tmem=<optimized out>, ix=1) at /build/buildd/glib2.0-2.44.0/./glib/gslice.c:842
#2 0x00007f8cad51f638 in g_slice_alloc (mem_size=mem_size@entry=24) at /build/buildd/glib2.0-2.44.0/./glib/gslice.c:998
Python Exception <class 'TypeError'> iter() returned non-iterator of type '_iterator':

This looks like a bug in a gdb pretty-printer that's shipped with Ubuntu.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

The command to list Python scripts that have been autoloaded is:

    (gdb) info auto-load python-scripts

I'm guessing /usr/share/gdb/auto-load/lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.0-gdb.py is the one that causes my problem.
It's a small script that adds /usr/share/glib-2.0/gdb to sys.path and imports stuff from it.

/usr/share/glib-2.0/gdb is shipped in libglib2.0-0-dbg.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

gdb in Ubuntu links against libpython3.4.

The Python scripts in /usr/share/glib-2.0/gdb haven't been fully ported to Python 3: the custom iterators should define a '__next__' method alias pointing to 'next'.

Changed in gdb (Ubuntu):
status: New → Invalid
Revision history for this message
Marius Gedminas (mgedmin) wrote :
Revision history for this message
Marius Gedminas (mgedmin) wrote :
Revision history for this message
Iain Lane (laney) wrote :

Cheers - I think it'd be good to get this naturally via upstream. Do you agree? When the patch is acked, you can ask to have it put into the stable branch too & then we'll get it in vivid.

Changed in glib2.0 (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Changed in glib:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in glib:
status: Confirmed → Fix Released
Changed in glib2.0 (Ubuntu):
status: Triaged → Fix Released
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.