Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 256589 - dev-java/iso-relax-20050331-r2 compilation fails due to /usr/lib64/python2.5/StringIO.pyc out of date
Summary: dev-java/iso-relax-20050331-r2 compilation fails due to /usr/lib64/python2.5/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 257648 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-28 06:44 UTC by BedOS_Gui
Modified: 2009-05-25 10:15 UTC (History)
4 users (show)

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


Attachments
emerge --info (emerge--info,11.33 KB, text/plain)
2009-01-28 06:49 UTC, BedOS_Gui
Details
emerge log (dev-java:iso-relax-20050331-r2:20090128-064648.log,4.67 KB, text/plain)
2009-01-28 06:50 UTC, BedOS_Gui
Details
iso-relax-20050331-r2 build log (build.log,9.56 KB, text/plain)
2009-01-28 09:36 UTC, Andrei Ivanov
Details
sandbox-1.3.3-backtrace-seg.patch (sandbox-1.3.3-backtrace-seg.patch,2.11 KB, patch)
2009-02-05 00:25 UTC, Ed Catmur
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BedOS_Gui 2009-01-28 06:44:34 UTC
When emerging fresh iso-relax-20050331-r2 package, this error occurs :

>>> Starting src_configure
Rewriting attributes
ACCESS DENIED  unlink:    /usr/lib64/python2.5/StringIO.pyc
sandbox memory corruption free(0x00000000012717e0): Invalid argument
/usr/lib/libsandbox.so[0x7f340e289723]
/usr/lib/libsandbox.so[0x7f340e2881aa]
/usr/lib/libsandbox.so[0x7f340e289435]
/usr/lib/libsandbox.so(unlink+0x99)[0x7f340e28c139]
/usr/lib/libpython2.5.so.1.0[0x7f340dfe8378]
/usr/lib/libpython2.5.so.1.0[0x7f340dfeae8a]
/usr/lib/libpython2.5.so.1.0[0x7f340dfeb111]
/usr/lib/libpython2.5.so.1.0[0x7f340dfeb74a]
/usr/lib/libpython2.5.so.1.0(PyImport_ImportModuleLevel+0xae)[0x7f340dfebb1e]
/usr/lib/libpython2.5.so.1.0[0x7f340dfcd9fd]
/usr/lib/libpython2.5.so.1.0(PyObject_Call+0x67)[0x7f340df4b477]
/usr/lib/libpython2.5.so.1.0(PyEval_CallObjectWithKeywords+0x71)[0x7f340dfcdfb1]
/usr/lib/libpython2.5.so.1.0(PyEval_EvalFrameEx+0x281c)[0x7f340dfd154c]
/usr/lib/libpython2.5.so.1.0(PyEval_EvalCodeEx+0x6b5)[0x7f340dfd4c05]
/usr/lib/libpython2.5.so.1.0(PyEval_EvalCode+0x32)[0x7f340dfd4de2]
/usr/lib/libpython2.5.so.1.0(PyRun_FileExFlags+0xaa)[0x7f340dff4e7a]
/usr/lib/libpython2.5.so.1.0(PyRun_SimpleFileExFlags+0x1c5)[0x7f340dff5125]
/usr/lib/libpython2.5.so.1.0(Py_Main+0xb52)[0x7f340dfff7c2]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7f340d99c5c6]
/usr/bin/python[0x4006b9]
/var/tmp/paludis/dev-java-iso-relax-20050331-r2/temp/loadsaveenv: line 3244:  3131 Segmentation fault      /usr/lib64/javatoolkit/bin/xml-rewrite-3.py -f './build.xml' -c --source-element javadoc --source-element javac --source-element xjavac --source-element javac.preset --source-attribute source --source-value 1.4 --target-element javac --target-element xjavac --target-element javac.preset --target-attribute target --target-value 1.4 --target-attribute nowarn --target-value yes
 * If the output above contains:
 * ImportError:
 * /usr/lib/python2.4/site-packages/_xmlplus/parsers/pyexpat.so:
 * undefined symbol: PyUnicodeUCS2_DecodeUTF8
 * Try re-emerging dev-python/pyxml

!!! ERROR in dev-java/iso-relax-20050331-r2:
!!! In _bsfix_die at line 604
!!! xml-rewrite2 failed: ./build.xml  Look at the eerror message above

!!! Call stack:
!!!    * _bsfix_die (/var/tmp/paludis/dev-java-iso-relax-20050331-r2/temp/loadsaveenv:604)
!!!    * java-ant_bsfix_files (/var/tmp/paludis/dev-java-iso-relax-20050331-r2/temp/loadsaveenv:3244)
!!!    * java-ant_bsfix (/var/tmp/paludis/dev-java-iso-relax-20050331-r2/temp/loadsaveenv:3151)
!!!    * java-ant-2_src_configure (/var/tmp/paludis/dev-java-iso-relax-20050331-r2/temp/loadsaveenv:3129)
!!!    * src_configure (/var/tmp/paludis/dev-java-iso-relax-20050331-r2/temp/loadsaveenv:5355)
!!!    * ebuild_f_configure (/usr/libexec/paludis/2/src_configure.bash:52)
!!!    * ebuild_main (/usr/libexec/paludis/ebuild.bash:482)
!!!    * main (/usr/libexec/paludis/ebuild.bash:498)

