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

DefaultSftpClient can wait indefinitely in method send and init #328

Closed
ecarou opened this issue Mar 7, 2023 · 2 comments
Closed

DefaultSftpClient can wait indefinitely in method send and init #328

ecarou opened this issue Mar 7, 2023 · 2 comments
Assignees
Labels
bug An issue describing a bug in the code
Milestone

Comments

@ecarou
Copy link

ecarou commented Mar 7, 2023

Version

2.8.0

Bug description

Using the DefaultSftpClient for transferring some files, i came accross an issue where the sftp client stop responding and do not close for several days.
Using a threadDump, i can see that the DefaultSftpClient is waiting indefinitely on the method send.
Got a similar issue several days after but this time in method init.

The server side is a very slow SFTP, and the connection is not stable but nevertheless, it should not block a thread forever.

Actual behavior

infinite wait can occur in method send and init of DefaultSftpClient because of this code :

IoWriteFuture writeFuture = asyncIn.writeBuffer(buf); writeFuture.verify();

the 2 methods are using verify without specifying a maximum wait time.

Expected behavior

If the other side doesn't answer in a predefined time, exit and free the ressource.

Relevant log output

Unfortunately i don't have the threadDump anymore.

Other information

occurs in version 2.8.0 (but will also appear in 2.9.2)

@ecarou ecarou changed the title BabelwaySftpClient can wait indefinitely in method send and init DefultSftpClient can wait indefinitely in method send and init Mar 7, 2023
@ecarou ecarou changed the title DefultSftpClient can wait indefinitely in method send and init DefaultSftpClient can wait indefinitely in method send and init Mar 7, 2023
@lgoldstein
Copy link
Contributor

Seems reasonable - I will look into it...

lgoldstein pushed a commit to lgoldstein/mina-sshd that referenced this issue Sep 19, 2023
lgoldstein pushed a commit to lgoldstein/mina-sshd that referenced this issue Sep 19, 2023
lgoldstein pushed a commit to lgoldstein/mina-sshd that referenced this issue Sep 19, 2023
lgoldstein pushed a commit to lgoldstein/mina-sshd that referenced this issue Sep 26, 2023
@tomaswolf tomaswolf added the bug An issue describing a bug in the code label Sep 26, 2023
@tomaswolf tomaswolf added this to the 2.10.1 milestone Sep 26, 2023
@lgoldstein
Copy link
Contributor

lgoldstein commented Oct 5, 2023

Merged 60bbd7be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue describing a bug in the code
Projects
None yet
Development

No branches or pull requests

3 participants