fam
[Top] [All Lists]

[no subject]

From: owner-fam@xxxxxxxxxxx
Date: Thu, 29 Nov 2001 17:43:56 -0800
[199.183.24.200])
        by oss.sgi.com (8.11.2/8.11.3) with SMTP id fAU1RPo19336
        for <fam@xxxxxxxxxxx>; Thu, 29 Nov 2001 17:27:25 -0800
Received: from localhost (alexl@localhost)
        by devserv.devel.redhat.com (8.11.0/8.11.0) with ESMTP id fAU0RO015456
        for <fam@xxxxxxxxxxx>; Thu, 29 Nov 2001 19:27:24 -0500
X-Authentication-Warning: devserv.devel.redhat.com: alexl owned process doing
-bs
Date: Thu, 29 Nov 2001 19:27:23 -0500 (EST)
From: Alex Larsson <alexl@xxxxxxxxxx>
X-X-Sender:  <alexl@xxxxxxxxxxxxxxxxxxxxxxxx>
To: <fam@xxxxxxxxxxx>
Subject: [fam] Cheesy patch
Message-ID: <Pine.LNX.4.33.0111291922320.1672-100000@xxxxxxxxxxxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-fam@xxxxxxxxxxx
Precedence: bulk

There is a problem in the client library that makes it spew a lot of
errors. When canceling monitors, it doesn't wait for the ack before
continuing. This can cause sequences like:

cancel monitor 1
cancel monitor 2
close connection (just closes the pipe)

to give errors.

What happens here is that the client sends some cancel requests, and then
just closes the filedescriptor before the server gets to run. This makes
the server get EPIPE when trying to write the ack for the cancel requests.

I don't want to serialize cancels, as that is a huge performance hit.
Therefor i placed this cheesy patch in the new RedHat packages:

--- fam-2.6.6/fam/NetConnection.c++.epipe       Thu Nov 29 18:57:24 2001
+++ fam-2.6.6/fam/NetConnection.c++     Thu Nov 29 19:00:48 2001
@@ -252,7 +252,19 @@
                 assert(ret == omsgList->len);
             } else
             {
-                Log::error("fd %d write error: %m", fd);
+               /* Since the client library can close it's fd before
+                * getting acks from all FAMCancelMonitor requests we
+                * may get a broken pipe error here when writing the ack.
+                * Don't threat this as an error, since that fills the logs
+                * with crap.
+                */
+               if (errno == EPIPE)
+               {
+                   Log::debug("fd %d write error: %m", fd);
+               } else
+               {
+                   Log::error("fd %d write error: %m", fd);
+               }

             }
             msgList_t *oldHead = omsgList;

/ Alex

--
Source code, list archive, and docs: http://oss.sgi.com/projects/fam/
To unsubscribe: echo unsubscribe fam | mail majordomo@xxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • [no subject], owner-fam <=