[SunHELP] Not enough memory
Nicholas Dronen
sunhelp at sunhelp.org
Wed Oct 31 16:14:13 CST 2001
On Wed, Oct 31, 2001 at 01:33:54PM -0800, Ron Wickersham wrote:
> yesterday, an httpd server SS2 running 4.1.3 became unresponsive to anything
> but pings. i was logged in from the day before and could type but it
> answered with :Not enough memory. no new logins were allowed. if the
> machine were nearby i would have rebooted, but it is accross town. after
> 3 or 4 hours it began working again on its own. no entries appeared in
> the logs during the 'event' and nothing unusual was reported just prior or
> just after.
>
> the machine is still running fine today, but it still leaves me wondering
> what happened.
>
> -ron wickersham
>
> sundog# df
> /bin/df: Not enough memory
> sundog# ps
> /bin/ps: Not enough memory
> sundog# ls
> /bin/ls: Not enough memory
> sundog# pwd
> /bin/pwd: Not enough memory
> sundog# sync
> /bin/sync: Not enough memory
> sundog# reboot
> /etc/reboot: Not enough memory
In case you're wondering, the reason every command
returned this error (ENOMEM) is that the C run-time
code executes system calls under the covers before
your process starts to run. One of those system
calls, mmap(2), can fail if there's not enough memory
available, either in the process's address space or
in whole of the VM system.
The edited truss output below shows a bit of this.
$ truss -tmmap,open ls 2>&1 >/dev/null | grep -v ENOENT
# additional mmap (for descriptor -1?)
mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFF3B0000
# open and mmap mmap libc.so.1
open("/usr/lib/libc.so.1", O_RDONLY) = 3
mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF3A0000
mmap(0x00000000, 778240, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF280000
mmap(0xFF336000, 24464, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 679936) = 0xFF336000
# additional mmap (for descriptor -1?)
mmap(0xFF33C000, 6564, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFF33C000
# open and mmap libdl.so.1
open("/usr/lib/libdl.so.1", O_RDONLY) = 3
mmap(0xFF3A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3A0000
open("/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1", O_RDONLY) = 3 mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF390000
mmap(0x00000000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF380000
Regards,
Nicholas Dronen
More information about the SunHELP
mailing list