Comments (6)
I read through this and get the basic problem but it would take a good bit of work for me to get up to speed on the client code enough to have an idea of how to address this. Given that currently my focus is almost entirely on the server side code, this may not happen. I would however have time to review a pull request. So if you have an idea of how to fix things perhaps you would consider submitting a pull request with the fix + test. I don't mean to be dismissive of your issue, rather just honest about my time and what your best chances are of getting this fixed.
Thanks.
from sftp.
This looks very much like the hang in WriteTo fixed in PR #152. I'm going to look to see if the same fix would work here.
from sftp.
Thanks for your support! I am currently buried into different projects so there is little time for me right now to write test cases to probe the deadlock bug. For the tool where I used to transfer data to unreliable mobile WLAN connections the deadlock did not reappear after I fixed the sftp package like mentioned earlier.
Cheers and keep on the good work!
Nek
from sftp.
I was reviewing the code and I think all that this would take to trigger would be 1 successfully received packet followed by 2 errors. After 1 packet inFlight would be 0 (one added, one removed) and desiredInFlight would be 2 (started at 1, incremented once). So then if it received 2 errors in a row, they would both hit the immediate channel write in dispatchRequest causing the 2nd to lock.
I'm trying to figure out a way to write a test for this right now. I have yet to find a good place to force it to start returning errors after N packets are sent. I'm thinking maybe I could change things so I could replace packet.sendPacket() with a version of it that fails after N.
from sftp.
I replicated it.
from sftp.
Note that this also effects client.Write() as well.
from sftp.
Related Issues (20)
- Get file's username, groupname and another metadata HOT 7
- sftp.Glob returns incorrect path of found file or dir HOT 1
- Interface support for sftp.NewRequestServer? HOT 2
- Any dir with permission 0666 cannot be written to HOT 7
- On write new file it hangs HOT 10
- The file upload hangs when the VPN server is disconnected. HOT 1
- Azure Blob storage SFTP usage - EOF error HOT 9
- Question about getwd() method HOT 1
- IETF Link has rotted HOT 2
- Support for the Afero interface HOT 5
- mandatory workDir even for absolute paths HOT 1
- Unable to delete the selected user: Not Found HOT 3
- Change current working directory? HOT 2
- proposal/exposeRemoveFile HOT 2
- Request attributes are not being propagated for SSH_FXP_OPEN operation HOT 5
- Should Seek() io.SeekStart and io.SeekCurrent do the different things? HOT 1
- sftp client hang when exit in sftp server example HOT 2
- Connection lost when using library with limited bandwidth HOT 5
- In Windows, `Server` should allow a pseudo-directory for `/` which enumerates available drives HOT 22
- How can I perform sftp download and upload feature for multiple files at root directory and within nested subfolder using https://github.com/pkg/sftp HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sftp.