Subject: timeouts in libssh2 blocking-mode

timeouts in libssh2 blocking-mode

From: Matt Lilley <matt.lilley_at_securitease.com>
Date: Mon, 02 May 2011 17:27:50 +1200

Hello,

We've been using libssh2 for a while in some internal tests. It
generally works very well, but there's an annoying problem where badly
behaved ssh servers can cause lockups inside libssh2. Jan Van Boghout
posted some patches to implement a simple workaround for this last year
(http://www.libssh2.org/mail/libssh2-devel-archive-2010-02/0073.shtml),
and I see there's a bug (http://trac.libssh2.org/ticket/160) for it as
well, currently partially complete but not fully integrated (and now
almost a year old)

I've attached an updated patch against the tip of the master git
repository which preserves the recently added keepalive support, while
ensuring in the end we don't block forever. While the keepalive support
works very well after the session is established, until that point, it
seems that sending keepalives will cause the server to boot us off; that
means we are exposed to potential endless blocking during a session
creation.

Since I'm new to the mailing list, I may have missed recent discussion,
but the bug hasn't really moved in a year, so I thought it might be
worth reinvorigating debate - comments very welcome.

Regards,
Matt

-- 
_____________________________________________
Matt Lilley
Software Engineer
SecuritEase
Tel:    +64 4 912-2100
Fax:    +64 4 912-2101
E-mail: matt.lilley_at_securitease.com
Web:    http://www.securitease.com
_____________________________________________
This e-mail has passed our content security scan.
It is covered by the confidentiality clauses at http://www.securitease.com/content_and_confidentiality
Received on 2011-05-02