diefunc: making ebuild PID 2985 exit with error
die trap: exiting with error.

Reproducible: Always
Comment 1 BedOS_Gui 2009-01-28 06:49:03 UTC
My USE flags follows :

* dev-java/iso-relax [U 20050331-r1 -> 20050331-r2] <target>
    -source build_options: -optional_tests -split strip

and I attach my emerge --info and compilation log
Comment 2 BedOS_Gui 2009-01-28 06:49:23 UTC
Created attachment 179922 [details]
emerge --info
Comment 3 BedOS_Gui 2009-01-28 06:50:07 UTC
Created attachment 179924 [details]
emerge log
Comment 4 Serkan Kaba (RETIRED) gentoo-dev 2009-01-28 06:53:29 UTC
(In reply to comment #2)
> Created an attachment (id=179922) [edit]
> emerge --info
> 

Looks like you missed rebuilding python packages after a python upgrade. If python-updater supports paludis, rebuild python packages with it, if not you may need to do that manually.
Comment 5 Andrei Ivanov 2009-01-28 09:35:31 UTC
I also get this error.
I've ran python-updater but it didn't find anything requiring an update and I don't use paludis...

Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r4-i686-AMD_Athlon-tm-_XP_2600+-with-glibc2.0
Timestamp of tree: Wed, 28 Jan 2009 07:45:03 +0000
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.3.6-r2, 2.4.4-r4, 2.5.4-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.2
sys-apps/sandbox:    1.3.3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="candy distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirrors.evolva.ro/gentoo/ ftp://ftp.roedu.net/pub/mirrors/gentoo.org"
LDFLAGS="-Wl,-O1"
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/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow aalib acl acpi adns alsa apache2 bzip2 cairo caps cli cracklib crypt cups curl curlwrappers dio exif expat flac fortran ftp gd gif gmp gpm iconv idn imagemagick imap imlib isdnlog jpeg lzma mad maildir mailwrapper memlimit mhash midi mmap mmx mudflap ncurses network-cron nocxx nptl nptlonly offensive oggvorbis openmp pam pcntl pcre png posix pppd readline reflection samba session shared sharedmem slang soap sockets speex spl sse ssl svg sysfs sysvipc tcpd theora tiff truetype unicode urandom usb vhosts vim-syntax wmf x86 xml xmlrpc xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 6 Andrei Ivanov 2009-01-28 09:36:18 UTC
Created attachment 179926 [details]
iso-relax-20050331-r2 build log
Comment 7 BedOS_Gui 2009-01-28 10:22:21 UTC
(In reply to comment #4)
> Looks like you missed rebuilding python packages after a python upgrade. If
> python-updater supports paludis, rebuild python packages with it, if not you
> may need to do that manually.
> 
applied and it works fine to compile iso-relax, thanks Serkan !
Comment 8 Serkan Kaba (RETIRED) gentoo-dev 2009-02-01 20:25:02 UTC
Reopening for a proper fix.
Comment 9 Ed Catmur 2009-02-05 00:25:04 UTC
Created attachment 180991 [details, diff]
sandbox-1.3.3-backtrace-seg.patch

Patch.
Comment 10 Ed Catmur 2009-02-05 00:33:37 UTC
Couple of fixes here.

First, the size argument to backtrace(void **buffer, int size) is the array length of buffer, not its size-in-bytes.  Passing the wrong size causes the segfault.  I also increase the size of buffer to store 100 frame pointers because it helps with stack-heavy programs like bash.

Next, the memory corruption happens because libsbutil uses strndup, (via xstrndup) and strndup has an optimised implementation in bits/string2.h that bypasses the actual strndup symbol, so misses the libsandbox mmap-based alloc (but free, of course, doesn't).  I replace strndup in xstrndup with a simple reimplementation, and strdup similarly for safety.

Finally, and this is quite unrelated to the above, if SANDBOX_ABORT is in env it will abort the parent on SANDBOX_PREDICT; this should only occur for SANDBOX_DENY.
Comment 11 Ed Catmur 2009-02-05 00:35:31 UTC
Please throw this over to sandbox@ and/or vapier.
Comment 12 Serkan Kaba (RETIRED) gentoo-dev 2009-02-05 04:47:03 UTC
Already fixed in bug #257179 (Not released yet). But sandbox violations still occur due to bug #256834.
Comment 13 Tomáš Chvátal (RETIRED) gentoo-dev 2009-02-05 13:23:36 UTC
*** Bug 257648 has been marked as a duplicate of this bug. ***
Comment 14 SpanKY gentoo-dev 2009-02-07 11:45:48 UTC
Comment on attachment 180991 [details, diff]
sandbox-1.3.3-backtrace-seg.patch

already been fixed ... but not the real issue with this bug
Comment 15 SpanKY gentoo-dev 2009-02-07 11:47:22 UTC
re-emerge python and see if things work
Comment 16 Serkan Kaba (RETIRED) gentoo-dev 2009-05-25 10:15:14 UTC
These issues are ignored by sandbox for. Please reopen if the issue persists.