Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259110 - SIGSEGV when import clutter in python
Summary: SIGSEGV when import clutter in python
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-15 17:53 UTC by onox
Modified: 2010-06-26 08:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description onox 2009-02-15 17:53:39 UTC
I get an SIGSEGV when I import clutter in python unless pyclutter has been compiled with i686-pc-linux-gnu-4.2.3 (on my system) instead of i686-pc-linux-gnu-3.4.6-hardenednossp _and_ paxctl -m (disable enforcing MPROTECT) on /usr/bin/python2.5

pyclutter-0.8.2
clutter-0.8.6
pygobject-2.15.4 or pygobject.2.16.0

Author of clutter says they "pretty much use a standard pygobject class" and thinks it's either a distribution bug or a pygobject bug.

In dmesg I found, after having compiled pyclutter with gcc-4 (gcc-3.4 gave nothing except a message that python has segfaulted):

PAX: execution attempt in: /usr/lib/opengl/xorg-x11/lib/libGL.so.1.2, 53dbd000-53dc2000 00065000
PAX: terminating task: /usr/bin/python2.5(python):23177, uid/euid: 1000/1000, PC: 53dbf480, SP: 5c9c229c

which meant I had to paxctl -m /usr/bin/python2.5 to avoid the crash. However, having to use gcc-4 is not nice, and paxctl -m on python2.5 is really not nice. (Only fubarred apps like java and ooffice.bin need that)

Here's emerge --info:

Portage 2.1.6.4 (hardened/x86/2.6, gcc-4.2.3, glibc-2.6.1-r0, 2.6.26-hardened-r2 i686)
=================================================================
System uname: Linux-2.6.26-hardened-r2-i686-Intel-R-_Pentium-R-_M_processor_1600MHz-with-glibc2.1.3
Timestamp of tree: Sat, 14 Feb 2009 15:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mtune=i686 -O2 -pipe -fforce-addr -msse2 -g -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-mtune=i686 -O2 -pipe -fforce-addr -msse2 -g -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-detect distlocks fixpackages nostrip parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo "
LDFLAGS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/desktop-effects /usr/local/portage"

And here's the stacktrace:

>>> import clutter

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x4de0b6c0 (LWP 25555)]
0x4dba70d5 in pyg_constant_strip_prefix (name=0x18 <Address 0x18 out of bounds>, 
    strip_prefix=0x4db8f523 "COGL_") at gobjectmodule.c:2042
2042	gobjectmodule.c: No such file or directory.
	in gobjectmodule.c
(gdb) bt
#0  0x4dba70d5 in pyg_constant_strip_prefix (name=0x18 <Address 0x18 out of bounds>, 
    strip_prefix=0x4db8f523 "COGL_") at gobjectmodule.c:2042
#1  0x4dba9b1c in pyg_flags_add (module=0x4ddcb95c, typename=0x18037f54 "\002", 
    strip_prefix=0x4db8f523 "COGL_", gtype=403065184) at pygflags.c:276
#2  0x4db8f359 in pycogl_add_constants (module=0x4ddcb95c, strip_prefix=0x4db8f523 "COGL_")
    at cogl.c:1475
#3  0x4db6f1e7 in init_clutter () at cluttermodule.c:114
#4  0x4e037d83 in _PyImport_LoadDynamicModule (name=0x5ba38e40 "clutter._clutter", 
    pathname=0x5ba37db0 "/usr/lib/python2.5/site-packages/clutter/_clutter.so", fp=0x18)
    at ./Python/importdl.c:53
#5  0x4e035592 in load_module (name=0x5ba38e40 "clutter._clutter", fp=0xfefefeff, 
    buf=0x5ba37db0 "/usr/lib/python2.5/site-packages/clutter/_clutter.so", type=3, loader=0x0)
    at Python/import.c:1762
#6  0x4e0359cc in import_submodule (mod=0x4ddcb314, subname=0x17e15d74 "_clutter", 
    fullname=0x5ba38e40 "clutter._clutter") at Python/import.c:2404
#7  0x4e035eb5 in ensure_fromlist (mod=0x4ddcb314, fromlist=0x17dfd7ec, 
    buf=0x5ba38e40 "clutter._clutter", buflen=7, recursive=0) at Python/import.c:2315
#8  0x4e03629e in import_module_level (name=0x0, globals=0x0, locals=0x17e0e9bc, fromlist=0x17dfd7ec, 
    level=-1) at Python/import.c:2042
#9  0x4e0364b7 in PyImport_ImportModuleLevel (name=0x17e15c54 "clutter", globals=0x17e0e9bc, 
    locals=0x18, fromlist=0x18, level=24) at Python/import.c:2076
#10 0x4e0190a4 in builtin___import__ (self=0x0, args=0x18, kwds=0x18) at Python/bltinmodule.c:47
#11 0x4dfdb341 in PyCFunction_Call (func=0x4ddd3e6c, arg=0x17e161e4, kw=0xfefefeff)
    at Objects/methodobject.c:77
#12 0x4dfadeeb in PyObject_Call (func=0x4ddd3e6c, arg=0x18, kw=0x18) at Objects/abstract.c:1864
#13 0x4e01e4e8 in PyEval_CallObjectWithKeywords (func=0x18, arg=0x17e161e4, kw=0x0)
    at Python/ceval.c:3442
