Re: [Sofia-sip-devel] TCP UAS resource leak [win]

2009-04-29 Thread Arsen Chaloyan
 Is it leaking sockets?
Yes, at least netstat clearly shows it.


Does it help to use tport_shutdown0(self, tport_has_queued(self) ? 0 : 2); 
instead of tport_shutdown0(self, 0);
Yes, it helps, at least it fixes the reported issue.

Thanks,
Arsen.




From: Pekka Pessi ppe...@gmail.com
To: Arsen Chaloyan achalo...@yahoo.com
Cc: Sofia-sip-devel@lists.sourceforge.net
Sent: Wednesday, April 29, 2009 6:20:58 PM
Subject: Re: [Sofia-sip-devel] TCP UAS resource leak [win]

2009/3/16 Arsen Chaloyan achalo...@yahoo.com:
 Problem description:
 Accepted socket remains in CLOSE_WAIT state.

Is it leaking sockets?

 How to reproduce:
 UAC connects to Sofia-SIP UAS, makes basic call and finally tears down TCP
 connection.

 Tport output:
 // Windows
 tport_wakeup(00CB7310): events HUP
 tport(00CB7310)
 tport(00CB7310, 0)
 tport_set_events(00CB7310): events
 tport(00CB7310): set timer at 1797891 ms because idle since send

 // Linux
 tport_wakeup(0x9cf91e8): events IN
 tport_recv_event(0x9cf91e8)
 tport_shutdown0(0x9cf91e8, 2)
 tport_close(0x9cf91e8): tcp/x.x.x.x:3095/sip
 tport(0x9cf91e8): set timer at 0 ms because zap

 When remote UAC tears down TCP connection 'events HUP' is raised on Windows,
 while 'events IN' on Linux.
 If I modify Sofia's code to raise 'events IN' in case of Windows too, socket
 is closed.
 The other workaround is to modify tport_hup_event handler
 isntead of
   tport_shutdown0(self, 0);
 use
  tport_shutdown0(self, 2);

 Any inside thoughts would be really helpful.

Does it help to use

tport_shutdown0(self, tport_has_queued(self) ? 0 : 2);

instead of

tport_shutdown0(self, 0);

?

-- 
Pekka.Pessi mail at nokia.com
--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] TCP UAS resource leak [win]

2009-04-29 Thread Pekka Pessi
2009/4/29 Arsen Chaloyan achalo...@yahoo.com:
 Is it leaking sockets?
 Yes, at least netstat clearly shows it.

Does it help to use tport_shutdown0(self, tport_has_queued(self) ? 0 : 2);
 instead of tport_shutdown0(self, 0);
 Yes, it helps, at least it fixes the reported issue.

OK, I'll push the fix to darcs...

-- 
Pekka.Pessi mail at nokia.com

--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel