Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444510 - app-portage/gentoolkit-0.3.0.7 with dev-python/pypy-1.8-r2 - Fatal RPython error: BytecodeCorruption
Summary: app-portage/gentoolkit-0.3.0.7 with dev-python/pypy-1.8-r2 - Fatal RPython er...
Status: RESOLVED CANTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-23 22:40 UTC by Ben Longbons
Modified: 2013-01-02 17:13 UTC (History)
3 users (show)

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


Attachments
build.log for app-portage/gentoolkit (build.log,26.47 KB, text/plain)
2012-11-23 22:40 UTC, Ben Longbons
Details
build.log with distutils_src_compile_pre_hook removed and pypy first in USE_PYTHON (build.log,2.87 KB, text/plain)
2012-12-19 06:43 UTC, Ben Longbons
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Longbons 2012-11-23 22:40:43 UTC
Created attachment 330372 [details]
build.log for app-portage/gentoolkit

Recently, I set USE_PYTHON="2.6 2.7 3.2 2.7-pypy-1.8 2.7-pypy-1.9"

app-portage/gentoolkit will succeed with 2.7-pypy-1.8 removed.

$ emerge -pqv app-portage/gentoolkit
[ebuild   R   ] app-portage/gentoolkit-0.3.0.7

(I finally figured out that having -v in EMERGE_DEFAULT_OPTS was causing me the bugzilla limit!)
$ emerge --info app-portage/gentoolkit
Portage 2.1.11.31 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.16.0, 3.5.4-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.5.4-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-gentoo-2.2
Timestamp of tree: Fri, 23 Nov 2012 10:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p39
dev-java/java-config:     2.1.12
dev-lang/python:          2.6.8, 2.7.3-r2, 3.2.3-r1, 3.3.0
dev-util/cmake:           2.8.10.1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.5
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.3.6-r1, 4.4.7, 4.5.4, 4.6.0, 4.6.1-r1, 4.6.2, 4.6.3, 4.7.0, 4.7.1, 4.7.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo o11c toolchain games gamerlay-stable qt sunrise
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native -ggdb -Wno-c++0x-compat "
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --quiet-build y --with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.osuosl.org/ ftp://ftp.wallawalla.edu/pub/mirrors/ftp.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --bwlimit=50"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/toolchain /var/lib/layman/games /var/lib/layman/gamerlay /var/lib/layman/qt /var/lib/layman/sunrise"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 avahi bash-completion berkdb bzip2 clang cli consolekit cracklib crypt cups cxx dbus dri ffmpeg flac gdbm gpm gtk hal hscolour iconv icu ipv6 jpeg kde midi mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nptl ogg opengl openmp pam pcre png pppd qt3support qt4 readline sdl session sql sse sse2 ssl svg tcpd threads tiff timidity truetype unicode usb vorbis webkit wxwidgets xinerama zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_6 python2_7 python3_2 pypy1_8 pypy1_9" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.6 2.7 3.2 2.7-pypy-1.8 2.7-pypy-1.9"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-portage/gentoolkit-0.3.0.7 was built with the following:
USE="(multilib)"
Comment 1 Zac Medico gentoo-dev 2012-11-25 00:37:29 UTC
Since it works fine with CPython 2.7, I guess it's an issue with pypy. I suppose that we could simply use RESTRICT_PYTHON_ABIS to blacklist the pypy version(s) that choke on it.
Comment 2 Brian Dolbec (RETIRED) gentoo-dev 2012-11-25 01:45:37 UTC
No, it's actually because the ebuild is running setup.py to modify the source, setting the version.  This should be done when creating the sdist tarball instead.
That way the .pyc file won't be created and confuse pypy.

DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES or 
DISTUTILS_IN_SOURCE_BUILD=1 in distutils-r1

can be used to prevent it in the current and -9999 ebuild.
Comment 3 Paul Varner (RETIRED) gentoo-dev 2012-12-11 12:12:50 UTC
I have run multiple tests with the following USE_PYTHON and cannot reproduce this issue.

USE_PYTHON="2.6 2.7 3.1 3.2 3.3 2.7-pypy-1.8 2.7-pypy-1.9"

