You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a classic CoreData deadlock: a fetch on the main thread triggers cascading delete propagation prefetch, which waits on the PSC queue that's already occupied (likely by WAL writes).
3. Multiple file descriptors on the same DB
lsof shows Storage.sqlite opened by 4 FDs and Storage.sqlite-wal by 4 FDs simultaneously — heavy concurrent read/write contention.
Suggested Fix
Periodic WAL checkpoint: Call PRAGMA wal_checkpoint(TRUNCATE) on a background queue (e.g., every 10 minutes or when WAL > 10MB)
Move CoreData fetches off the main thread: The delete propagation prefetch should not block the UI
Use NSPersistentStoreCoordinator with NSMergeByPropertyObjectTrumpMergePolicy to reduce lock contention
Workaround
For other users hitting this: restart CleanClip periodically. I wrote a launchd watchdog that monitors WAL size and auto-restarts when it exceeds 50MB.
Environment: macOS 26.2 (25C56), CleanClip 2.4.6, Apple Silicon, process uptime ~22h before freeze.
Building on the excellent root cause analysis above — I've observed the same CoreData deadlock occurring even when WAL is small (~9MB), confirming this is a concurrency bug independent of WAL size.
Timeline (from my watchdog logs)
2026-02-14 19:46 [WARN] WAL=50MB, restarting... → 0MB ✓
2026-02-14 22:56 [WARN] WAL=51MB, restarting... → 1MB ✓
2026-02-15 00:56 [WARN] WAL=51MB, restarting... → 0MB ✓
2026-02-15 01:00~ WAL stabilizes at 9MB (overnight, no user activity)
2026-02-15 11:06 App frozen — WAL still only 9MB
Activity
deletexiumu commentedon Feb 14, 2026
Root Cause Analysis: CoreData WAL Bloat → Main Thread Deadlock
I'm experiencing the same high CPU / freeze issue on v2.4.6, macOS 26.2 (Sequoia). Did some digging and found the root cause.
Evidence
1. WAL file bloat
The SQLite WAL (Write-Ahead Log) grows unbounded during runtime:
After restart, WAL drops back to ~213KB. This means WAL checkpointing is not happening during normal operation.
2. Main thread deadlock (via
samplecommand)The main thread is 100% blocked on CoreData:
This is a classic CoreData deadlock: a fetch on the main thread triggers cascading delete propagation prefetch, which waits on the PSC queue that's already occupied (likely by WAL writes).
3. Multiple file descriptors on the same DB
lsofshowsStorage.sqliteopened by 4 FDs andStorage.sqlite-walby 4 FDs simultaneously — heavy concurrent read/write contention.Suggested Fix
PRAGMA wal_checkpoint(TRUNCATE)on a background queue (e.g., every 10 minutes or when WAL > 10MB)NSPersistentStoreCoordinatorwithNSMergeByPropertyObjectTrumpMergePolicyto reduce lock contentionWorkaround
For other users hitting this: restart CleanClip periodically. I wrote a launchd watchdog that monitors WAL size and auto-restarts when it exceeds 50MB.
Environment: macOS 26.2 (25C56), CleanClip 2.4.6, Apple Silicon, process uptime ~22h before freeze.
deletexiumu commentedon Feb 15, 2026
Additional finding: Deadlock without WAL bloat
Building on the excellent root cause analysis above — I've observed the same CoreData deadlock occurring even when WAL is small (~9MB), confirming this is a concurrency bug independent of WAL size.
Timeline (from my watchdog logs)
Process sample confirms identical deadlock
All 19 threads blocked. CPU = 0.0%. Process state
S(sleeping). Classic deadlock, not a busy-wait.Key difference from above report
This suggests two distinct deadlock triggers:
WAL checkpointing alone won't fix case 2. The fundamental issue is
performBlockAndWaiton the main thread contending with the PSC queue.Improved watchdog (covers both cases)
My watchdog now detects both scenarios:
Available at: just a simple launchd plist running every 5 minutes + the script above.
Environment: macOS 26.2 (25C56), CleanClip 2.4.6 (2040600), Apple Silicon (M-series)
deltasierra commentedon Mar 16, 2026
Thank you for this!! The constant unresponsiveness and restarts are driving me crazy. I wish the maintainers would fix this.