Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* chown eats all available memory
@ 1997-10-02  2:32 Michal Jaegermann
  0 siblings, 0 replies; only message in thread
From: Michal Jaegermann @ 1997-10-02  2:32 UTC (permalink / 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-10-02  2:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-10-02  2:32 chown eats all available memory Michal Jaegermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox