php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58465 Horrible close_wait saturation
Submitted: 2008-12-17 18:20 UTC Modified: 2009-02-08 10:30 UTC
From: sa0sin at free dot fr Assigned:
Status: Duplicate Package: ssh2 (PECL)
PHP Version: HEAD CVS-2008-12-17 (dev) OS: Windows XP/Vista
Private report: No CVE-ID: None
 [2008-12-17 18:20 UTC] sa0sin at free dot fr
Description:
------------
When shutting down ssh connexion, there should be a time_wait 
state of the socket, but here, a close_wait state remains, and 
they accumulate until CPU and networking saturation ...

I think jbrady recommendation on BUG ID 9500 (concerning ssh2) 
should be reconsidered and ifdef and closesocket() windows 
directives should be implemented ...

Thx in advance

Reproduce code:
---------------
$session=ssh2_connect(...)
...
$stream=ssh2_exec(...)
...
...
...
fclose($stream)
...



Expected result:
----------------
ssh2 orders are ok but when fclose is fired, sockets remains 
in close_wait state waiting for an untunable timeout

Actual result:
--------------
Proto	Local Address	Foreign Address	State
TCP	hope:3708	 nixserver:22	 CLOSE_WAIT
TCP	hope:4750	 nixserver:22	 CLOSE_WAIT
TCP	hope:5250	 nixserver:22	 CLOSE_WAIT
TCP	hope:4890	 nixserver:22	 CLOSE_WAIT
TCP	hope:2467	 nixserver:22	 CLOSE_WAIT
TCP	hope:5120	 nixserver:22	 CLOSE_WAIT
TCP	hope:8769	 nixserver:22	 CLOSE_WAIT




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-08 10:30 UTC] mikesul@php.net
As you referenced bug 9500 (http://pecl.php.net/bugs/bug.php?id=9500) and the description is basically identical, that seems like the primary report.

I have just implemented that change, BTW.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC