He-Pin opened a new issue, #3228:
URL: https://github.com/apache/pekko/issues/3228
### Motivation
使用 Artery remoting 时,ActorSystem 终止可能耗时 15 分钟,远超预期。虽然 `internalShutdown`
有超时约束,但在某些场景下仍可能出现长时间挂起。
### 当前代码行为
`ArteryTransport.scala` 中:
```scala
// ArteryTransport.scala:630-670
def internalShutdown(...): Future[Done] = {
// 使用 DriverTimeout + 3.seconds 和 ShutdownFlushTimeout
...
}
```
有界超时约束存在,但 15 分钟的终止时间暗示可能存在:
- 多级超时叠加(transport → association → compression → aeron)
- 某个组件未正确响应关闭信号
- 等待 future 完成的隐式阻塞
### 预期行为
ActorSystem.terminate() 应在合理时间内完成(通常几秒到几十秒),即使有未完成的远程通信。
### 代码证据
-
`remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:630-670`
— internalShutdown 实现
### 复现方式
1. 启动两个使用 Artery 的 ActorSystem 并建立通信
2. 突然终止其中一个(如 kill -TERM)
3. 观察另一个的终止耗时
### 影响范围
- 模块:`pekko-remote`(Artery)
- 影响需要快速关闭的应用(如 CI/CD、容器编排)
- K8s 等环境中 pod 终止超时可能导致强制 kill
### 备注
此问题需要运行时分析确认具体的耗时瓶颈组件。
--
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]