This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: glibc-2.3.4 .so on glibc-2.6.1 system = mmap error
- From: "Michael B Allen" <ioplex at gmail dot com>
- To: "Florian Weimer" <fw at deneb dot enyo dot de>
- Cc: libc-help at sourceware dot org
- Date: Tue, 29 Apr 2008 15:15:55 -0400
- Subject: Re: glibc-2.3.4 .so on glibc-2.6.1 system = mmap error
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=ER57oWmdteSSAs5AVitV+p02hIFM0AkgwzuyBo0VoB4=; b=WDtsO7MyK8MXj0VmvOl3GBmM/8AvuODMvRlW52FVi53YzaUM8KIkD0TXSJJyTb+6GhdGy4OMr01nky1AW4+RcUe6nowSyD0LWLUdp77bnXtH12X4s1b9EtGQckYvZZE4V/Faie+AOgESMu279220soz4tteFFzmm4NFov9ohjLY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=O7gjeJVfCNTzKiF5pMdmZLmUkqC5byhJQe3ZY1Gdb61/GxXhzL8F3ePoVIcoGVhV0ivBBDrxo7AHVktGpZJocTSDpK4RWlBJ9/w0pqsMLuWd/5mzNvLywV7cbPQeBt8z3HhNKYaunz4cbcURhRwnqh+aJw6j2yuFTipjt2G5ehQ=
- References: <78c6bd860804281736m1930ddc2t37f08f824ed4197f@mail.gmail.com> <878wywo8ze.fsf@mid.deneb.enyo.de>
On 4/29/08, Florian Weimer <fw@deneb.enyo.de> wrote:
> * Michael B. Allen:
>
>
> > Does anyone have any suggestions or diagnostics that might help
> > identify the problem?
>
>
> Can you show us some strace output, and the /proc/$PID/smaps file when
> the mmap call fails?
Hi Florian,
I have attached a tar.gz. The mmap call that is failing unexpectedly
is on line 1421 of the strace.txt output.
The smaps.txt was generated by calling cat /proc/PID/smaps through
system(3) immediately before the offending mmap call.
Here is a snipplet of strace.txt:
open("/var/lib/plexcel/plexcel.sga", O_RDWR) = 10
open("/var/lib/plexcel/plexcel.sga", O_RDONLY|O_CREAT, 0666) = 11
stat("/var/lib/plexcel/plexcel.sga", {st_mode=S_IFREG|0666,
st_size=2097152, ...}) = 0
semget(0x102c1bf, 1, 0) = -1 ENOENT (No such file or directory)
semget(0x102c1bf, 1, IPC_CREAT|IPC_EXCL|0666) = 1212416
semctl(1212416, 0, SETVAL, 0x7fff00000000) = 0
semop(1212416, 0x7fffed064950, 1) = 0
close(11) = 0
semtimedop(1212416, 0x7fffed064af0, 1, NULL) = 0
open("/var/lib/plexcel/plexcel.sga", O_RDWR) = 11
fstat(11, {st_mode=S_IFREG|0666, st_size=2097152, ...}) = 0
mmap(NULL, 544, PROT_READ|PROT_WRITE, MAP_SHARED, 11, 0) = 0x2b83c9dea000
close(11) = 0
msync(0x2b83c9dea000, 544, MS_ASYNC) = 0
munmap(0x2b83c9dea000, 544) = 0
ftruncate(10, 2097152) = 0
rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_PARENT_SETTID|SIGCHLD,
parent_tidptr=0x7fffed064678) = 5297
wait4(5297, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 5297
rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
write(9, "Apr 29 15:24:31 src/sga.c:219:sg"..., 79) = 79
mmap(NULL, 2097152, PROT_READ|PROT_WRITE, MAP_SHARED, 10, 0) = -1
ENOMEM (Cannot allocate memory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open("/proc/meminfo", O_RDONLY) = 11
fstat(11, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2b83c9fea000
read(11, "MemTotal: 123996 kB\nMemFre"..., 1024) = 725
close(11) = 0
munmap(0x2b83c9fea000, 4096) = 0
semctl(1212416, 0, IPC_RMID, 0x1) = 0
close(10) = 0
Mike