Subject: [libssh2] [ libssh2-Bugs-1940276 ] Endlosloop in libssh2_sftp_close_handle

[libssh2] [ libssh2-Bugs-1940276 ] Endlosloop in libssh2_sftp_close_handle

From: <>
Date: Fri, 11 Apr 2008 08:17:10 -0700

Bugs item #1940276, was opened at 2008-04-11 08:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

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: Endlosloop in libssh2_sftp_close_handle

Initial Comment:
At a customer site we use libssh2 via libcurl.
When trying to close a channel, we now and then come across (trace)

14:30:01.325284 libssh2_sftp_close_handle(0x8116dd0, 0x8114d10, 0xffecb748, 0x805f44b, 0x80f4460) = -37
14:30:01.325453 libssh2_sftp_close_handle(0x8116dd0, 0x8114d10, 0xffecb748, 0x805f44b, 0x80f4460) = -37
and so on
this seeems to be (in sftp.c)

    while (sftp->handles) {
and in libssh2_sftp_close_handle

        rc = libssh2_channel_write_ex(channel, 0,
                                      (char *) handle->close_packet,
        if (rc == PACKET_EAGAIN) {
            return PACKET_EAGAIN;

We tried to stop this with alarm and sigsetjmp,
but it's still occuring.
Our current workaround is an external killscript,
but that's less than optimal.

Wolfgang Riedel


You can respond by visiting:

This email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.;198757673;13503038;p?
libssh2-devel mailing list
Received on 2008-04-11