From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
Subject: chown eats all available memory
Date: Wed, 1 Oct 1997 20:32:04 -0600 (MDT) [thread overview]
Message-ID: <96f077b5c22a57c4351a145e270037dd.axp-list@archive.invalid> (raw)
On a "vanilla" Red Hat 4.2 Alpha installation (libc-1.99.so - as
on an installation CD) I run into the following:
If /etc/group file contains a "long" line (in this particular
case the line in question was 519 characters long) then an
attempt to do 'chown 0.0 file', or any other user:group
specification, is causing an infinite loop.
An output from 'strace' looks like that:
..............
open("/etc/group", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=6686, ...}) = 0
mmap(0, 4831836656, PROT_WRITE|PROT_EXEC|0x1b0, 0 /* MAP_??? */, 2, 0) =
0x15555566000
read(4, "root::0:root\nbin::1:root,bin,da"..., 8192) = 6686
close(4) = 0
munmap(0x15555566000, 8192) = 0
open("/etc/group", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=6686, ...}) = 0
mmap(0, 4831836656, PROT_WRITE|PROT_EXEC|0x1b0, 0 /* MAP_??? */, 2, 0) =
0x15555566000
read(4, "root::0:root\nbin::1:root,bin,da"..., 8192) = 6686
read(4, "", 8192) = 0
close(4) = 0
munmap(0x15555566000, 8192) = 0
open("/etc/group", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=6686, ...}) = 0
mmap(0, 4831836656, PROT_WRITE|PROT_EXEC|0x1b0, 0 /* MAP_??? */, 2, 0) =
0x15555566000
read(4, "root::0:root\nbin::1:root,bin,da"..., 8192) = 6686
read(4, "", 8192) = 0
close(4) = 0
munmap(0x15555566000, 8192) = 0
................
and the same ab infinitum. This in turn seems to eat up the whole
available memory as the system reports "out of memory" for various
running processes and goes south. The same applies to 'id' and
probably any other program trying to use an information in /etc/group.
Deleting the "long" line in question restores sanity and chown, and id,
work again without any problems.
Does anybody know what is really going on here and what are remedies
if any?
Michal
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
reply other threads:[~1997-10-02 2:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox