Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 339138 - emerge --resume --jobs X runs with only 1 job
Summary: emerge --resume --jobs X runs with only 1 job
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 15:26 UTC by Jack
Modified: 2010-09-29 22:08 UTC (History)
0 users

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 Jack 2010-09-29 15:26:07 UTC
Resume seems to ignore the jobs flag whether it was originally specified or not. Is this a bug or by design? 

It makes it impossible to emerge with --empty-tree and multiple --jobs without starting from the beginning of the list. You may want to do this for example when rebuilding a system for a new CPU but you only want to rebuild any given package once.

Reproducible: Always

Steps to Reproduce:
1. emerge -ev -j6 system
2. emerge -j6 --resume

Actual Results:  
The jobs status line only ever reports 1 job running and top confirms it.

Expected Results:  
A parallel emerge using either the original jobs setting or optionally a new one passed in the resume invocation.

# emerge -V
Portage 2.1.9.12 (default/linux/amd64/10.0/desktop, gcc-4.4.4, glibc-2.12.1-r1, 2.6.35-gentoo-r6 x86_64)

*  app-portage/portage-utils
      Latest version available: 0.4

MAKEOPTS="-j4"
FEATURES="parallel-fetch"
ACCEPT_KEYWORDS="~amd64"
CFLAGS="-march=amdfam10 -O3 -pipe"
Comment 1 Jack 2010-09-29 15:29:11 UTC
# emerge --info
Portage 2.1.9.12 (default/linux/amd64/10.0/desktop, gcc-4.4.4, glibc-2.12.1-r1, 2.6.35-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.35-gentoo-r6-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.0.1
Timestamp of tree: Wed, 29 Sep 2010 11:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.67
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.3-r2, 4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /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"
CXXFLAGS="-march=amdfam10 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo ftp://ftp.swin.edu.au/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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 /var/lib/layman/Spring"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="64bit X a52 aac acl acpi alsa amd64 apache2 asf bash-completion berkdb binary-drivers bluetooth branding bzip2 cairo cdr cleartype cli consolekit corefonts cracklib crypt cups cxx dbus directfb dri dts dvd dvdr emboss encode exif extras faad fam fat ffmpeg flac fortran gd gdbm gif git glitz gnutls gpm gstreamer gtk hal hfs iconv ipv6 jpeg kde lame lcms libnotify mad matroska mikmod mmx mmxext mng modules mozcalendar mp3 mp4 mpeg mudflap multilib mysql ncurses net nls nptl nptlonly ntfs ogg openal opengl openmp pam pango pcre pdf perl php png postgres ppds pppd python qt3support qt4 readline reflection samba sdl server session sftp smp spell sql sse sse2 ssl startup-notification svg sysfs tcpd theora threads tiff tk truetype type1 udev unicode usb vorbis webkit wma x264 xcb xml xorg xv xvid 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="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 proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="radeon" 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, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Zac Medico gentoo-dev 2010-09-29 17:22:50 UTC
I emerge run emerge -p --resume --debug then you should see the correct --jobs setting, although a --jobs setting from EMERGE_DEFAULT_OPTS can override the --jobs setting from from the previous invocation (but that doesn't matter if you specify the --jobs setting again on the command line as you have done).

So, I think your complaint is really about the fixes for bug 259954 and bug 256616 which place certain safety limits on parallelization when system packages are involved. This issue is mentioned in the FAQ:

http://www.gentoo.org/proj/en/portage/doc/faq.xml
Comment 3 Jack 2010-09-29 19:10:48 UTC
(In reply to comment #2)
> I emerge run emerge -p --resume --debug then you should see the correct --jobs
> setting,...

I do.

> So, I think your complaint is really about the fixes for bug 259954 and bug
> 256616 which place certain safety limits on parallelization when system
> packages are involved. This issue is mentioned in the FAQ:
> 
> http://www.gentoo.org/proj/en/portage/doc/faq.xml
> 
That could be the case. I just tested resuming a world build (as opposed to system). And though it started with 1 job it did rise just before it broke (due it seems to libraries broken earlier, I'm running a revdep-rebuild to verify).

It does seem rather odd though that 'emerge -e -j8 system' was consistently running multiple jobs *before* the --resume. If these packages are really being protected I don't understand why the use of --resume appears to make this more aggressive. I can't rule out this being a coincidence of package ordering but I was watching it for several minutes and it really appeared pegged to a maximum of 1 job for a suspiciously large number of packages (20 - 30 I believe). Prior to --resume this was more like 1 out of 40 packages being restricted to --jobs 1. I'm fairly confident --resume is somehow responsible for this sudden change.

Another suspicion is the use of -j8 as apposed to --jobs 8. Could there be a failure to recognise the shorthand version of --jobs in --resume?

If resume does activate addition protections I'm kinda curious why.
Comment 4 Zac Medico gentoo-dev 2010-09-29 22:08:00 UTC
(In reply to comment #3)
> 1. I'm fairly confident --resume is somehow responsible for this sudden change.

If it really affects it then it would have to be due to some kind of difference in the dependency graph that's generated for the --resume operation. You can use emerge -p --resume --debug in order to generate some verbose output for the dependency calculation.

> Another suspicion is the use of -j8 as apposed to --jobs 8. Could there be a
> failure to recognise the shorthand version of --jobs in --resume?

That's very unlikely. You can use emerge -p --resume --debug to see the effective options that it's using.

> If resume does activate addition protections I'm kinda curious why.

Well, resume does automatically enable deep traversal of dependencies, so that could cause a difference if you didn't have --deep enabled in the initial invocation (--empty it equivalent to --deep in this regard).