[Bug 1467] New: SFTP stalls

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Thu May 22 02:27:38 EST 2008


https://bugzilla.mindrot.org/show_bug.cgi?id=1467

           Summary: SFTP stalls
    Classification: Unclassified
           Product: Portable OpenSSH
           Version: 5.0p1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ssh
        AssignedTo: bitbucket at mindrot.org
        ReportedBy: sconeu at yahoo.com


This issue was first noted on SFTP, but the cause was down in the
spawned ssh process.

On some systems (e.g. HP NonStop), read or write to a nonblocking
socket will fail with EWOULDBLOCK instead of EAGAIN.  The code in
channels.c does not handle EAGAIN, causing the socket to be closed, but
the parent process does not recieve notification, leading to a stall.

in channel_handle_[erw]fd, the calls to read/write should check for
EWOULDBLOCK as well as EAGAIN:

e.g, in channel_handle_wfd:

                len = write(c->wfd, buf, dlen);

                if (len < 0 &&
                   (errno == EINTR || 
#ifdef EWOULDBLOCK
                    errno == EWOULDBLOCK ||
#endif
                    errno == EAGAIN))

This appears to be pervasive throughout the code, not just in
channels.c.

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list