From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96f077b5c22a57c4351a145e270037dd.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199710020232.UAA14194@ellpspace.math.ualberta.ca> Date: Wed, 1 Oct 1997 20:32:04 -0600 (MDT) From: Michal Jaegermann Subject: chown eats all available memory 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