pygoocanvas causes immediate segfault on import on x86-64

Bug #264175 reported by Adam Williamson
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pygoocanvas
Confirmed
Undecided
Unassigned

Bug Description

More info will be needed to fix this but I don't really know how to debug stuff in Python so I'm going to need instructions from you on how to provide the extra info.

Building Conduit, I noticed it failed on our (Mandriva's) x86-64 buildhost but succeeded on i586. It was failing on the pygoocanvas test, which just tries to import pygoocanvas. Further inspection reveals:

x86-64

[iurt cooker] adamwklodia~$ python
Python 2.5.2 (r252:60911, Aug 25 2008, 10:52:07)
[GCC 4.3.1 20080626 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import goocanvas
Segmentation fault

i586

[adamw@lenovo SPECS]$ python
Python 2.5.2 (r252:60911, Aug 25 2008, 09:58:25)
[GCC 4.3.1 20080626 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import goocanvas
>>>

That's all I have so far. The builds are identical, the only difference is the arch (i586 vs. x86-64). How do I go about getting the necessary info to let you fix this? Thanks!

Revision history for this message
Gian Mario Tagliaretti (gianmt) wrote :

Hi Adam,

thanks for your bug report. can you tell me what version of pygobject are you using?

We recently had a similar problem in pygtk caused by a bug in pygobject (up to 2.15.3), it's now fixed in trunk.

cheers

Revision history for this message
Adam Williamson (awilliamson) wrote : Re: [Bug 264175] Re: pygoocanvas causes immediate segfault on import on x86-64

On Wed, 2008-09-03 at 09:20 +0000, Gian Mario Tagliaretti wrote:
> Hi Adam,
>
> thanks for your bug report. can you tell me what version of pygobject
> are you using?
>
> We recently had a similar problem in pygtk caused by a bug in pygobject
> (up to 2.15.3), it's now fixed in trunk.

Ah, I see. We are indeed on python-gobject 2.15.3.

Is this fixed in pygobject trunk or pygoocanvas trunk? (And where do I
find pygoocanvas trunk anyhow?)
--
adamw

Revision history for this message
Gian Mario Tagliaretti (gianmt) wrote :

On Wed, Sep 3, 2008 at 5:01 PM, Adam Williamson
<email address hidden> wrote:
> On Wed, 2008-09-03 at 09:20 +0000, Gian Mario Tagliaretti wrote:

>> We recently had a similar problem in pygtk caused by a bug in pygobject
>> (up to 2.15.3), it's now fixed in trunk.

> Ah, I see. We are indeed on python-gobject 2.15.3.
> Is this fixed in pygobject trunk or pygoocanvas trunk?

Has been fixed in pygobject trunk, and a 2.15.4 release has been issued.

> (And where do I
> find pygoocanvas trunk anyhow?)

http://svn.gnome.org/viewvc/pygoocanvas/

Revision history for this message
Gian Mario Tagliaretti (gianmt) wrote :

I close as invalid since the problem it's in pygobject, please feel free to reopen if upgrading to 2.15.4 doesn't fix the problem.

Changed in pygoocanvas:
status: New → Invalid
Revision history for this message
Adam Williamson (awilliamson) wrote :

Right, while I was asleep someone already updated our package to 2.15.4, and now it works. Thanks!

Revision history for this message
Tolgam (tolgam) wrote :

Hum... I'm sorry but I had the same problem and getting pygobject to 2.15.4 did not solved it :-/

Tolgam (tolgam)
Changed in pygoocanvas:
status: Invalid → Confirmed
Revision history for this message
Tolgam (tolgam) wrote :

Just tried again using both pygobject trunk and pygoocanvas trunk; same result :(

Revision history for this message
Gustavo Carneiro (gjc) wrote :

I have x86_64 and cannot reproduce your problem. Even valgrind doesn't catch anything:
gjc@dark-tower:Desktop$ valgrind python -c "import goocanvas"
==7691== Memcheck, a memory error detector.
[...]
==7691== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 155 from 1)

Could you run with valgrind, like I did above?

Revision history for this message
Tolgam (tolgam) wrote :

Yup ! I ran valgrind python -c "import goocanvas" > valgrind.log 2>&1
The result is attached.

Revision history for this message
Gustavo Carneiro (gjc) wrote :

Error here:

==27756== Jump to the invalid address stated on the next line
==27756== at 0x0: ???
==27756== by 0x6292088: PyEval_GetGlobals (in /usr/lib/python2.6/site-packages/goocanvasmodule.so)
==27756== by 0x62AF922: PyImport_Import (in /usr/lib/python2.6/site-packages/goocanvasmodule.so)
==27756== by 0x62AFB74: PyImport_ImportModule (in /usr/lib/python2.6/site-packages/goocanvasmodule.so)
==27756== by 0x62313DD: PyCObject_Import (in /usr/lib/python2.6/site-packages/goocanvasmodule.so)
==27756== by 0x620ADD5: initgoocanvas (goocanvasmodule.c:62)

goocanvasmodule.c line 62 contains:

    Pycairo_IMPORT;

Does 'import cairo' work?

Revision history for this message
Tolgam (tolgam) wrote :

Yes, it works. Log from valgrind also attached (in case it would be usefull anyway)

Revision history for this message
Gustavo Carneiro (gjc) wrote :

Alas, in that case I cannot offer any more hypotheses. Pycairo_IMPORT; expands to:

   Pycairo_CAPI = (Pycairo_CAPI_t*) PyCObject_Import("cairo", "CAPI");

If this crashes, it is deep inside Python. Clearly, pygoocanvas is not doing anything wrong.

I don't really know how to debug this further without forcing you to recompile from scratch python itself (with debugging symbols), pycairo, pygobject, pygtk, and finally pygoocanvas.

Alternatively, it's a long shot, but perhaps the output of the following command will offer some clue:

   strace python -c "import goocanvas"

Revision history for this message
Gian Mario Tagliaretti (gianmt) wrote :

Any news on this one?

Revision history for this message
Douglas Soares de Andrade (dsandrade) wrote :

Hi,

Im having this problem in an ArchLinux i686 system, here is the details:

- Archlinux i686
- Packages

goocanvas 0.13-1
pygoocanvas 0.13.1-1
pygtk 2.13.0-2
pygobject 2.16.0-1
cairo 1.8.6-1
pycairo 1.8.2-1
python 2.6.1

When i do python -c "import goocanvas" it gives me a segfault. I did not saw anything in valgrind and in strace, but if needed i can send the logs.

Im asking this because im the pygoocanvas maintainer in archlinux and it is not working, so i had to do a downgrade (0.12.0) to make it work.

Thanks a lot

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.