xinghhhhhhh commented on issue #855:
URL: https://github.com/apache/mina-sshd/issues/855#issuecomment-3580503438
### Some information
Below is a snapshot of the thread I took.Every time I block is in
DefaultSftpClientFactory.createSftpClient(), It seems that each method in the
sftpSubsystem that handles an sftp request recreates the client, and when the
server does not respond, it becomes completely stuck.
```
"sshd-MySftpSubsystem-26624-thread-1@2579" daemon prio=5 tid=0x21 nid=NA
waiting
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Object.java:-1)
at
org.apache.sshd.common.future.DefaultSshFuture.await0(DefaultSshFuture.java:80)
at
org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:111)
at
org.apache.sshd.client.future.DefaultOpenFuture.verify(DefaultOpenFuture.java:39)
at
org.apache.sshd.client.future.DefaultOpenFuture.verify(DefaultOpenFuture.java:32)
at
org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:110)
at
org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:96)
at
org.apache.sshd.sftp.client.impl.DefaultSftpClient.<init>(DefaultSftpClient.java:105)
at
org.apache.sshd.sftp.client.impl.DefaultSftpClientFactory.createDefaultSftpClient(DefaultSftpClientFactory.java:66)
at
org.apache.sshd.sftp.client.impl.DefaultSftpClientFactory.createSftpClient(DefaultSftpClientFactory.java:50)
at
org.apache.sshd.sftp.client.fs.SftpFileSystem.getClient(SftpFileSystem.java:251)
at
org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.resolveRemoteFileAttributes(SftpFileSystemProvider.java:1128)
at
org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.lambda$readRemoteAttributes$0(SftpFileSystemProvider.java:1119)
at
org.apache.sshd.sftp.client.fs.SftpFileSystemProvider$$Lambda$183.1925216384.apply(Unknown
Source:-1)
at
org.apache.sshd.sftp.client.impl.SftpPathImpl.withAttributeCache(SftpPathImpl.java:95)
at
org.apache.sshd.sftp.client.fs.WithFileAttributeCache.withAttributeCache(WithFileAttributeCache.java:66)
at
org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.readRemoteAttributes(SftpFileSystemProvider.java:1119)
at
org.apache.sshd.sftp.client.impl.AbstractSftpFileAttributeView.readRemoteAttributes(AbstractSftpFileAttributeView.java:71)
at
org.apache.sshd.sftp.client.fs.SftpPosixFileAttributeView.readAttributes(SftpPosixFileAttributeView.java:52)
at
org.apache.sshd.sftp.client.fs.SftpFileSystemProvider.readAttributes(SftpFileSystemProvider.java:1026)
at java.nio.file.Files.readAttributes(Files.java:1737)
at java.nio.file.Files.isDirectory(Files.java:2192)
at
org.example.sftpServerTest.SftpAuditRecorder.open(SftpAuditRecorder.java:20)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.sshd.common.util.EventListenerUtils.lambda$proxyWrapper$1(EventListenerUtils.java:199)
at
org.apache.sshd.common.util.EventListenerUtils$$Lambda$4.1793329556.invoke(Unknown
Source:-1)
at com.sun.proxy.$Proxy3.open(Unknown Source:-1)
at org.apache.sshd.sftp.server.Handle.signalHandleOpen(Handle.java:70)
at
org.apache.sshd.sftp.server.DirectoryHandle.<init>(DirectoryHandle.java:67)
at
org.apache.sshd.sftp.server.SftpSubsystem.doOpenDir(SftpSubsystem.java:808)
- locked <0xa46> (a java.util.concurrent.ConcurrentHashMap)
at
org.apache.sshd.sftp.server.AbstractSftpSubsystemHelper.doOpenDir(AbstractSftpSubsystemHelper.java:735)
at
org.apache.sshd.sftp.server.AbstractSftpSubsystemHelper.doProcess(AbstractSftpSubsystemHelper.java:378)
at
org.apache.sshd.sftp.server.SftpSubsystem.doProcess(SftpSubsystem.java:354)
at
org.apache.sshd.sftp.server.AbstractSftpSubsystemHelper.process(AbstractSftpSubsystemHelper.java:345)
at
org.apache.sshd.sftp.server.SftpSubsystem.run(SftpSubsystem.java:330)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
```
### attachment
[threads_report.txt](https://github.com/user-attachments/files/23767001/threads_report.txt)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]