Archive Index
This month's Index
|
Subject: [ libssh2-Bugs-2828139 ] libssh2_poll intermittent hang on Solaris (old version)
[ libssh2-Bugs-2828139 ] libssh2_poll intermittent hang on Solaris (old version)
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 28 Jul 2009 00:35:33 +0000
Bugs item #2828139, was opened at 2009-07-27 20:35
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
Anyway, The only problem I've had is that, at random, libssh2_poll will hang indefinitely. It could be a couple of days or more or even just a matter of minutes before this happens. I call a perl/Net::SSH2 app at regular intervals to exec some "health check" commands on some servers. I finally tracked the true hang down to the C recv() function call in libssh2_packet_read. The following code from libssh2_poll is calling libssh2_packet_read consecutively before recv eventually hangs. Its as if it was expected that there would be data (since libssh2_packet_reads return value > 0), but recv ended up waiting for more data.
(session.c, libssh2_poll, near #ifdef HAVE_POLL section)
(transport.c, libssh2_packet_read, I put before/after debug code here to catch the hang)
Simply removing the while loop avoids the hang and my initial tests are still showing all expected data being returned. I'm not fluent in C nor do I understand sockets. Should there be some additional poll done before each iteration as if even though the return value indicates more packets there is a chance recv could still hang? I see that you may be deprecating libssh2_poll but right now I can't get 1.1 to read any output.
----------------------------------------------------------------------
You can respond by visiting:
|