ImportError: cannot import name GObject

Bug #604140 reported by Zachary Scott
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pybootchartgui (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: pybootchartgui

Kernel: Linux ubuntu 2.6.35-7-generic-pae
Bootchart --version: 0.0.0
bootchart installed version (apt): 0.90.2-7
pybootchartgui --version: 0.0.0
pybootchartgui installed version (apt): 0+139-3
ubuntu desc: maverick meerkat (development branch)
ubuntu release: 10.10

attached is bootchart found in /var/log/bootchart/

$bootchart output:
** Message: pygobject_register_sinkfunc is deprecated (GtkWindow)
** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible)
** Message: pygobject_register_sinkfunc is deprecated (GtkObject)
/usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py:40: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
  from gtk import _gtk
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.py", line 27, in <module>
    from gi.repository import GObject
ImportError: cannot import name GObject
No path given, trying /var/log/bootchart.tgz
parsing '/var/log/bootchart.tgz'
parsing 'header'
parsing 'proc_stat.log'
parsing 'proc_diskstats.log'
parsing 'proc_ps.log'
warning: no parent for pid '2' with ppid '0'
merged 0 logger processes
pruned 53 process, 0 exploders, 66 threads, and 1 runs
False
Traceback (most recent call last):
  File "/usr/bin/bootchart", line 23, in <module>
    sys.exit(main())
  File "/usr/lib/pymodules/python2.6/pybootchartgui/main.py", line 137, in main
    render()
  File "/usr/lib/pymodules/python2.6/pybootchartgui/main.py", line 128, in render
    batch.render(writer, res, options, filename)
  File "/usr/lib/pymodules/python2.6/pybootchartgui/batch.py", line 41, in render
    draw.render(ctx, options, *res)
  File "/usr/lib/pymodules/python2.6/pybootchartgui/draw.py", line 268, in render
    draw_chart(ctx, IO_COLOR, True, chart_rect, [(sample.time, sample.user + sample.sys + sample.io) for sample in cpu_stats], proc_tree)
  File "/usr/lib/pymodules/python2.6/pybootchartgui/draw.py", line 200, in draw_chart
    xscale = float(chart_bounds[2]) / max(x for (x,y) in data)
ValueError: max() arg is an empty sequence

Revision history for this message
Zachary Scott (zzak-deactivatedaccount) wrote :
Revision history for this message
Stephen Cradock (s-cradock) wrote :

This error shows up today (2010-07-10) in maverick with the new kernel (2.6.35.7-generic) [ NOT -pae].

The error report includes

"Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.py", line 27, in <module>
    from gi.repository import GObject
ImportError: cannot import name GObject"

as above.

Running "bootchart" or "sudo bootchart" in a terminal gives:

~$ sudo bootchart
[sudo] password for sc:
** Message: pygobject_register_sinkfunc is deprecated (GtkWindow)
** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible)
** Message: pygobject_register_sinkfunc is deprecated (GtkObject)
/usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py:40: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
  from gtk import _gtk
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.py", line 27, in <module>
    from gi.repository import GObject
ImportError: cannot import name GObject
No path given, trying /var/log/bootchart.tgz
warning: path '/var/log/bootchart.tgz' does not exist, ignoring.
Parse error: empty state: '/var/log/bootchart.tgz' does not contain a valid bootchart

Revision history for this message
Akria (akria62) wrote :

I haven't used bootchart for some time now, but I did notice similar symptoms with Rhythmbox after updating just now:

----------------------

drmumby@Simplicity-1010:~$ rhythmbox
** Message: pygobject_register_sinkfunc is deprecated (GtkWindow)
** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible)
** Message: pygobject_register_sinkfunc is deprecated (GtkObject)
/usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py:40: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
  from gtk import _gtk
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.py", line 27, in <module>
    from gi.repository import GObject
ImportError: cannot import name GObject

(rhythmbox:3692): Rhythmbox-WARNING **: unable to register rhythmdb classes
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.py", line 27, in <module>
    from gi.repository import GObject
ImportError: cannot import name GObject

----------------------

To me this looks more like an issue with a recently updated version of Python or one of its modules than anything else.

Revision history for this message
Stephen Cradock (s-cradock) wrote :

I have to agree with Akria - in fact, apport-gtk crashes with the same error immediately after the pybootchartgui crash, and then there is a crash in applet.py following that.....

How can we add python2.6 to the packages affected? I've seen it done, but I don't know how....

Revision history for this message
Anders Norgaard (anders-norgaard) wrote :

Hi Zachary,

Thanks for uploading your "-maverick-20100710-1.tgz" file.

When I look in it the proc_ps.log ends with a line half written, and proc_stat.log and proc_diststat.log are both empty.

My guess is that the bootchart logger crashed randomly for some reason.

Can you reproduce the error?

Best,
Anders

Revision history for this message
Anders Norgaard (anders-norgaard) wrote :

