[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openssh-bugs
Subject:    [Bug 1467] New: SFTP stalls
From:       bugzilla-daemon () bugzilla ! mindrot ! org
Date:       2008-05-21 16:27:38
Message-ID: bug-1467-705 () http ! bugzilla ! mindrot ! org/
[Download RAW message or body]

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@mindrot.org
        ReportedBy: sconeu@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.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic