[Bug] SIGSEGV in CImageDescription::id() on wake - weak pointer race condition
#12871
Replies: 3 comments 4 replies
|
I am also getting a repeatable crash on |
|
I'm testing |
|
I think I had this issue too or very similar at least. I asked Claude to write a good report on it. Hyprland Crash During System Suspend - Color Management SIGABRTBug DescriptionHyprland crashes with SIGABRT during system suspend. The crash occurs in the color management subsystem ( System Information
ABI String: Steps to Reproduce
Expected BehaviorHyprland should gracefully handle the suspend transition and allow the system to enter sleep mode. Actual BehaviorHyprland crashes with SIGABRT during the suspend process, specifically after
Timeline of EventsStack TraceAdditional Thread Stack TracesThread 2112 (Hyprgraphics async resource gatherer): Threads 2122, 2123, 2130, 2131 (Mesa/Gallium threads): Kernel Messages During Freeze FailureAdditional Context
Core Dump InformationPossible Root CauseThe crash appears to originate from WorkaroundNone known at this time. Potential mitigations to test:
Related Information
Report Generated: 2026-01-19 |
Uh oh!
There was an error while loading. Please reload this page.
System Info
ea444c35)Bug Description
Hyprland crashes with
SIGSEGVduring monitor hotplug events on wake from suspend. This is a regression that persists despite the fix in commit5faa66d("protocols/cm: fix CColorManagementSurface m_imageDescription init").Reproduction
Crash Analysis
Stack trace (consistent across all crashes):
#4 |
NColorManagement::CImageDescription::id() const#5 |
CColorManagementSurface::imageDescription()Log context shows hotplug event:
drm: Got a hotplug event for /dev/dri/card1
drm: Scanning connectors for /dev/dri/card1
Root Cause Analysis
The issue is that
PImageDescriptionis defined as a weak pointer:In
CColorManagementSurface,m_imageDescriptionis this weak pointer type. During hotplug:CImageDescriptionobjects are destroyed as resources are cleaned upCColorManagementSurfacestill holds a weak pointer to the destroyed objectimageDescription()dereferences without checking validity:return m_imageDescription->value();id()The Dec 27 fix (
5faa66d) only initializesm_imageDescriptionin the constructor. It doesn't prevent the weak pointer from becoming dangling when the referenced object is destroyed during hotplug.Suggested Fix
Either change
PImageDescriptionto use SP (shared pointer), or lock the weak pointer before dereferencing:Related
Attachments
See attached crash reports with full backtraces and log context.
hyprlandCrashReport1205.txt
hyprlandCrashReport1211.txt
All reactions