Hi Stephen and Akira,

I think you are seeing crashes related to GObject introspection. Like the one reported here

https://bugs.launchpad.net/bugs/603943

Best,
Anders

Revision history for this message
Zachary Scott (zzak-deactivatedaccount) wrote :

@Anders

All I'm doing is booting up to reproduce, I'll attach the dmesg output and the pertaining bootchart.

Is there another log I could use that would detail more about the crash?

Zak

Revision history for this message
Hugo Tavares Reis (htr) wrote :

Hi.

I guess its a regression. I just installed an older version of python-gobject and everything is working.

python-gobject_2.21.3-0ubuntu1_amd64.deb

-h

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

Crashing here also, but I doubt its a pybootchart issue, as its not the only Python app that got issues ...

Changed in pybootchartgui (Ubuntu):
status: New → Confirmed
Revision history for this message
Anders Norgaard (anders-norgaard) wrote :

@Zachary

Unfortunately I am no expert on the bootchart collector. But in your dmesg I can see this

[ 2.832955] Out of memory: kill process 110 (collector) score 51 or a child
[ 2.832963] Killed process 110 (collector) vsz:3268kB, anon-rss:512kB, file-rss:404kB

which looks a lot to me like OOM is killing your bootchart collector.

Later in the dmesg plymouthd and ureadahead is also OOM killed. I wonder why?

Revision history for this message
Zachary Scott (zzak-deactivatedaccount) wrote : Re: [Bug 604140] Re: ImportError: cannot import name GObject
Download full text (3.4 KiB)

@Anders

Unfortunately neither am I and have no clue why I'm getting OOM errors with
4gigs of RAM, plus 1.7GB swap on my SSD..

I'm going to remove bootchart and see if that fixes the OOM errors

On Mon, Jul 12, 2010 at 12:23 PM, Anders Norgaard <<email address hidden>
> wrote:

> *** This bug is a duplicate of bug 603919 ***
> https://bugs.launchpad.net/bugs/603919
>
> @Zachary
>
> Unfortunately I am no expert on the bootchart collector. But in your
> dmesg I can see this
>
> [ 2.832955] Out of memory: kill process 110 (collector) score 51 or a
> child
> [ 2.832963] Killed process 110 (collector) vsz:3268kB, anon-rss:512kB,
> file-rss:404kB
>
> which looks a lot to me like OOM is killing your bootchart collector.
>
> Later in the dmesg plymouthd and ureadahead is also OOM killed. I wonder
> why?
>
> --
> ImportError: cannot import name GObject
> https://bugs.launchpad.net/bugs/604140
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “pybootchartgui” package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: pybootchartgui
>
> Kernel: Linux ubuntu 2.6.35-7-generic-pae
> Bootchart --version: 0.0.0
> bootchart installed version (apt): 0.90.2-7
> pybootchartgui --version: 0.0.0
> pybootchartgui installed version (apt): 0+139-3
> ubuntu desc: maverick meerkat (development branch)
> ubuntu release: 10.10
>
> attached is bootchart found in /var/log/bootchart/
>
> $bootchart output:
> ** Message: pygobject_register_sinkfunc is deprecated (GtkWindow)
> ** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible)
> ** Message: pygobject_register_sinkfunc is deprecated (GtkObject)
> /usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py:40: RuntimeWarning:
> tp_compare didn't return -1 or -2 for exception
> from gtk import _gtk
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.py", line 27, in
> <module>
> from gi.repository import GObject
> ImportError: cannot import name GObject
> No path given, trying /var/log/bootchart.tgz
> parsing '/var/log/bootchart.tgz'
> parsing 'header'
> parsing 'proc_stat.log'
> parsing 'proc_diskstats.log'
> parsing 'proc_ps.log'
> warning: no parent for pid '2' with ppid '0'
> merged 0 logger processes
> pruned 53 process, 0 exploders, 66 threads, and 1 runs
> False
> Traceback (most recent call last):
> File "/usr/bin/bootchart", line 23, in <module>
> sys.exit(main())
> File "/usr/lib/pymodules/python2.6/pybootchartgui/main.py", line 137, in
> main
> render()
> File "/usr/lib/pymodules/python2.6/pybootchartgui/main.py", line 128, in
> render
> batch.render(writer, res, options, filename)
> File "/usr/lib/pymodules/python2.6/pybootchartgui/batch.py", line 41, in
> render
> draw.render(ctx, options, *res)
> File "/usr/lib/pymodules/python2.6/pybootchartgui/draw.py", line 268, in
> render
> draw_chart(ctx, IO_COLOR, True, chart_rect, [(sample.time, sample.user +
> sample.sys + sample.io) for sample in cpu_stats], proc_tree)
> File "/usr/lib/pymodules/python2.6/pybootchartgui/draw.py", line 200, in
> draw_chart
> xscale = float(chart_bounds[2]) / max(x for (x,y) in data...

Read more...

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.