Bugs item #2871334, was opened at 2009-10-01 14:32
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2871334&group_id=125852

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: libssh2_session_startup may hang

Initial Comment:
Hi,

Our application has been hanging in libssh2_session_startup quite a long time. 
It's probably a consequence of a 
network issue (the connect() function worked so the network issue probablty 
happened between these two functions)
The application has been not responding for more than 60 seconds, and it has 
been restarted automatically by a monitor.

Fortunately a backtrace has been generated:
(gdb) bt
#0  0x00007ffeae99cce2 in select () from /lib/libc.so.6
#1  0x00007ffeaec3a458 in _libssh2_wait_socket (session=0x7ffea801a7d0) at 
session.c:520
#2  0x00007ffeaec3ad46 in libssh2_session_startup (session=0x7ffea801a7d0, 
sock=15) at session.c:687

I cannot see any timeout in the select(). The problem is we cannot control how 
much time it may take. We
have used setsockopt to set a read/write timeout on the socket we pass to 
libssh2, but the socket timeouts
have no effect with select. 

So would it be possible to add an extra argument to  libssh2_session_startup() 
so that we can have
a timeout and we can just return and error instead of hanging. We are using 
libssh2-1.2.

Thanks


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2871334&group_id=125852
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to