Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerging sys-kernel/gentoo-sources-3.14.16 exhaust memory
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Thu Aug 14, 2014 4:57 pm    Post subject: emerging sys-kernel/gentoo-sources-3.14.16 exhaust memory Reply with quote

Hello,

I have a box having only 256M of memory and 512M swap.
I never had any issue to install a kernel ... until 3.14.16

Code:
>>> Installing (1 of 1) sys-kernel/gentoo-sources-3.14.16
Traceback (most recent call last):
  File "/usr/lib/portage/pym/portage/dbapi/_MergeProcess.py", line 234, in _spawn
    prev_mtimes=self.prev_mtimes, counter=counter)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4839, in merge
    counter=counter)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 4081, in treewalk
    self._linkmap_rebuild(include_file=needed)
  File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 2872, in _linkmap_rebuild
    self.vartree.dbapi._linkmap.rebuild(**kwargs)
  File "/usr/lib/portage/pym/portage/util/_dyn_libs/LinkageMapELF.py", line 241, in rebuild
    proc = subprocess.Popen(args, stdout=subprocess.PIPE)
  File "/usr/lib/python3.2/subprocess.py", line 745, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.2/subprocess.py", line 1197, in _execute_child
    restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Cannot allocate memory


As per "top", I can see it consume up to 400 Mb before failing ...

Code:
dell init.d # emerge --info
Portage 2.2.8-r1 (default/linux/x86/13.0/desktop, gcc-4.7.3, glibc-2.17, 3.14.14-gentoo i686)
=================================================================
System uname: Linux-3.14.14-gentoo-i686-Intel-R-_Pentium-R-_4_CPU_2.40GHz-with-gentoo-2.2
KiB Mem:      251140 total,    171072 free
KiB Swap:     498008 total,    483976 free
Timestamp of tree: Thu, 14 Aug 2014 10:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 i686-pc-linux-gnu [enabled]
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.7, 3.2.3-r2, 3.3.5-r1
dev-util/cmake:           2.8.12.2-r1
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.69
sys-devel/automake:       1.11.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.3"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles getbinpkg merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5 -l3.0"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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=""
SYNC="rsync://celeron.chez.moi/gentoo-portage"
USE="X a52 aac acl acpi alsa amr apng archive avahi bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups curl cxx dbus device-mapper dga dri dts dv dvd dvdr emboss encode exif faac fam fbcon ffmpeg firefox flac fontconfig fuse gd gdbm gif gimp gphoto2 gpm gtk gvfs hddtemp iconv ieee1394 imlib jpeg jpeg2k lcms ldap libcaca libnotify lm_sensors mad matroska mmx mng modules mp3 mp4 mpeg ncurses nls nptl nsplugin ogg oggvorbis opengl openmp pam pango pcre pdf png policykit postgres ppds python qt3support qt4 readline sdl session speex spell sqlite sse sse2 ssl startup-notification svg syslog tcpd theora threads tiff truetype udev udisks unicode upower usb vorbis win32codecs wxwidgets x264 x86 xcb xinerama xml xosd xv xvid zlib" ABI_X86="32" 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" APACHE2_MODULES="actions alias auth_basic auth_digest authn_file authz_default authz_groupfile authz_host authz_user autoindex cgi dav dav_fs dav_lock deflate dir env filter info log_config mime negotiation setenvif status unique_id userdir" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2 canon" 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 joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr en" 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="intel sis r128 vesa fbdev 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


Any tips ?

Thanks

Laurent
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Thu Aug 14, 2014 8:34 pm    Post subject: Reply with quote

You can try adding a swap file.
Code:

dd if=/dev/zero of=/some/where/swapfile bs=1024 count=500000
mkswap /some/where/swapfile
swapon /some/where/swapfile

will create 512Mb of additional swap.
Back to top
View user's profile Send private message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Fri Aug 15, 2014 9:36 am    Post subject: Reply with quote

Thanks Limn,

But why does it use so much memory ?
I did 3.14.16 compilation on a newly installed machine and it consume only 100 Mb, no more.

Differences are :
  • more application installed on this machine compared to the fresh one (LXDE, VLC, Firefox)
  • it was already under 3.14.14 where as the "new" one ran 2.x kernel from 3 or 4 year old install CD.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Fri Aug 15, 2014 7:41 pm    Post subject: Reply with quote

Your failure is in the merging of the source not compiling the kernel.
From a quick look at the code it may be that it is related to the number of packages installed.
Back to top
View user's profile Send private message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Wed Aug 20, 2014 9:00 pm    Post subject: Reply with quote

Hum, the content of my world file is :
Code:
app-admin/logrotate
app-admin/syslog-ng
app-editors/vim
app-portage/gentoolkit
app-portage/portage-utils
app-vim/vim-spell-en
app-vim/vim-spell-fr
dev-lang/lua
dev-libs/libgcrypt
dev-libs/mpc
dev-lua/luarocks
lxde-base/lxde-meta
media-fonts/corefonts
media-fonts/ttf-bitstream-vera
media-gfx/jpegoptim
net-dns/bind
net-misc/dhcp
net-misc/dhcpcd
net-misc/ntp
sys-apps/ethtool
sys-apps/portage
sys-apps/smartmontools

which isn't so heavy.

I ran emerge --depclean and revdep-rebuild, any way to clean deeply my system ?
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Sun Aug 24, 2014 3:27 pm    Post subject: Reply with quote

The world file is things you have emerged without --oneshot.
Code:
equery list '*' | wc -l

would give you a better idea of the number of installed packages.
emerge --depclean is the way to find unused packages for cleanup.
Kernel sources install many files. Perhaps it is related to the number of files installed.
Do you have any nstalled gentoo-sources you can unmerge?
Back to top
View user's profile Send private message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Tue Sep 02, 2014 7:54 pm    Post subject: Reply with quote

Thanks limn for your reply.

Code:
equery list '*' | wc -l
479


I don't have older sources to clean, but as it's one of my backup server for my own photos, it has 44537 photos/videos stored here but I don't think it mater, does it ?
Back to top
View user's profile Send private message
046
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 231
Location: Yaroslavl, Russia

PostPosted: Wed Sep 03, 2014 12:24 pm    Post subject: Reply with quote

This is python. use swap or no way.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum