Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55436 - error in python script breaks mx-base-2.0.5 build
Summary: error in python script breaks mx-base-2.0.5 build
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 57968 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-28 08:56 UTC by Benjamin Collins
Modified: 2006-02-05 10:47 UTC (History)
2 users (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 Benjamin Collins 2004-06-28 08:56:34 UTC
When I tried to `emerge egenix-mx-base` I got this:

/usr/bin/python -O /var/tmp/portage/egenix-mx-base-2.0.5/temp/tmpiNL5WP.py
usr/lib/python2.3/site-packages/mx/TextTools/Examples/pytag.py:47: SyntaxWarning: name 'debugging' is used prior to global declaration
python: stack smashing attack in function symtable_node()
error: command '/usr/bin/python' terminated by signal 6

!!! ERROR: dev-python/egenix-mx-base-2.0.5 failed.
!!! Function distutils_src_install, Line 43, Exitcode 1
!!! (no error message)


I would normally try to spend time debugging it myself and maybe submitting a patch, but I don't know anything about Python.

Reproducible: Always
Steps to Reproduce:
1. emerge egenix-mx-base
2. wait
3.

Actual Results:  
See above details

Expected Results:  
sucessfully build the ebuild

obi-wan root # emerge info
Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.6.7-gentoo-r3)
=================================================================
System uname: 2.6.7-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 1.70GHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -fprefetch-loop-arrays
-funroll-loops"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -fprefetch-loop-arrays
-funroll-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa apache2 apm avi berkdb cdr cjk crypt cups doc emacs encode esd
ethereal f77 fbcon foomaticdb gcj gd gdbm gif gmp gnome gpm gtk gtk+ gtk2 icc
imagemagick imlib ipv6 java jpeg kde leim libg++ libwww mad mikmod mmx motif
mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime
readline samba sdl slang spell sse ssl svga tcpd tetex tiff truetype unicode usb
vhosts wmf x86 xinerama xml xml2 xmms xv xvid zlib"
Comment 1 Rob Cakebread (RETIRED) gentoo-dev 2004-06-30 08:49:02 UTC
What version of Python are you using?
Comment 2 Lukasz Strzygowski (RETIRED) gentoo-dev 2004-07-23 08:34:19 UTC
*** Bug 57968 has been marked as a duplicate of this bug. ***
Comment 3 Alastair Tse (RETIRED) gentoo-dev 2004-07-24 13:49:16 UTC
that looks like some sort of hardened stuff? is that stack smashing?
Comment 4 Jason Shoemaker (RETIRED) gentoo-dev 2004-08-29 15:13:30 UTC
Could related to bug 50309 (python not liking -O3).  My system is built under -O2. I did try building egenix-mx-base with -O3 but still couldn't recreate the bug. Looks like a patch is on the way.
Comment 5 Alexander Skwar 2004-11-14 13:33:55 UTC
Jason, you said, that it looks like a patch is on its way - any idea, if it's taking a rather long detour? *G*

IOW: Problem still exists. /var/db/pkg/dev-lang/python-2.3.4 used here. hardened toolchain. -O3 compiled python.




22:32:25 askwar@alturo:~ $ emerge info
Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r3.PHP2.netconsole_8kb-stack.03 i686)
=================================================================
System uname: 2.6.9-gentoo-r3.PHP2.netconsole_8kb-stack.03 i686 Intel(R) Celeron(R) CPU 2.00GHz
Gentoo Base System version 1.6.5
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-fomit-frame-pointer -pipe -O2 -march=pentium4"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache collision-protect distlocks sandbox sfperms"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://194.117.158.29/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl apache2 apm arts async avi bzlib crypt cscope cups curl curlwrappers diet djbfft encode exif fam flash foomaticdb ftp fwdzone gd gdbm gif gnome gtk2 hal hardened iconv imagemagick imap imlib immqt-bc ithreads javascript jpeg kde libedit libg++ libwww lzo lzw lzw-tiff mad maildir mailwrapper mbox mmap mmx mng mpeg mysql ncurses nls no-old-linux noantlr nobcel nobeanutils nobsh nocommonslogging nocommonsnet nojdepend nojsch nojython nolog4j nooro noregexp norhino noxalan noxerces nptl offensive oggvorbis opengl oss pam parse-clocks pcntl pcre pdflib perl pic pie png posix postgres pwdb python qt quicktime readline recode sasl sdl shared slang sockets spell sse ssl sysvipc tcpd tiff truetype unicode x86 xfs xml2 xmms xv zlib linguas_de"
Comment 6 Alexander Skwar 2004-11-14 14:01:19 UTC
I now compiled dev-lang/python-2.3.4 with -O2 and get the same error message. So, O2 vs. O3 isn't the cause here.

Hmm, just noticed something... At the end of the python compilation, I get these messages:

 * Byte compiling python modules for python-2.3 .. ...
/usr/lib/python2.3/site-packages/mx/TextTools/Examples/pytag.py:47: SyntaxWarning: name 'debugging' is used prior to global declaration
  def pytag(text,table,startindex=0,len_text=not_set,taglist=not_set):
python2.3: stack smashing attack in function symtable_node()
/usr/portage/eclass/python.eclass: line 138:  4923 Abgebrochen             python${PYVER} ${myroot}/usr/lib/python${PYVER}/compileall.py ${compileopts} $@
/usr/lib/python2.3/site-packages/mx/TextTools/Examples/pytag.py:47: SyntaxWarning: name 'debugging' is used prior to global declaration
  def pytag(text,table,startindex=0,len_text=not_set,taglist=not_set):
python2.3: stack smashing attack in function symtable_node()
/usr/portage/eclass/python.eclass: line 138:  4960 Abgebrochen             python${PYVER} -O ${myroot}/usr/lib/python${PYVER}/compileall.py ${compileopts} $@                                                 [ !! ]

Just like in the egenix build, it says "stack smashing attack". So I doubt that this is an issue with egenix. I much rather suppose, that it has to do with python or the toolchain.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-02-05 10:47:31 UTC
Python now replaces -O3 on hardened, no response from original reporter, closing a stale bug.