After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 550317 - >=pygobject-2.15.3 doesn't pass "make check"
>=pygobject-2.15.3 doesn't pass "make check"
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
2.15.x
Other Linux
: Normal major
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2008-09-01 21:56 UTC by Gilles Dartiguelongue
Modified: 2009-02-02 21:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
build.log (52.98 KB, text/plain)
2008-09-03 21:59 UTC, Gilles Dartiguelongue
  Details
maybe fixes this (1.78 KB, patch)
2008-09-07 15:09 UTC, Paul Pogonyshev
none Details | Review
valgrind-gio.log (162.79 KB, text/plain)
2008-09-07 15:43 UTC, Gilles Dartiguelongue
  Details

Description Gilles Dartiguelongue 2008-09-01 21:56:52 UTC
tests # LC_ALL="en_US.UTF-8" make check
make  check-local
make[1]: Entering directory `/var/tmp/portage/dev-python/pygobject-2.15.3/work/pygobject-2.15.3/tests'
make[1]: *** [check-local] Segmentation fault
make[1]: Leaving directory `/var/tmp/portage/dev-python/pygobject-2.15.3/work/pygobject-2.15.3/tests'
make: *** [check-am] Error 2
Comment 1 Paul Pogonyshev 2008-09-03 21:10:20 UTC
Can you try with 2.15.4?  We fixed a bug that caused segfaults on some machines.
Comment 2 Gilles Dartiguelongue 2008-09-03 21:59:57 UTC
Created attachment 117966 [details]
build.log

still no luck, see attachment.
Comment 3 Paul Pogonyshev 2008-09-03 22:04:51 UTC
This suggest that a unit test fails.  Can you determine which test is that?
Comment 4 Gilles Dartiguelongue 2008-09-03 22:58:17 UTC
it's been kind of painful to get the tests to be verbose enough to show which test is failing but here are some details:


.../tests/test_gio.py:787: Warning: g_object_ref: assertion `G_IS_OBJECT (object)' failed
  info2 = info1.dup()

and the one causing the error in my build.log is in test_subtype.py

other tests looks fine, hope this helps.
Comment 5 Paul Pogonyshev 2008-09-06 12:32:51 UTC
Gilles: what does gio.app_info_get_all() and gio.app_info_get_all()[0] evaluate on your platform?  It those are lists of gio.unix.DesktopAppInfo and single instance of it (as expected), can you produce valgrind logs of running that single test?
Comment 6 Gilles Dartiguelongue 2008-09-07 11:33:51 UTC
I'm no python master so forgive me if what I'm doing is just silly :)

here is the output of running gio.app_info_get_all()[0] multiple times (but it's probably the result of currently installed 2.15.2 not the svn checkout)

>>> gio.app_info_get_all()[0]
<gio.unix.DesktopAppInfo at 0x767e60: Déchiffrer le fichier>
>>> gio.app_info_get_all()[0]
<gio.unix.DesktopAppInfo at 0x2b03d1e1d4b0: Déchiffrer le fichier>
>>> gio.app_info_get_all()[0]
<gio.unix.DesktopAppInfo at 0x765190: Déchiffrer le fichier>
>>> gio.app_info_get_all()[0]
<gio.unix.DesktopAppInfo at 0x2b03d1e1d4b0: Déchiffrer le fichier>


> It those are lists of gio.unix.DesktopAppInfo and single
instance of it (as expected), can you produce valgrind logs of running that
single test?

could you tell me how to do it ?
Comment 7 Paul Pogonyshev 2008-09-07 15:01:06 UTC
Such heavily changing addresses are somewhat suspicious, but not an error of itself.  Might or might not be an indication of something else going wrong.

Anyway:

$ valgrind --log-file=gio --num-callers=20 python
Python 2.5 (r25:51908, Apr  2 2007, 00:15:32)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gio
>>> info1 = gio.app_info_get_all()[0]
>>> info2 = info1.dup()
>>> info1 is info2
False
>>> info1 == info2
True

Then you will have file 'gio.pid###' with valgrind log.  However, I have some PyGObject-related error in my logs already.  Maybe they are significant, just don't cause such problems on my architecture.  Need to investigate.
Comment 8 Paul Pogonyshev 2008-09-07 15:09:08 UTC
Created attachment 118225 [details] [review]
maybe fixes this

Gilles: can you test if this fixes your problem?  I cannot say I quite understand why there is an error in my valgrind log, but this patch fixes it.  Maybe it fixes the whole bug too.
Comment 9 Gilles Dartiguelongue 2008-09-07 15:43:23 UTC
Created attachment 118230 [details]
valgrind-gio.log

here is the valgrind log with patch applied. It doesn't fix the testsuite though.

While running the commands you pasted, here is what I've got:

valgrind --log-file=gio.log --num-callers=20 python
Python 2.5.2 (r252:60911, Aug 23 2008, 19:09:54) 
[GCC 4.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gio
>>> info1 = gio.app_info_get_all()[0]
>>> info2 = info1.dup()
__main__:1: Warning: g_object_ref: assertion `G_IS_OBJECT (object)' failed
>>> info1 is info2
False
>>> info1 == info2
True

