fix: add timeout for dde-shell services to prevent startup failure#219
fix: add timeout for dde-shell services to prevent startup failure#21918202781743 wants to merge 1 commit into
Conversation
Change the TimeoutStartSec from infinity to 10 seconds for both dde- shell-plugin and dde-shell services. This prevents the deepin-service- manager from getting stuck waiting indefinitely when these services fail to start, allowing the system to properly handle startup failures and improve overall system stability. Log: Added startup timeout for dde-shell services Influence: 1. Test normal startup of DDE desktop services 2. Verify services start within 10 seconds under normal conditions 3. Test startup delay scenarios to ensure timeout works correctly 4. Monitor deepin-service-manager startup behavior after timeout trigger 5. Verify system logs show proper timeout events 6. Test service restart behavior after timeout fix: 为 dde-shell 服务添加超时机制以防止启动失败 将 dde-shell-plugin 和 dde-shell 服务的 TimeoutStartSec 从无限改为 10 秒。这可以防止 deepin-service-manager 在这些服务启动失败时无限期阻塞,使 系统能够正确处理启动失败,提升整体系统稳定性。 Log: 为 dde-shell 服务添加启动超时 Influence: 1. 测试 DDE 桌面服务的正常启动 2. 验证服务在正常条件下能在 10 秒内启动完成 3. 测试启动延迟场景以确保超时机制正确工作 4. 监控超时触发后 deepin-service-manager 的启动行为 5. 验证系统日志显示正确的超时事件 6. 测试超时后的服务重启行为
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR introduces a 10-second startup timeout for the dde-shell-plugin and dde-shell systemd services to prevent deepin-service-manager from blocking indefinitely when these services fail to start. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, yixinshark The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 --- a/systemd/dde-session-core.target.wants/[email protected]
+++ b/systemd/dde-session-core.target.wants/[email protected]
@@ -18,7 +18,8 @@ After=dbus.socket
Type=dbus
BusName=com.deepin.dde.desktop
ExecStart=/usr/bin/dde-shell -p %I
-TimeoutStartSec=infinity
+# 设置10秒超时,避免服务异常时systemd无限等待导致会话卡死
+TimeoutStartSec=10s
Slice=session.slice
Restart=always
RestartSec=1s
diff --git a/systemd/dde-session-core.target.wants/[email protected] b/systemd/dde-session-core.target.wants/[email protected]
index 82e64c4..2309b09 100644
--- a/systemd/dde-session-core.target.wants/[email protected]
+++ b/systemd/dde-session-core.target.wants/[email protected]
@@ -21,7 +21,8 @@ Wants=org.desktopspec.ApplicationManager1.service
Type=dbus
BusName=org.deepin.dde.Dock1
ExecStart=/usr/bin/dde-shell -C %I --serviceName=org.deepin.dde.shell -d org.deepin.ds.desktop
-TimeoutStartSec=infinity
+# 设置10秒超时,避免服务异常时systemd无限等待导致会话卡死
+TimeoutStartSec=10s
Slice=session.slice
Restart=always
RestartSec=1s |
Change the TimeoutStartSec from infinity to 10 seconds for both dde-
shell-plugin and dde-shell services. This prevents the deepin-service-
manager from getting stuck waiting indefinitely when these services fail
to start, allowing the system to properly handle startup failures and
improve overall system stability.
Log: Added startup timeout for dde-shell services
Influence:
fix: 为 dde-shell 服务添加超时机制以防止启动失败
将 dde-shell-plugin 和 dde-shell 服务的 TimeoutStartSec 从无限改为 10
秒。这可以防止 deepin-service-manager 在这些服务启动失败时无限期阻塞,使
系统能够正确处理启动失败,提升整体系统稳定性。
Log: 为 dde-shell 服务添加启动超时
Influence:
Summary by Sourcery
Introduce a startup timeout for dde-shell services to avoid indefinite blocking when these services fail to start.
Bug Fixes:
Deployment: