Python lenses segfault with pygobject3

Bug #855402 reported by David Callé
56
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Unity Distro Priority
Fix Released
Undecided
Unassigned
pygobject
Fix Released
Medium
pygobject (Ubuntu)
Fix Released
Medium
Unassigned
Oneiric
Fix Released
Undecided
Unassigned

Bug Description

Python lenses segfault with the new pygobject3 when the daemon is started.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :
Changed in unity:
assignee: nobody → Mikkel Kamstrup Erlandsen (kamstrup)
importance: Undecided → Critical
milestone: none → 4.18.0
status: New → In Progress
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

The bug appears to be triggering a segfault inside libdee, so it's probably not libunity as I first thought... One can also reproduce somewhat easier by simply running the Python demo script from lp:dee (http://bazaar.launchpad.net/~unity-team/dee/trunk/view/head:/examples/pythontricks.py)

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Or to really make it simple; this python session:

>>> from gi.repository import Dee
>>> m = Dee.SequenceModel.new ()
>>> m.set_schema ("s", "i")
>>> m.append("hello", 27)
Segmentation fault (core dumped)

Revision history for this message
Michal Hruby (mhr3) wrote :

I dug into this, and these are the findings:

- the GVariant array which is a parameter of append_row() comes garbled from python, it looks like a bug in pygobject
- I talked to John, who said they'll need to special case GVariants like they do GValues, but it's not going in before the freeze

Of course one of the options is also to break the API (use GArray / GPtrArray).

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

We can't change the Dee ABI at such a fundamental level at this point in the cycle. Even disregarding that I think the Dee API as it is now is totally sensible, it allows for natural stack allocation of the containing array and tricks like that, adding to that that it is totally standard Cism to use arrays like this. In other words: PyGI must be fixed :-) (since it's also a regression)

Changed in unity:
milestone: 4.18.0 → 4.20.0
Changed in pygobject:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

(I am working on this right now, to follow progress look at the upstream bug report)

Changed in unity:
milestone: 4.20.0 → 4.22.0
Changed in unity (Ubuntu):
status: New → In Progress
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

*phew* that was harder than I hoped :-) But the upstream bug now contains patches and tests to fix this.

Changed in unity:
milestone: 4.22.0 → 4.24.0
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

I just ran a check, that the very latest patch set I attached upstream (today) does make the Dee bindings fully functional (again)

Revision history for this message
David Callé (davidc3) wrote :

I applied the patch, python lenses are back! Thanks Mikkel.

Changed in unity:
milestone: 4.24.0 → 4.26.0
Revision history for this message
Konstantinos Togias (ktogias) wrote :

After today updates this bugs seems to have come back. When I run in python

>>> from gi.repository import Dee
>>> m = Dee.SequenceModel.new ()
>>> m.set_schema ("s", "i")
>>> m.append("hello", 27)

I get a Segmentation fault. Last night python lenses worked fine.

I attach apt history log from the upgrade that broke this.

Revision history for this message
Martin Pitt (pitti) wrote :

Mikkel's pygobject fix just landed upstream.

affects: unity (Ubuntu) → pygobject (Ubuntu)
Changed in pygobject (Ubuntu):
importance: Undecided → Medium
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello David, or anyone else affected,

Accepted pygobject into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in pygobject (Ubuntu Oneiric):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
David Callé (davidc3) wrote :

I've been using the patch for a few weeks now, without noticing any regressions.
I'm now testing the new package on two machines : everything seems fine and this bug is fixed.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 855402] Re: Python lenses segfault with pygobject3

Hello David,

David Callé [2011-10-25 8:58 -0000]:
> I've been using the patch for a few weeks now, without noticing any regressions.
> I'm now testing the new package on two machines : everything seems fine and this bug is fixed.

Thanks for testing! However, at the time you wrote this, the proposed
update was not yet on the mirrors. What package did you test in particular?

Martin

Revision history for this message
David Callé (davidc3) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Ah, thanks :)

tags: added: verification-done
removed: verification-needed
Changed in pygobject:
status: Confirmed → Fix Released
Changed in unity (Ubuntu):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygobject - 3.0.2-2

---------------
pygobject (3.0.2-2) experimental; urgency=low

  * debian/control.in: Add locales build dependency, to ensure that the test
    suite's localedef command can succeed.
  * debian/control.in: Bump g-i build deps to >= 1.31.0, as our test suite
    needs methods from that version.
  * Add 00git_marshal_gvariant_arrays.patch: Fix marshaling of arrays of
    GVariants. Thanks Mikkel Kamstrup Erlandsen! (LP: #855402)
 -- Martin Pitt <email address hidden> Thu, 27 Oct 2011 07:25:09 +0200

Changed in pygobject (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygobject - 3.0.0-0ubuntu4

---------------
pygobject (3.0.0-0ubuntu4) oneiric-proposed; urgency=low

  * Add 00git_wrapper_ref.patch: When converting an object with transfer none,
    make sure the wrapper owns a ref. (LP: #874299)
  * Add 00git_marshal_gvariant_arrays.patch: Fix marshaling of arrays of
    GVariants. Thanks Mikkel Kamstrup Erlandsen! (LP: #855402)
 -- Martin Pitt <email address hidden> Tue, 25 Oct 2011 09:25:54 +0200

Changed in pygobject (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Tim Penhey (thumper)
tags: added: udp
Changed in unity:
status: In Progress → Fix Released
no longer affects: unity
no longer affects: unity (Ubuntu)
no longer affects: unity (Ubuntu Oneiric)
Changed in unity-distro-priority:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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