yuz10 opened a new issue, #7338: URL: https://github.com/apache/rocketmq/issues/7338
### Before Creating the Bug Report - [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions). - [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions) of this repository and believe that this is not a duplicate. - [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ. ### Runtime platform environment Ubuntu 20.04 ### RocketMQ version 5.1.0 ### JDK Version 1.8.0 ### Describe the Bug when shutdown broker, the tiered store shutdown blocked ### Steps to Reproduce start broker using tiered storage ``` tieredBackendServiceProvider=org.apache.rocketmq.tieredstore.posix.PosixFileSegment tieredMetadataServiceProvider=org.apache.rocketmq.tieredstore.metadata.TieredMetadataManager ``` kill broker. ### What Did You Expect to See? the broker shutdown normally ### What Did You See Instead? the broker not shutdown. the jstack is: ``` "Thread-19" #223 prio=5 os_prio=0 cpu=35.29ms elapsed=3511.61s tid=0x00007fcb98019660 nid=0x78c4 waiting on condition [0x00007fca47854000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x0000000707b22a98> (a java.util.concurrent.FutureTask) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429) at java.util.concurrent.FutureTask.get(FutureTask.java:191) at org.apache.rocketmq.tieredstore.file.TieredIndexFile.commit(TieredIndexFile.java:334) at org.apache.rocketmq.tieredstore.file.TieredFlatFileManager.shutdown(TieredFlatFileManager.java:272) at org.apache.rocketmq.tieredstore.TieredMessageStore.shutdown(TieredMessageStore.java:386) at org.apache.rocketmq.broker.BrokerController.shutdownBasicService(BrokerController.java:1397) at org.apache.rocketmq.broker.BrokerController.shutdown(BrokerController.java:1518) at org.apache.rocketmq.proxy.ProxyStartup$1.shutdown(ProxyStartup.java:208) at org.apache.rocketmq.common.utils.AbstractStartAndShutdown.shutdown(AbstractStartAndShutdown.java:41) at org.apache.rocketmq.proxy.ProxyStartup.lambda$main$1(ProxyStartup.java:106) at org.apache.rocketmq.proxy.ProxyStartup$$Lambda$216/238654703.run(Unknown Source) at java.lang.Thread.run(Thread.java:750) "Thread-15" #73 prio=5 os_prio=0 cpu=11.84ms elapsed=3511.61s tid=0x00007fcb9800e9d0 nid=0x78c3 waiting on condition [0x00007fcb4bde6000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x0000000707b22a98> (a java.util.concurrent.FutureTask) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429) at java.util.concurrent.FutureTask.get(FutureTask.java:191) at org.apache.rocketmq.tieredstore.file.TieredIndexFile.commit(TieredIndexFile.java:334) at org.apache.rocketmq.tieredstore.file.TieredFlatFileManager.shutdown(TieredFlatFileManager.java:272) at org.apache.rocketmq.tieredstore.TieredMessageStore.shutdown(TieredMessageStore.java:386) at org.apache.rocketmq.broker.BrokerController.shutdownBasicService(BrokerController.java:1397) at org.apache.rocketmq.broker.BrokerController.shutdown(BrokerController.java:1518) at org.apache.rocketmq.broker.BrokerStartup$1.run(BrokerStartup.java:261) - locked <0x00000006fc9cf740> (a org.apache.rocketmq.broker.BrokerStartup$1) at java.lang.Thread.run(Thread.java:750) "SIGTERM handler" #1795 daemon prio=9 os_prio=0 cpu=0.74ms elapsed=3511.63s tid=0x00007fcba40ef880 nid=0x78c1 in Object.wait() [0x00007fcbd0373000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Thread.join(Thread.java:1257) - locked <0x00000006fc9cf588> (a java.lang.Thread) at java.lang.Thread.join(Thread.java:1331) at java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:107) at java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:46) at java.lang.Shutdown.runHooks(Shutdown.java:130) at java.lang.Shutdown.exit(Shutdown.java:178) - locked <0x00000006fc09fea8> (a java.lang.Class for java.lang.Shutdown) at java.lang.Terminator$1.handle(Terminator.java:52) at sun.misc.Signal$1.run(Signal.java:212) at java.lang.Thread.run(Thread.java:750) ``` ### Additional Context _No response_ -- 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]
