Send inn-committers mailing list submissions to
        inn-committers@lists.isc.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/inn-committers
or, via email, send a message with subject or body 'help' to
        inn-committers-requ...@lists.isc.org

You can reach the person managing the list at
        inn-committers-ow...@lists.isc.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-committers digest..."


Today's Topics:

   1. INN commit: trunk (doc/pod/news.pod innd/chan.c) (INN Commit)
   2. INN commit: branches/2.5 (doc/pod/news.pod innd/chan.c)
      (INN Commit)


----------------------------------------------------------------------

Message: 1
Date: Mon, 20 May 2013 09:33:26 -0700 (PDT)
From: INN Commit <r...@isc.org>
To: inn-committ...@isc.org
Subject: INN commit: trunk (doc/pod/news.pod innd/chan.c)
Message-ID: <20130520163326.d4f1f67...@hope.eyrie.org>

    Date: Monday, May 20, 2013 @ 09:33:26
  Author: iulius
Revision: 9469

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:
  trunk/doc/pod/news.pod
  trunk/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-04-14 16:35:54 UTC (rev 9468)
+++ doc/pod/news.pod    2013-05-20 16:33:26 UTC (rev 9469)
@@ -129,6 +129,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-04-14 16:35:54 UTC (rev 9468)
+++ innd/chan.c 2013-05-20 16:33:26 UTC (rev 9469)
@@ -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) {



------------------------------

Message: 2
Date: Mon, 20 May 2013 09:34:54 -0700 (PDT)
From: INN Commit <r...@isc.org>
To: inn-committ...@isc.org
Subject: INN commit: branches/2.5 (doc/pod/news.pod innd/chan.c)
Message-ID: <20130520163454.e593067...@hope.eyrie.org>

    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) {



------------------------------

_______________________________________________
inn-committers mailing list
inn-committers@lists.isc.org
https://lists.isc.org/mailman/listinfo/inn-committers

End of inn-committers Digest, Vol 51, Issue 1
*********************************************

Reply via email to