#14 0x4e020de6 in PyEval_EvalFrameEx (f=0x17e5e85c, throwflag=0) at Python/ceval.c:2067
#15 0x4e024ccc in PyEval_EvalCodeEx (co=0x17e06728, globals=0xfefefeff, locals=0x18, args=0x0, 
    argcount=0, kws=0x0, kwcount=0, defs=0x18, defcount=0, closure=0x18) at Python/ceval.c:2836
#16 0x4e024e85 in PyEval_EvalCode (co=0x18, globals=0x18, locals=0x18) at Python/ceval.c:494
#17 0x4e033c2f in PyImport_ExecCodeModuleEx (name=0x5ba3d420 "clutter", co=0x17e06728, 
    pathname=0x5ba3a240 "/usr/lib/python2.5/site-packages/clutter/__init__.pyc") at Python/import.c:675
#18 0x4e034062 in load_source_module (name=0x5ba3d420 "clutter", 
    pathname=0x5ba3a240 "/usr/lib/python2.5/site-packages/clutter/__init__.pyc", fp=0x17e544b8)
    at Python/import.c:963
#19 0x4e03556e in load_module (name=0x5ba3d420 "clutter", fp=0xfefefeff, 
    buf=0x5ba3b2e0 "/usr/lib/python2.5/site-packages/clutter/__init__.py", type=1, loader=0x0)
    at Python/import.c:1753
---Type <return> to continue, or q <return> to quit---
#20 0x4e03585f in load_package (name=0x5ba3d420 "clutter", pathname=0x4dddcf60 "\003")
    at Python/import.c:1019
#21 0x4e03559e in load_module (name=0x5ba3d420 "clutter", fp=0xfefefeff, 
    buf=0x5ba3c380 "/usr/lib/python2.5/site-packages/clutter", type=5, loader=0x0)
    at Python/import.c:1767
#22 0x4e0359cc in import_submodule (mod=0x4e080f48, subname=0x5ba3d420 "clutter", 
    fullname=0x5ba3d420 "clutter") at Python/import.c:2404
#23 0x4e035c20 in load_next (mod=0x4e080f48, altmod=0x4e080f48, p_name=0x5ba3d420, 
    buf=0x5ba3d420 "clutter", p_buflen=0x5ba3d41c) at Python/import.c:2224
#24 0x4e036084 in import_module_level (name=0x0, globals=0x4ddea434, locals=0x4dde4b54, 
    fromlist=0x4e080f48, level=-1) at Python/import.c:2005
#25 0x4e0364b7 in PyImport_ImportModuleLevel (name=0x17e15c54 "clutter", globals=0x4dde4b54, 
    locals=0x18, fromlist=0x18, level=24) at Python/import.c:2076
#26 0x4e0190a4 in builtin___import__ (self=0x0, args=0x18, kwds=0x18) at Python/bltinmodule.c:47
#27 0x4dfdb341 in PyCFunction_Call (func=0x4ddd3e6c, arg=0x17e03be4, kw=0xfefefeff)
    at Objects/methodobject.c:77
#28 0x4dfadeeb in PyObject_Call (func=0x4ddd3e6c, arg=0x18, kw=0x18) at Objects/abstract.c:1864
#29 0x4e01e4e8 in PyEval_CallObjectWithKeywords (func=0x18, arg=0x17e03be4, kw=0x0)
    at Python/ceval.c:3442
#30 0x4e020de6 in PyEval_EvalFrameEx (f=0x17de9d94, throwflag=0) at Python/ceval.c:2067
#31 0x4e024ccc in PyEval_EvalCodeEx (co=0x17e064e8, globals=0xfefefeff, locals=0x18, args=0x0, 
    argcount=0, kws=0x0, kwcount=0, defs=0x18, defcount=0, closure=0x18) at Python/ceval.c:2836
#32 0x4e024e85 in PyEval_EvalCode (co=0x18, globals=0x18, locals=0x18) at Python/ceval.c:494
#33 0x4e03d892 in run_mod (mod=0x18, filename=0xfefefeff <Address 0xfefefeff out of bounds>, 
    globals=0x18, locals=0x18, flags=0x0, arena=0x0) at Python/pythonrun.c:1273
#34 0x4e03eeb1 in PyRun_InteractiveOneFlags (fp=0x18, filename=0x4e06c8bf "<stdin>", flags=0x5ba3e8fc)
    at Python/pythonrun.c:792
#35 0x4e03f016 in PyRun_InteractiveLoopFlags (fp=0x4df3c6e0, filename=0x4e06c8bf "<stdin>", 
    flags=0x5ba3e8fc) at Python/pythonrun.c:723
#36 0x4e03f5ce in PyRun_AnyFileExFlags (fp=0x4df3c6e0, filename=0x4e06c8bf "<stdin>", closeit=0, 
    flags=0x5ba3e8fc) at Python/pythonrun.c:692
#37 0x4e048f88 in Py_Main (argc=0, argv=0x5ba3ea44) at Modules/main.c:523
#38 0x17dcf70a in main (argc=24, argv=0x18) at ./Modules/python.c:23
Comment 1 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-06-26 03:47:20 UTC
You might want to see if this problem is still around with pyclutter-0.10.2 + clutter-1.2.10
Comment 2 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-06-26 08:31:41 UTC
Bug reporter has informed me over IRC that the problem is now solved (thanks onox!).

Closing FIXED.