Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 412191 - sys-kernel/gentoo-sources - OSError: [Errno 12] Cannot allocate memory: '/usr/src/linux-3.2.12-gentoo/arch/xtensa/kernel/vmlinux.lds.S'
Summary: sys-kernel/gentoo-sources - OSError: [Errno 12] Cannot allocate memory: '/usr...
Status: RESOLVED DUPLICATE of bug 346749
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-16 09:41 UTC by Semen Panevin
Modified: 2012-04-17 15:39 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 Semen Panevin 2012-04-16 09:41:40 UTC
When I'm trying to update gentoo-sources after emerge --sync (i.e. using emerge -uDN world or emerge gentoo-sources) I get an error like this:

-----------
Traceback (most recent call last):
  File "/usr/lib/portage/pym/portage/dbapi/_MergeProcess.py", line 216, in _spawn
    prev_mtimes=self.prev_mtimes, counter=counter)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4526, in merge
    counter=counter)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 3825, in treewalk
    rval = self._merge_contents(srcroot, destroot, cfgfiledict)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4099, in _merge_contents
    self.settings["EPREFIX"].lstrip(os.sep), cfgfiledict, mymtime):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4396, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4396, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4396, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4396, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4396, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4396, in mergeme
    join(offset, x), cfgfiledict, thismtime):
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4209, in mergeme
    mydstat = os.lstat(mydest)
  File "/usr/lib/portage/pym/portage/__init__.py", line 230, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 12] Cannot allocate memory: '/usr/src/linux-3.2.12-gentoo/arch/xtensa/kernel/vmlinux.lds.S'

>>> Failed to install sys-kernel/gentoo-sources-3.2.12, Log file:

>>>  '/var/tmp/portage/sys-kernel/gentoo-sources-3.2.12/temp/build.log'
-----------

Error doesn't appear only right after reboot.

I have 2Gb memory and 2Gb of swap enabled, but only a little amount of swap is used by the system.

There is a "top" report right after trying to emerge gentoo-sources:

------------
top - 12:16:24 up 4 days,  2:04,  3 users,  load average: 0.82, 0.51, 0.43
Tasks: 129 total,   1 running, 127 sleeping,   0 stopped,   1 zombie
Cpu(s): 25.7%us,  4.9%sy,  0.0%ni, 64.5%id,  3.2%wa,  0.0%hi,  1.6%si,  0.0%st
Mem:   2072692k total,  1764184k used,   308508k free,   110784k buffers
Swap:  1959924k total,     3280k used,  1956644k free,  1382168k cached
------------

uname -a
Linux server 3.2.1-gentoo-r2 #8 Wed Apr 11 23:13:18 MSK 2012 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz GenuineIntel GNU/Linux

but it reproduces with other versions of kernels too.

emerge --info
Portage 2.1.10.49 (hardened/linux/x86, gcc-4.5.3, glibc-2.13-r4, 3.2.1-gentoo-r2 i686)
=================================================================
System uname: Linux-3.2.1-gentoo-r2-i686-Intel-R-_Pentium-R-_4_CPU_2.00GHz-with-gentoo-2.0.3
Timestamp of tree: Mon, 16 Apr 2012 04:15:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo husky qico-xe rntrack golded-plus semen_panevin
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /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"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org/ http://mirror.bih.net.ba/gentoo/ http://gentoo.kiev.ua/ftp/ http://gentoo.inf.elte.hu/ ftp://gentoo.kiev.ua/"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru"
MAKEOPTS="-j2"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/husky /var/lib/layman/qico-xe /var/lib/layman/rntrack /var/lib/layman/golded+ /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl apache2 berkdb bzip2 cli cracklib crypt cxx dri gdbm gnutls gpm hardened iconv ipv6 modules mudflap mysql ncurses nls nptl nptlonly openmp pam pax_kernel pcre perl pic pppd python readline session slang snmp ssl sysfs tcpd threads truetype unicode urandom vhosts x86 xinetd xml 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="access auth auth_dbm auth_anon auth_digest alias file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in deflate mime-magic cern-meta expires headers usertrack unique-id proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so auth_basic authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user cern_meta charset_lite dav_fs dav_lock dbd disk_cache dumpio ext_filter file_cache filter mem_cache mime_magic substitute unique_id version vhost_alias" APACHE2_MPMS="itk" 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" HUSKY_MODULES="areastat bsopack hpt hptkill hptsqfix hpucode htick nltools sqpack" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 intel mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa via vmware nouveau" 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, USE_PYTHON
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-04-16 18:23:16 UTC
How about we assume it isn't an actual memory problem, but a storage problem - is there enough disk space left? (If so, this still isn't a problem in sys-kernel/gentoo-sources, but we'd be getting somewhere.)
Comment 2 Semen Panevin 2012-04-16 18:32:26 UTC
There is about 120Gb free at / partition.

Filesystem      Size  Used Avail Use% Mounted on
rootfs          292G  158G  119G  58% /
/dev/root       292G  158G  119G  58% /
rc-svcdir       1.0M  160K  864K  16% /lib/rc/init.d
cgroup_root      10M     0   10M   0% /sys/fs/cgroup
udev             10M  184K  9.9M   2% /dev
none           1013M     0 1013M   0% /dev/shm
/dev/sda1       130M   42M   82M  34% /boot
Comment 3 Semen Panevin 2012-04-16 19:57:50 UTC
And I neither think it's a gentoo-sources problem. It should be something connected with python's memory management. But it is a problem because I use most of sources from a latest stable portage tree.
Comment 4 Semen Panevin 2012-04-16 21:19:27 UTC
After I did swapoff and swapon the kernel was emerged successfully (without reboot). But I'm sure it'll be happen again when the next update will be available...
Comment 5 Zac Medico gentoo-dev 2012-04-17 15:39:48 UTC

*** This bug has been marked as a duplicate of bug 346749 ***