INN commit: branches/2.5 (doc/pod/news.pod innd/chan.c)
INN Commit
rra at isc.org
Mon May 20 16:34:54 UTC 2013
Date: Monday, May 20, 2013 @ 09:34:54
Author: iulius
Revision: 9470
fixed the occurrence of an unexpected "cant select" error generated by innd
errno was not preserved; the status hook was stuck between the select and
the check of its return status, so we're getting a spurious EPERM from
STATUSsummary, probably from some random glibc internal syscall involved
in fopen() that isn't actually important.
It only happens twice since it can only happen when select is interrupted
by a signal (triggering EINTR, which then gets overwritten with EPERM),
which is probably due to child processes completing, which is probably
only happening during specific events on your server during expire.
The solution is to rewrite this code to the order that it should have been
written in the first place.
Thanks to Paul Tomblin for having caught that long-standing issue.
Modified:
branches/2.5/doc/pod/news.pod
branches/2.5/innd/chan.c
------------------+
doc/pod/news.pod | 6 ++++++
innd/chan.c | 13 +++++++------
2 files changed, 13 insertions(+), 6 deletions(-)
Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod 2013-05-20 16:33:26 UTC (rev 9469)
+++ doc/pod/news.pod 2013-05-20 16:34:54 UTC (rev 9470)
@@ -10,6 +10,12 @@
which is in particular the command invoked by B<scanlogs> to rotate
log files.
+=item *
+
+Fixed the occurrence of an unexpected C<cant select> error generated by
+B<innd>. Thanks to Paul Tomblin for having caught that long-standing
+issue.
+
=back
=head1 Changes in 2.5.3
Modified: innd/chan.c
===================================================================
--- innd/chan.c 2013-05-20 16:33:26 UTC (rev 9469)
+++ innd/chan.c 2013-05-20 16:34:54 UTC (rev 9470)
@@ -1168,21 +1168,22 @@
count = select(channels.max_fd + 1, &rdfds, &wrfds, NULL, &tv);
TMRstop(TMR_IDLE);
- STATUSmainloophook();
- if (GotTerminate) {
- warn("%s exiting due to signal", LogName);
- CleanupAndExit(0, NULL);
- }
if (count < 0) {
if (errno != EINTR) {
syswarn("%s cant select", LogName);
#ifdef INND_FIND_BAD_FDS
CHANdiagnose();
-#endif
+#endif
}
continue;
}
+ STATUSmainloophook();
+ if (GotTerminate) {
+ warn("%s exiting due to signal", LogName);
+ CleanupAndExit(0, NULL);
+ }
+
/* Update the "reasonably accurate" time. */
gettimeofday(&Now, NULL);
if (Now.tv_sec > last_sync + TimeOut.tv_sec) {
More information about the inn-committers
mailing list