View previous topic :: View next topic |
Author |
Message |
as.gentoo Guru
Joined: 07 Aug 2004 Posts: 319
|
Posted: Fri Dec 11, 2009 1:27 am Post subject: xmalloccannot allocate 8bytes/Can't dlopen libc: outofmemory |
|
|
Hi,
I rented a vServer w/ maximum 512MB & min 256MB RAM. For a while I was able to compile what I wanted to. Whatever I try to emerge now - with exception of portage - I get libsandbox: Can't dlopen libc: out of memory. Shouldn't be 512MB enough to emerge grep or wget?
When emerging worked I emerged ccache, but I disabled it in make.conf in order to fix the problem - as well I set MAKEOPTS="-j1" but both did not help!
#FEATURES ="ccache stricter test"
FEATURES ="stricter test"
#CCACHE_SIZE ="2G"
#CCACHE_DIR ="/var/tmp/ccache"
I switched from a "normal" profile to hardened. Is it possible that PIE/PIC causes trouble if the memory is too low?
There is nothing special running jet:
PID TTY STAT TIME COMMAND
1 ? Ss 0:01 init [3]
1868 ? Ss 0:03 /usr/sbin/sshd
15475 pts/2 R+ 0:00 ps ax
17027 ? Ss 0:00 sshd: x [priv]
17030 ? S 0:00 sshd: x@pts/0
17031 pts/0 Ss 0:00 -bash
17038 pts/0 S 0:00 su
17039 pts/0 S+ 0:00 bash
20126 ? Ss 0:00 sshd: x [priv]
21516 ? S 0:00 sshd: x@pts/2
21522 pts/2 Ss 0:00 -bash
~ $ meminfo
MemTotal: 524288 kB
MemFree: 508756 kB
Buffers: 0 kB
Cached: 0 kB
SwapCached: 0 kB
Active: 0 kB
Inactive: 0 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 524288 kB
LowFree: 508756 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 0 kB
Mapped: 0 kB
Slab: 0 kB
SReclaimable: 0 kB
SUnreclaim: 0 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 0 kB
Committed_AS: 0 kB
VmallocTotal: 0 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
Filesystem Size Used Avail Use% Mounted on
simfs 20G 3.2G 17G 16% /
udev 10M 44K 10M 1% /dev
Filename Type Size Used Priority
partition 2634552 0 -1
Portage 2.1.6.13 (hardened/linux/x86/10.0/server, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.26.8 i686)
=================================================================
System uname: Linux-2.6.26.8-i686-AMD_Athlon-tm-_II_X4_620_Processor-with-gentoo-1.12.13
Timestamp of tree: Fri, 11 Dec 2009 00:15:01 +0000
ccache version 2.4 [disabled]
app-shells/bash: 4.0_p35
dev-lang/python: 2.6.2-r1
dev-util/ccache: 2.4-r7
sys-apps/baselayout: 1.12.13
sys-apps/sandbox: 1.6-r2
sys-devel/autoconf: 2.13, 2.63-r1
sys-devel/automake: 1.10.2
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.2.6a
virtual/os-headers: 2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i486-pc-linux-gnu"
CONFIG_PROTECT="/etc /sbin/rc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CPPFLAGS="-O2 -mtune=i686 -pipe"
CXXFLAGS="-march=i686 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict stricter test unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j1"
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"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 3dnowprefetch boundschecking bzip2 cli cracklib crypt cxx gdbm gnutls gpm hardened hpn iconv ithreads lzma md5sum mem-scramble memlimit mmx mmxext modules mudflap nls nptl nptlonly openmp pcre pic pth pthreads reflection session smp snmp spl sse sse2 sse4a ssl sysfs tcpd test threads threadsafe unicode urandom x86 xml zlib" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LINGUAS="de" USERLAND="GNU"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Please help!
Last edited by as.gentoo on Fri Dec 11, 2009 10:01 am; edited 1 time in total |
|
Back to top |
|
|
cach0rr0 Bodhisattva
Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Fri Dec 11, 2009 2:42 am Post subject: |
|
|
try taking -pipe out of your CFLAGS and CXXFLAGS
will be a slower build but use less memory _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
|
as.gentoo Guru
Joined: 07 Aug 2004 Posts: 319
|
Posted: Fri Dec 11, 2009 2:52 am Post subject: |
|
|
That did not help.
I guess there is something fundamentally wrong:
Code: | # FEATURES="-sandbox" emerge -1v file
[...]config.status: creating config.h
config.status: executing depfiles commands
make -j1
sh: xmalloc: shell.c:1582: cannot allocate 8 bytes (0 bytes allocated)
make: *** [config.h] Error 2 |
Did I do something wrong here?
lrwxrwxrwx 1 root root 45 Dec 8 17:03 make.conf.example -> ../usr/share/portage/config/make.conf.example
lrwxrwxrwx 1 root root 40 Dec 11 03:10 make.globals -> ../usr/share/portage/config/make.globals
lrwxrwxrwx 1 root root 54 Dec 8 18:02 make.profile -> ../usr/portage/profiles/hardened/linux/x86/10.0/server
# eselect profile list
Available profile symlink targets:
[1] default/linux/x86/10.0
[2] default/linux/x86/10.0/desktop
[3] default/linux/x86/10.0/developer
[4] default/linux/x86/10.0/server
[5] hardened/linux/x86/10.0
[6] selinux/2007.0/x86
[7] selinux/2007.0/x86/hardened
[8] selinux/v2refpolicy/x86
[9] selinux/v2refpolicy/x86/desktop
[10] selinux/v2refpolicy/x86/developer
[11] selinux/v2refpolicy/x86/hardened
[12] selinux/v2refpolicy/x86/server
#
I did what's written here: http://www.gentoo.org/proj/en/hardened/hardenedfaq.xml#hardenedprofile but - who knows - maybe in this special case that wasn't good? |
|
Back to top |
|
|
|
|
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
|
|