All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: Ian Kent <raven@themaw.net>
Cc: autofs@linux.kernel.org
Subject: [BUG] 5.0.0_beta1: infinite loop on read error
Date: Wed, 26 Sep 2007 11:05:14 +0100	[thread overview]
Message-ID: <200709261105.14333.vda.linux@googlemail.com> (raw)

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

             reply	other threads:[~2007-09-26 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-26 10:05 Denys Vlasenko [this message]
2007-09-26 15:12 ` [BUG] 5.0.0_beta1: infinite loop on read error Ian Kent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200709261105.14333.vda.linux@googlemail.com \
    --to=vda.linux@googlemail.com \
    --cc=autofs@linux.kernel.org \
    --cc=raven@themaw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.