fix: avoid signal-handler deadlocks during session shutdown - #234
Open
yixinshark wants to merge 1 commit into
Open
yixinshark wants to merge 1 commit into
yixinshark wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR removes reentrant Qt/D-Bus signal handlers and the obsolete direct dock stop, delegating cleanup to systemd, and revises unit dependencies so the dock stops before the desktop while tray shutdown can proceed in parallel. Review the service ordering carefully alongside the companion dde-tray-loader change, and verify both startup synchronization and shutdown behavior. Sequence diagram for systemd-managed session logoutsequenceDiagram
participant Systemd
participant SessionManager
participant Dock
participant Desktop
Systemd->>SessionManager: stop
SessionManager->>SessionManager: prepareLogout(force)
Note over SessionManager: systemd retains ExecStopPost cleanup
Systemd->>Dock: stop
Dock-->>Systemd: stopped
Systemd->>Desktop: stop
Desktop-->>Systemd: stopped
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Remove signal handlers that invoke Qt and D-Bus from interrupted code. Keep abnormal-exit cleanup in the existing systemd ExecStopPost and OnFailure paths, and remove the obsolete dde-dock service stop call. Keep desktop and Dock startup independent; let the tray target own its ordering after the Dock. Document the current session lifecycle. 移除在被中断代码中调用 Qt 和 D-Bus 的信号处理函数,避免重入死锁。 异常退出清理继续由已有的 systemd ExecStopPost 和 OnFailure 路径完成, 删除旧 dde-dock 服务停止调用。保留桌面与 Dock 独立启动,由托盘 target 维护其与 Dock 的顺序关系,并更新会话生命周期说明。 Log: avoid signal-handler deadlocks during session shutdown Pms: BUG-378589 Change-Id: I640d8c5541fee3df4bdb82bd789bacb8cd25a1f3
yixinshark
force-pushed
the
fix/bug-378589-session-logout
branch
from
September 30, 2026 06:14
37d7975 to
6bf7a8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
POSIX signal handlers called
SessionManager::doLogout(), which invokes Qt/D-Bus while interrupted code may hold their locks. Remove those handlers and retain crash/termination cleanup through the existingExecStopPostandOnFailuresystemd paths. Also remove the obsoletedde-dock.servicestop call: the current Dock isdde-shell@DDE.service.Desktop and Dock start independently. The paired tray target owns its ordering after the Dock; this PR adds no desktop-before-Dock or Dock-before-desktop constraint. Update the lifecycle document to match the current services.
移除信号处理函数中不安全的 Qt/D-Bus 调用,保留 systemd 对正常及异常退出的清理。删除旧 dde-dock 调用,保持桌面与 Dock 并行启动,并更新生命周期说明。
Validation
Paired change: linuxdeepin/dde-tray-loader#523
Pms: BUG-378589