| Summary: | sftp exits immediately after connection (fgets EAGAIN) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Roberto A. Foglietta <roberto.foglietta> | ||||||||
| Component: | sftp | Assignee: | Assigned to nobody <unassigned-bugs> | ||||||||
| Status: | CLOSED WORKSFORME | ||||||||||
| Severity: | normal | CC: | djm | ||||||||
| Priority: | P2 | Keywords: | patch | ||||||||
| Version: | 4.7p1 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Linux | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Roberto A. Foglietta
2007-09-18 22:27:22 AEST
Created attachment 1353 [details]
strace output of sftp immediately after connection exited
Created attachment 1354 [details]
strace output collected with redirection of stderr (works)
I forgot to say this bug has been noticed using sftp in conjunction with dropbear ssh but you should have seen it by the command line itself. Can you replicate the problem running with OpenSSH ssh, or by bypassing ssh entirely and having sftp talk directly to sftp-server? You can do the latter using a commandline like the following: sftp -P /usr/libexec/sftp-server blah If I had to guess what the problem is, it would be that dropbear is detecting a tty on stderr and putting /dev/tty into non-blocking mode though it isn't clear why this should interfere with sftp, which is a separate process. (In reply to comment #4) > Can you replicate the problem running with OpenSSH ssh, or by bypassing > ssh entirely and having sftp talk directly to sftp-server? no as far as I can see. > You can do > the latter using a commandline like the following: > > sftp -P /usr/libexec/sftp-server blah ~ # sftp -P /usr/libexec/sftp-server Attaching to /usr/libexec/sftp-server... sftp> ls pippo strace.log sftp> ~ # sftp -S /mnt/tmpfs/ssh.gzexe foglietr@172.16.119.6 Connecting to 172.16.119.6... foglietr@172.16.119.6's password: sftp> quit > > If I had to guess what the problem is, it would be that dropbear is > detecting a tty on stderr and putting /dev/tty into non-blocking mode > though it isn't clear why this should interfere with sftp, which is a > separate process. > anyway do you think this patch could hurt in sane enviroment? I used a usleep(10*1000) in order to not overload the system. The patch just papers over the problem, which is probably in Dropbear somewhere. I don't think this is a bug in OpenSSH, please reopen if you can find evidence that it is. Close resolved bugs after release. |