[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] Couple of oddities in leafnode-2.0b8_ma10pre2
Jari Lehtonen <jari@xxxxxx> writes:
> 1) fetchnews.lock.<pid> files accumulating in /var/lock/news directory. It
> seems that if fetchnews starts while either texpire or a previous fetchnews
> is still running, it creates a lock with pid in filename, finds an existing
> lock, and exits without removing the new lockfile.
That's a bug, which is triggered by a somewhat rude lock/timeout
handling in fetchnews. nntpd can create lock files which last only as
long as storing an article takes, and these are not supposed to prevent
fetchnews from running. OTOH, we don't want to wait too long for the
lock, so we use alarm(5) to set this timeout -- when this signal is
sent, the whole beast aborts, leaving that file behind. I put this issue
on my TODO list.
> An example:
> -rw------- 1 news news 25 Feb 3 04:07 fetchnews.lck.0000027028
> -rw------- 1 news news 25 Feb 3 04:37 fetchnews.lck.0000027031
> Time fits texpire being run, as it happens every morning at 04.00, and may
> take a couple of hours.
I see another difficulty, which eases races against mkstemp on MacOS X:
the mkstemp() file names are predictable. Of course, if anyone can write
to /var/lock/news, leafnodes service can be denied by a malicious
person -- but usually, only news may write to /var/lock/news, so
leafnode is unaffected here. Software that uses /tmp however is. Someone
should file a bug report with Apple.
> 2) fetchnews is unable to start if hostname is unknown. For me this happens
> if I boot my laptop at home, where I have DHCP but no DNS. I could,
> probably, use the hosts file (or netinfo table) to resolve hostname in this
> case, but I'd like to know if there's really a reason to signal that
> "internal error" in this case? 1.9.19 had no problems with hostname being
> Feb 21 23:37:01 localhost fetchnews: Internal error: must not try to
> lock with local host name "localhost"
I want to prevent two things:
1. bogus recovery from an assumedly stale lock file because of
"localhost" -- which is not a unique host name (the host name is
written into the lock file, try cat /var/lock/news/fetchnews.lck)
2. message-ids with "localhost" in them.
Leafnode should fail earlier, but it doesn't, the "internal error" is an
indicator that leafnode ran past the first check, which is a bug in
GPG encrypted mail welcome, unless it's unsolicited commercial email.
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list