Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 531044 - sys-devel/crossdev: multiple repos.conf at same priority level incorrectly handled (leading to infinite loop in multilib_env when multilib.eclass not found)
Summary: sys-devel/crossdev: multiple repos.conf at same priority level incorrectly ha...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-28 21:06 UTC by Ulrar
Modified: 2016-06-02 15:57 UTC (History)
1 user (show)

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


Attachments
output of emerge --info (emerge.info.gz,2.89 KB, application/gzip)
2015-01-24 16:15 UTC, simon
Details
screenshot of crossdev invocation and mate system monitor with ram slowly filled up (Screenshot.png,139.66 KB, image/png)
2015-01-24 16:25 UTC, simon
Details
output of emerge --info (emerge-info,6.47 KB, text/plain)
2016-06-01 22:22 UTC, Samuel Loewen
Details
output of crossdev -x -t i686-pc-linux-gnu --stable (crossdev-forkbomb-log,36.76 KB, text/plain)
2016-06-01 22:28 UTC, Samuel Loewen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrar 2014-11-28 21:06:15 UTC
Hi,

Just installed crossdev 20140917, which is the lastest stable atm.
When I use this command :
crossdev --ov-output local  -S -t armv6j-hardfloat-linux-gnueabi

it forks hundreds and hundreds of times in a few seconds, and when all my ram and swap is full the computer is just unusable and nothing moves, of course.
After adding set -x at the begining of the script I see that it does that over and over : 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++unset
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++unset DEFAULT_ABI
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[[ '' == \d\e\f\a\u\l\t ]]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++single_abi=false
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++multilib_env
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++local var=
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++CTARGET=
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++unset
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++unset DEFAULT_ABI
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[[ '' == \d\e\f\a\u\l\t ]]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++single_abi=false
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++multilib_env
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++local var=
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++CTARGET=

I'm guessing it calls multilib_env over and over at line 722, as the comment says "# parse multilib settings until profiles are sane"
Comment 1 Ulrar 2014-11-28 21:07:38 UTC
I should add that I get obviously no output from the command, and nothing at all in the emerge.log. It just keeps spawning bash processes running crossdev, nothing else.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-28 21:09:18 UTC
Please post your `(cross-)emerge --info' output in a comment.
Comment 3 Ulrar 2014-11-28 21:11:07 UTC
Portage 2.3.5-r8 (default/linux/amd64/13.0, gcc-4.8.3, glibc-2.17, 3.12.13-gentoo x86_64)
=================================================================
System uname: Linux-3.12.13-gentoo-x86_64-Intel-R-_Core-TM-_i5-2540M_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:     3998492 total,   2599980 free
KiB Swap:    3145724 total,   2786128 free
Timestamp of tree: Unknown
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/perl:            5.16.3
dev-lang/python:          2.7.5-r3, 3.3.5-r1
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1, 4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo steam-overlay Armageddon vfrd funtoo-overlay local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/steam /var/lib/layman/Armageddon /var/lib/layman/vfrd /var/lib/layman/funtoo-overlay /usr/local/portage"
SYNC="git://github.com/funtoo/ports-2012.git"
SYNC_USER="root"
USE="256-color X acl alac alsa amd64 berkdb bindist bzip2 cdr cli consolekit cracklib crypt cxx dbus dri dvd dvdr dvdread emacs embedded encode fading-colors flac fortran gdbm geoclue gif gudev highlight hscolour iconv iproute2 ipv6 jpeg jpg lame libkms libnotify mad mmx modules mp3 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pcre perl pixbuf png policykit pppd python qt3support readline sdl session sip sipim sse sse2 sse3 ssl steamfonts subversion tcpd theora threads tiff truetype udev unicode unicode3 video vorbis wav wavpack webkit win32codecs xa xft xinerama xml xorg zlib zsh-completion" ABI_X86="64" 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" 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 author" 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 ublox 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" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="radeon modesetting fbdev fglrx r600" 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"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, SYNC_UMASK
Comment 4 Ulrar 2014-11-28 21:12:51 UTC
and for cross-emerge --info :
cross-emerge: CHOST is not set properly

Is that the actual problem ?
Comment 5 simon 2015-01-24 16:13:19 UTC
Same issue here.

crossdev version is 20141030 on x86_64. (fresh install).

Overlay directory is /usr/local/crossdev.
repo_name of this overlay is 'altruist'.
Invocation of crossdev was 'crossdev -t i686 -oO altruist' or even 'crossdev -t i686 -oO altruist --init-target'.

Symptoms are as Ulrar described them: crossdev spawns into an endless number of crossdev processes which can be seen with 'ps -e', the whole process can't be interrupted (nor by typing Ctrl + C, nor or by killing one of the crossdev processes), memory is filled up, swap is filled up, and finally the system locks or crashes.

This is very annoying!

emerge --info is supplied in the next comment.
cross-emerge --info is the same as Ulrar's.
Comment 6 simon 2015-01-24 16:15:00 UTC
Created attachment 394770 [details]
output of emerge --info

attached output of emerge --info
Comment 7 simon 2015-01-24 16:25:18 UTC
Created attachment 394776 [details]
screenshot of crossdev invocation and mate system monitor with ram slowly filled up

Maybe the 'Invalid atom ...' message is of any use.
Comment 8 SpanKY gentoo-dev 2015-02-15 05:17:21 UTC
Comment on attachment 394776 [details]
screenshot of crossdev invocation and mate system monitor with ram slowly filled up

ugh, please post a real log:
  crossdev -x ...options you want to use... >& log

then attach that log file here for us to review
Comment 9 Samuel Loewen 2016-06-01 22:21:48 UTC
I am experiencing this bug as well. I will attach the output of `emerge --info` and `crossdev -x -t i686-pc-linux-gnu --stable`.

cross-emerge --info output:
    cross-emerge: CHOST is not set properly

crossdev -V output: 
    crossdev-20150716

The function multilib_env at line 735 of /usr/bin/crossdev will ALWAYS infinitely recurse. multilib_env calls itself at line 760. The recursive call is not inside a conditional block, and there is no return or exit before the recursive call.
Comment 10 Samuel Loewen 2016-06-01 22:22:29 UTC
Created attachment 436102 [details]
output of emerge --info
Comment 11 Samuel Loewen 2016-06-01 22:28:23 UTC
Created attachment 436104 [details]
output of crossdev -x -t i686-pc-linux-gnu --stable

File edited to decrease size.
Comment 12 SpanKY gentoo-dev 2016-06-02 05:11:05 UTC
(In reply to Samuel Loewen from comment #9)

not exactly.  once multilib.eclass is located & loaded, multilib_env will be redefined to be that one.  the name collision there wasn't really intentional.

the underlying problem is that the repos.conf parsing doesn't handle more than one repo at the same priority level.  yours sets up a bunch at prio=50.
Comment 13 SpanKY gentoo-dev 2016-06-02 15:57:50 UTC
thanks for the log ... that helped track things down much quicker

should be fixed by these two commits:
https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=b613790793b46ccc596e1dc28163ea865d508b65
https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=0bdbb5fb2d15cd433a8a7d0176ae3c5a3a957373