* [BUG] 5.0.0_beta1: infinite loop on read error
@ 2007-09-26 10:05 Denys Vlasenko
2007-09-26 15:12 ` Ian Kent
0 siblings, 1 reply; 2+ messages in thread
From: Denys Vlasenko @ 2007-09-26 10:05 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
Hi Ian,
I was using automount 4.1.4 for many years now, and I run it like this:
automount -f -s -v --timeout 15 /.local/mnt/auto program /root/bin/mapper.sh
This is a valid syntax for 4.1.4, but 5.0.0 doesn't like it, and it doesn't
error out cleanly too.
It goes into infinite loop, eating 100% CPU and killable only with SIGKILL.
As it turns out, it opens /.local/mnt/auto and reads it, and gets EISDIR,
and ... retries, retries, retries forever. Here:
modules/lookup_file.c
f = fopen(ctxt->mapname, "r");
...
master_init_scan();
while(1) {
entry = read_one(f, path, ent);
if (!entry) {
if (feof(f)) <===== doesnt check ferror()
break;
continue;
}
Please fix.
--
vda
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [BUG] 5.0.0_beta1: infinite loop on read error
2007-09-26 10:05 [BUG] 5.0.0_beta1: infinite loop on read error Denys Vlasenko
@ 2007-09-26 15:12 ` Ian Kent
0 siblings, 0 replies; 2+ messages in thread
From: Ian Kent @ 2007-09-26 15:12 UTC (permalink / raw)
To: Denys Vlasenko; +Cc: autofs
On Wed, 2007-09-26 at 11:05 +0100, Denys Vlasenko wrote:
> Hi Ian,
>
> I was using automount 4.1.4 for many years now, and I run it like this:
>
> automount -f -s -v --timeout 15 /.local/mnt/auto program /root/bin/mapper.sh
>
> This is a valid syntax for 4.1.4, but 5.0.0 doesn't like it, and it doesn't
> error out cleanly too.
>
> It goes into infinite loop, eating 100% CPU and killable only with SIGKILL.
> As it turns out, it opens /.local/mnt/auto and reads it, and gets EISDIR,
> and ... retries, retries, retries forever. Here:
Ooops, I'll fix that.
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-26 15:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26 10:05 [BUG] 5.0.0_beta1: infinite loop on read error Denys Vlasenko
2007-09-26 15:12 ` Ian Kent
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.