What is your output of "emerge -pv pypy:1.8"

There are not any .pyc files created by running set_version, so I don't know how that can be causing the issue.
Comment 4 Ben Longbons 2012-12-16 06:47:18 UTC
$ emerge -pv pypy:1.8

[ebuild   R    ] dev-python/pypy-1.8-r1:1.8  USE="bzip2 doc jit ncurses ssl xml -examples -sandbox -shadowstack -sqlite" 14,578 kB

Total: 1 package (1 reinstall), Size of downloads: 14,578 kB

I also tried rebuilding gentoolkit so the issue hasn't just gone away for me.

I might try building -r2 of pypy now (which was released December 1, i.e. after I reported this) ... it's not a fun build (but it is doable) with 3GB RAM.

I wonder if there's any way you having 3.3 makes any difference?


(btw - school's out for a few weeks so I'll be more responsive on nonweekends now.)
Comment 5 Ben Longbons 2012-12-16 21:54:07 UTC
still happens with pypy-1.8-r2
Comment 6 Paul Varner (RETIRED) gentoo-dev 2012-12-19 04:45:58 UTC
I still cannot reproduce even after rebuilding pypy with the same CFLAGS and USE flags as yours.  However, let's prove or disprove the call to set_version.

Please edit the gentoolkit-0.3.0.7 ebuild and comment out or remove the 5 lines of the distutils_src_compile_pre_hook function, run repoman manifest and re-install gentoolkit. All that this will affect is that you won't see accurate version numbers with the various --version or --help options.

If it still fails, then I suspect that something is wrong with pypy-1.8 itself on your system.
Comment 7 Ben Longbons 2012-12-19 05:17:42 UTC
(In reply to comment #6)
> However, let's prove or disprove the call to set_version.

I tried that first, and then I also tried USE_PYTHON="2.7-pypy-1.8 2.7" so that it changed the order and tried to build with pypy first.

It still fails :(

> If it still fails, then I suspect that something is wrong with pypy-1.8
> itself on your system.

Ok, so now what? I already rebuilt pypy once ...
Comment 8 Paul Varner (RETIRED) gentoo-dev 2012-12-19 06:06:20 UTC
Can you attach the build.log of it failing with the distutils_src_compile_pre_hook function removed from the ebuild?
Comment 9 Paul Varner (RETIRED) gentoo-dev 2012-12-19 06:08:10 UTC
Also, which version of gcc are you using to compile pypy?
Comment 10 Ben Longbons 2012-12-19 06:41:27 UTC
(In reply to comment #9)
> Also, which version of gcc are you using to compile pypy?

My system gcc is:
gcc (Gentoo 4.6.3 p1.7, pie-0.5.2) 4.6.3

I have -march=native in CFLAGS, which on my system means:
-march=k8-sse3 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -mno-sse4.2 -mno-sse4.1 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=k8

(it was definitely an earlier gcc version at the time I compiled pypy-1.8-r1 on May 18, but I can't tell whether it was 4.6.x or not - I don't have the old pypy binary and that was before I had etckeeper)
Comment 11 Ben Longbons 2012-12-19 06:43:47 UTC
Created attachment 332698 [details]
build.log with distutils_src_compile_pre_hook removed and pypy first in USE_PYTHON
Comment 12 Paul Varner (RETIRED) gentoo-dev 2012-12-19 11:06:45 UTC
Nirbheek / python herd:

Any ideas on how to troubleshoot this further. I cannot reproduce this issue on my system with pypy-1.8 and gentoolkit-0.3.0.7
Comment 13 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-12-19 11:09:02 UTC
I think we should basically remove pypy-1.8.
Comment 14 Ben Longbons 2012-12-19 19:40:58 UTC
I talked to upstream pypy and they said they're not interested in pre-2.0 bugs that have already been fixed in later releases.

I don't have any particular reason to use 1.8; I just wanted to have more pythons to test my own software against.
Comment 15 Paul Varner (RETIRED) gentoo-dev 2013-01-02 17:13:07 UTC
dev-python/pypy-1.8 is being removed from the tree in about 30 days and I cannot reproduce this issue.