[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] IPC client disconnect
From:       Alan Robertson <alanr () unix ! sh>
Date:       2004-11-15 15:56:11
Message-ID: 4198D19B.6010009 () unix ! sh
[Download RAW message or body]

Lars Marowsky-Bree wrote:
> On 2004-11-14T22:34:12, Andrew Beekhof <andrew@beekhof.net> wrote:
> 
> 
>>I found the source of all my " ERROR: socket_resume_io_write() failure" 
>>messages...
>>After a client disconnects, I'm getting EPIPE in 
>>socket_resume_io_write() when trying to send the header.  Then 
>>IPC_BROKEN is returned and socket_resume_io() spits out the error.  
>>Does this sound right to you?
> 
> 
> Uhm. Yes. Well, if the client disconnect, we expect to get an error on
> writes. That seems to make a lot of sense.
> 
> 
> 
>>heartbeat[26757]: 2004/11/14_22:21:08 debug: Signing client 26975 off
>>heartbeat[26757]: 2004/11/14_22:21:08 debug: G_remove_client(pid=26975, 
>>reason='signoff' gsource=0x11d3474) {
>>heartbeat[26757]: 2004/11/14_22:21:08 WARN: socket send returned EPIPE  
>><--- I added this
>>heartbeat[26757]: 2004/11/14_22:21:08 ERROR: socket_resume_io_write() 
>>failure
> 
> 
> Question is why do we try to send to a client after having signed it
> off?

Perhaps the code for preventing this is slightly askew.  Perhaps this patch 
might straighten it out...

--- ipcsocket.c 9 Oct 2004 01:49:42 -0000       1.100
+++ ipcsocket.c 15 Nov 2004 15:54:37 -0000
@@ -1237,7 +1237,7 @@
         do {
                 rc1 = socket_resume_io_read(ch, &rstarted, FALSE);
                 CHANAUDIT(ch);
-               if (ch->ch_status == IPC_DISC_PENDING) {
+               if (ch->ch_status != IPC_CONNECT) {
                         rc2 = IPC_OK;
                         wstarted = FALSE;
                 }else{

-- 
     Alan Robertson <alanr@unix.sh>

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic