Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
python MemoryError on emerge, profile 13 forcing x11 package
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
-neX-
n00b
n00b


Joined: 29 Apr 2005
Posts: 45

PostPosted: Sun Mar 17, 2013 8:26 pm    Post subject: python MemoryError on emerge, profile 13 forcing x11 package Reply with quote

Since updating my profile to default/linux/x86/13.0, I've had nothing but problems with emerge/python and doing upgrades. Sometimes emerge works, and other (read:most) times it exits with the below error.

Code:
# emerge -pv --update --deep world
... done!
Traceback (most recent call last):
  File "/usr/bin/emerge", line 65, in <module>
    tb_str = traceback.format_exc()
  File "/usr/lib/python2.7/traceback.py", line 241, in format_exc
    return ''.join(format_exception(etype, value, tb, limit))
  File "/usr/lib/python2.7/traceback.py", line 141, in format_exception
    list = list + format_tb(tb, limit)
  File "/usr/lib/python2.7/traceback.py", line 76, in format_tb
    return format_list(extract_tb(tb, limit))
  File "/usr/lib/python2.7/traceback.py", line 101, in extract_tb
    line = linecache.getline(filename, lineno, f.f_globals)
  File "/usr/lib/python2.7/linecache.py", line 14, in getline
    lines = getlines(filename, module_globals)
  File "/usr/lib/python2.7/linecache.py", line 40, in getlines
    return updatecache(filename, module_globals)
  File "/usr/lib/python2.7/linecache.py", line 128, in updatecache
    lines = fp.readlines()
MemoryError
[Errno 12] Cannot allocate memory: '/proc/24517/fd':
   /bin/bash -c echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"
Traceback (most recent call last):
  File "/usr/lib/portage/pym/portage/process.py", line 271, in spawn
    env, gid, groups, uid, umask, pre_exec, close_fds)
  File "/usr/lib/portage/pym/portage/process.py", line 402, in _exec
    _setup_pipes(fd_pipes, close_fds=close_fds)
  File "/usr/lib/portage/pym/portage/process.py", line 498, in _setup_pipes
    for fd in get_open_fds():
  File "/usr/lib/portage/pym/portage/process.py", line 35, in get_open_fds
    return


Getting emerge/portage working properly again seems to be the best way to start. The error output does sometimes differ, but in all cases includes some variation on Error 12 Cannot allocate memory: '/proc/24517/fd' (the number after /proc is a PID, correct?). This is a "low memory VPS", 256M of mem with 512M burstable and there is ample disk space to run various operations.

I've tried a few things so far:
* Simple reboot (http://forum.dee.su/topic/oserror-errno-12-cannot-allocate-memory)
* rebuilt python and ran python-updater, updated 4 pkgs, no change
* https://forums.gentoo.org/viewtopic-t-563178-highlight-memoryerror.html
* set python to 2.6, 3.1, 3.2 (from 2.7); no change
* noticed that gcc-config was not set to latest, ran gcc-config 4; fix_libtool_files.sh $(gcc-config -c) to set things right, didnt seem to impact
* adjusted a few compiler related things in make.conf, no change
* re-linked /etc/make.profile to 10.O/server, emerged portage but still getting MemoryError

I'm also running out of memory trying to compile larger packages like dev-lang/php. The only package, up until now, that I have had problems compiling was gcc and glibc. In those cases, I would emerge a binpkg.

My secondary problem is that since updating from profile 10.0/server to profile 13.0 (default), portage is forcing me to install all sorts of X11/Xorg related packages. I would provide a list, but the above MemoryError is preventing me from outputting a proper list. :-\

I'm currently running with my profile linked to the old 10.0/server.

emerge --info
Code:
Portage 2.1.11.52 (default/linux/x86/13.0, gcc-4.5.3, glibc-2.15-r3, 2.6.32-17-pve i686)
=================================================================
System uname: Linux-2.6.32-17-pve-i686-Intel-R-_Xeon-R-_CPU_X3220_@_2.40GHz-with-gentoo-2.1
KiB Mem:  4294967292 total,4294056636 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Sun, 17 Mar 2013 17:00:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.6-r1, 2.7.3-r2, 3.1.3-r1, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.69
sys-devel/automake:       1.10.1, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.1.2, 4.3.6-r1, 4.4.5, 4.5.3-r2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O0 -march=i686 --param ggc-min-expand=0 --param ggc-min-heapsize=8192"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /sbin/rc /usr/share/gnupg/qualified.txt"
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.2/ext-active/ /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.2/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.2/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"
CXXFLAGS="-O2 -march=i686"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://mirrors.tera-byte.com/pub/gentoo http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
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=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="\ acl aim apache bash-completion bzip2 caps cli cracklib crypt curl curlwrappers cxx dri fortran ftp gd gdbm gpm iconv icq imap ipv6 irc jpeg modules msn mudflap mysql ncurses nls nptl nptlonly openmp pam pcre php png posix postfix readline sasl session sftplogging snmp sockets sqlite ssl tcpd unicode vim-syntax x86 xml 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" 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 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" 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" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23584

PostPosted: Sun Mar 17, 2013 10:15 pm    Post subject: Reply with quote

Running a tiny memory VPS with no swap sounds like a recipe for problems. I assume you do not want to add memory to the machine, so I suggest you enable swap.
Back to top
View user's profile Send private message
-neX-
n00b
n00b


Joined: 29 Apr 2005
Posts: 45

PostPosted: Mon Mar 18, 2013 1:13 am    Post subject: Reply with quote

My host, for whatever reason, does not enable swap for the VM's. I actually did try adding a swap file (it was worth a try) this afternoon, but the system will not allow it. Since they seem to be incredibly slow at answering tickets, I'm actually considering moving my server over to another VM provider that does set swap up.

Its incredibly frustrating.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23584

PostPosted: Mon Mar 18, 2013 3:31 am    Post subject: Reply with quote

I think you will continue to experience frustration trying to operate modern Gentoo on that machine if you cannot add either RAM or swap.
Back to top
View user's profile Send private message
-neX-
n00b
n00b


Joined: 29 Apr 2005
Posts: 45

PostPosted: Mon Mar 18, 2013 2:24 pm    Post subject: Reply with quote

Hu wrote:
I think you will continue to experience frustration trying to operate modern Gentoo on that machine if you cannot add either RAM or swap.


Yep. I'm tired of it. I did a world build on a new provider overnight last night.
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