In case I didn't write it before, I'm simple running on amd64, not that exotic :)
Comment 10 Gilles Dartiguelongue 2008-09-07 15:46:00 UTC
btw, is there any way to make the unittesting framework write out the name of the test its running ? I wouldn't really like having to split test_subtypes.py into separate chunks to find where's the culprit.
Comment 11 Paul Pogonyshev 2008-09-07 15:54:36 UTC
Gustavo: can you please look at this?  From valgrind report looks like another memory corruption on amd64 architecture caused by PYGLIB_DEFINE_TYPE() in 'pygspawn.c'.  I remember you fixed another instance of the same problem last time.
Comment 12 Gustavo Carneiro 2008-09-07 17:21:53 UTC
I have known for a few weeks there are probably lots of memory problems lurking around pygobject.  I am afraid to even look at this because it will take me many hours to fix them all :P
Comment 13 Paul Pogonyshev 2008-09-07 20:59:25 UTC
Gustavo: well, I didn't ask to fix them all, you could fix this one for a start.

Gilles: can you please evaluate the following (after 'import glib') on your platform:

glib.Pid
glib.Pid.__base__
glib.Pid.__basicsize__
glib.Pid.__base__.__basicsize__
glib.Pid.__itemsize__
glib.Pid.__base__.__itemsize__
Comment 14 Gilles Dartiguelongue 2008-09-07 21:13:21 UTC
>>> import glib
>>> glib.Pid
<type 'glib.Pid'>
>>> glib.Pid.__base__
<type 'int'>
>>> glib.Pid.__basicsize__
24
>>> glib.Pid.__base__.__basicsize__
24
>>> glib.Pid.__itemsize__
0
>>> glib.Pid.__base__.__itemsize__
0
Comment 15 Gustavo Carneiro 2008-09-08 16:21:09 UTC
If I remove gio unit tests, everything runs in valgrind with zero errors:

The GIO tests I cannot run because GVFS refuses to run in jhbuild:

GVFS-RemoteVolumeMonitor-WARNING **: invoking IsSupported() failed for remote volume monitor with dbus name org.gtk.Private.HalVolumeMonitor: org.freedesktop.DBus.Error.ServiceUnknown: The name org.gtk.Private.HalVolumeMonitor was not provided by any .service files
aborting...
Comment 16 Mart Raudsepp 2008-10-07 15:49:05 UTC
gedit-2.24.0 already uses the gio bindings. Makes me feel a tad bit uncomfortable in packaging it...
Comment 17 Gilles Dartiguelongue 2008-10-26 19:26:07 UTC
for the record, this appears to be fixed with gnome a mixed 2.24.0 2.24.1 system. It seems an update of an underlying library fixed the issue (I think glib-2.18.2 is responsible here).

I'll try to double check that we I get enough time (hence not closing right now).
Comment 18 Paul Pogonyshev 2008-12-06 19:56:49 UTC
Gilles: any results of that check?
Comment 19 Gilles Dartiguelongue 2009-02-02 21:40:31 UTC
I can't test it right now because I'm using python 2.6 which is getting in the way like in bug #570281 but the test restriction has been lifted in our ebuild so it seems it was tested and it did pass tests. Thanks for helping out and sorry for the delayed answer. Closing fixed.