Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382827 - sys-apps/portage-2.1.10.11 crashes with confusing error when out of memory: TypeError: an integer is required
Summary: sys-apps/portage-2.1.10.11 crashes with confusing error when out of memory: T...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-13 13:23 UTC by Enno Gröper
Modified: 2011-09-14 13:56 UTC (History)
1 user (show)

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


Attachments
archive of temp directory in /var/tmp/portage/app-arch/xz-utils-5.0.3/ (xz-utils-temp.tar.bz2,22.75 KB, application/bzip2)
2011-09-13 13:23 UTC, Enno Gröper
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Enno Gröper 2011-09-13 13:23:46 UTC
Created attachment 286343 [details]
archive of temp directory in /var/tmp/portage/app-arch/xz-utils-5.0.3/

I upgraded portage, as recommended.
After that I wanted to update the rest of my tree and portage fails on the first package: app-arch/xz-utils-5.0.3

Error:
libtool: compile:  i686-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../src/liblzma/api -I../../src/liblzma/common -I../../src/liblzma/check -I../../src/liblzma/lz -I../../src/liblzma/rangecoder -I../../src/liblzma/lzma -I../../src/liblzma/delta -I../../src/liblzma/simple -I../../src/common -DTUKLIB_SYMBOL_PREFIX=lzma_ -pthread -fvisibility=hidden -Wall -Wextra -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -O2 -march=i686 -pipe -MT liblzma_la-tuklib_physmem.lo -MD -MP -MF .deps/liblzma_la-tuklib_physmem.Tpo -c ../../src/common/tuklib_physmem.c  -fPIC -DPIC -o .libs/liblzma_la-tuklib_physmem.o
Traceback (most recent call last):
  File "/usr/bin/emerge", line 43, in <module>
    retval = emerge_main()
  File "/usr/lib/portage/pym/_emerge/main.py", line 1906, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 437, in action_build
    retval = mergetask.merge()
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 1073, in merge
    rval = self._merge()
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 1425, in _merge
    self._main_loop_cleanup()
  File "/usr/lib/portage/pym/_emerge/Scheduler.py", line 1441, in _main_loop_cleanup
    self._task_queues.fetch.clear()
  File "/usr/lib/portage/pym/_emerge/SequentialTaskQueue.py", line 79, in clear
    task.cancel()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 56, in cancel
    self.wait()
  File "/usr/lib/portage/pym/_emerge/AsynchronousTask.py", line 45, in wait
    self._wait()
  File "/usr/lib/portage/pym/_emerge/SubProcess.py", line 67, in _wait
    os.kill(self.pid, signal.SIGKILL)
  File "/usr/lib/portage/pym/portage/__init__.py", line 215, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
TypeError: an integer is required



emerge --info
Portage 2.1.10.11 (default/linux/x86/10.0, gcc-4.4.5, glibc-2.12.2-r0, 2.6.36-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.36-gentoo-r5-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3800+-with-gentoo-2.0.2
Timestamp of tree: Tue, 13 Sep 2011 09:00:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.5.4-r3, 2.6.6-r2, 2.7.1-r1, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.25-r2
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.2-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.65-r1
sys-devel/automake:       1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.3.4, 4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.2.10
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo vdr-testing vdr-devel sunrise x-OverlayEnno
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/lib/redmine/config"
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.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /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 /var/lib/redmine/config/locales /var/lib/redmine/config/settings.yml"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j3"
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/layman/vdr-testing /usr/local/portage/layman/vdr-devel /usr/local/portage/layman/sunrise /usr/local/portage/layman/OverlayEnno"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl bash-completion berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 mmx modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline session ssl sysfs tcpd unicode vim-syntax x86 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 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 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

When searching for logs I found /var/tmp/portage/app-arch/xz-utils-5.0.3/temp/logging/compile, which shows an compile error (emake failed), which isn't shown to me (due to portage crash).
I appended the full temp directory as I don't know which logs are useful in this case.
Comment 1 Enno Gröper 2011-09-13 13:26:52 UTC
I have to add, that app-admin/logrotate-3.8.0 builds fine. So it's not a problem with _all_ ebuilds. Perhaps this only happens on compile errors?
Comment 2 Rafał Mużyło 2011-09-13 13:39:12 UTC
Well, the buildlog attached doesn't seem to have any errors.

So it seems it's in part a problem with portage.

But chances are the original reason is that you're running out of memory.
Comment 3 Enno Gröper 2011-09-13 17:42:55 UTC
You are absolutly right, sorry.
My machine ran out of memory, which I didn't notice.
Now it runs without problems.
The question is, if there is a possibility to generate a better error message.
Therefore I will leave this open.
Feel free to resolve it as invalid, if you don't see the need for a better error message here.
Comment 4 Zac Medico gentoo-dev 2011-09-13 18:08:46 UTC
It seems like os.fork() returned a non-integer, but it's supposed to always return an integer, and raise an ENOMEM OSError if it fails.

I'm curious which version of python this happened with. Please post the output of these commands:

   eselect python list
   head -n 1 /usr/bin/emerge
Comment 5 Enno Gröper 2011-09-14 08:09:17 UTC
eselect python list
Available Python interpreters:
  [1]   python2.5
  [2]   python2.6
  [3]   python2.7 *
  [4]   python3.1

head -n 1 /usr/bin/emerge
#!/usr/bin/python