Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with the proposed fix #1

Open
manishbansal8843 opened this issue Jul 18, 2021 · 2 comments
Open

Issue with the proposed fix #1

manishbansal8843 opened this issue Jul 18, 2021 · 2 comments

Comments

@manishbansal8843
Copy link

I am glad i am not the first one to face this issue but this did gave me little cry. Anyway, i also did the good amount of analysis and i am glad our views match. However the solution proposed by you looks brittle and will only delay the issue but won't solve it

I feel there could be below 2 reasons for this issue to occur.

  1. Sftp network is slow.
  2. The client machine does not have enough resources due to which it cannot prioritize the session thread.
    Due to any of the above reasons, it might happen that there is no data for piped input stream to read and hence it straight goes to session.write method waiting for window to get resized.
    Now in this case, even if you increase input buffer, it might fill eventually.

I feel it would be better if the file writing thread should simply wait for the acknowledgements from remote sftp once the remote window is diminished. This way it will make sure that once it goes for waiting rw resizing message, input buffer will never fill no matter what size it has.
What do you think?

@manishbansal8843
Copy link
Author

is/jsch#39

Here is the pr link for your reference.

@jlentini
Copy link
Owner

jlentini commented Jul 20, 2021

Hi @manishbansal8843, I'm glad that you found my Jsch analysis useful.

I'm not following your reasoning about a deficiency with my solution. If you have a test case that demonstrates the problem you're describing, I would be happy to look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants