[ 
https://issues.apache.org/jira/browse/HDFS-17764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17942044#comment-17942044
 ] 

ASF GitHub Bot commented on HDFS-17764:
---------------------------------------

programmerfromxian commented on PR #7551:
URL: https://github.com/apache/hadoop/pull/7551#issuecomment-2788047482

   > > Are you saying that Connection.close() is not called after interrupt?
   > 
   > If `Connection.close()` is not called, we need to fix the code to call it. 
It obviously will have resource leaking if `close()` is not called.
   
   @szetszwo Just my guest,since thread is blocking in method 
emptyCondition.wait, so emptyCondition.notify method is not be called, 
emptyCondition.notify method is only called in Connection.close method, we 
speculate it is due to thread inturrupt that the thread did not complete its 
normal execution and did not call the close method. This is just one 
possibility, we can analyze if there are any other reasons. Thanks for you.




> Connection#stop is blocking when FileSystem#close
> -------------------------------------------------
>
>                 Key: HDFS-17764
>                 URL: https://issues.apache.org/jira/browse/HDFS-17764
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: common
>    Affects Versions: 3.3.1, 3.4.1
>            Reporter: yang yang
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2025-03-28-17-04-50-157.png
>
>
> When call FileSystem.close, we found it was blocked,and thread stack is like 
> following
> {quote}"http-nio-uds-exec-9" #88 daemon prio=5 os_prio=0 cpu=92.85ms 
> elapsed=180245.91s tid=0x000055d7d9c6a800 nid=0x8ff in Object.wait() 
> [0x00007ff473b79000]
>    java.lang.Thread.State: WAITING (on object monitor)
>     at java.lang.Object.wait(Native Method)
>     at java.lang.Object.wait(Object.java:502)
>     at org.apache.hadoop.ipc.Client.stop(Client.java:1438)
>     - locked <0x00000000f5b44b80> (a java.lang.Object)
>     at org.apache.hadoop.ipc.ClientCache.stopClient(ClientCache.java:118)
>     at 
> org.apache.hadoop.ipc.ProtobufRpcEngine2$Invoker.close(ProtobufRpcEngine2.java:340)
>     at org.apache.hadoop.ipc.RPC.stopProxy(RPC.java:719)
>     at 
> org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.close(ClientNamenodeProtocolTranslatorPB.java:340)
>     at 
> org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider.close(ConfiguredFailoverProxyProvider.java:81)
>     - locked <0x00000000f500e278> (a 
> org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider)
>     at 
> org.apache.hadoop.io.retry.RetryInvocationHandler$ProxyDescriptor.close(RetryInvocationHandler.java:239)
>     at 
> org.apache.hadoop.io.retry.RetryInvocationHandler.close(RetryInvocationHandler.java:457)
>     at org.apache.hadoop.ipc.RPC.stopProxy(RPC.java:719)
>     at 
> org.apache.hadoop.hdfs.DFSClient.closeConnectionToNamenode(DFSClient.java:664)
>     at org.apache.hadoop.hdfs.DFSClient.close(DFSClient.java:710)
>     - locked <0x00000000f32b8048> (a org.apache.hadoop.hdfs.DFSClient)
>     at 
> org.apache.hadoop.hdfs.DistributedFileSystem.close(DistributedFileSystem.java:1573)
> {quote}
>  
> !image-2025-03-28-17-04-50-157.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to