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
I’ve been experiencing a strange issue: after some time, both the widget and app stops refreshing randomly, and I have to restart the application to get it working again.
What did you try already?
Hi! First of all, thanks for this really cool tool.
I’ve been experiencing a strange issue: after some time, both the widget and app stops refreshing randomly, and I have to restart the application to get it working again.
Is anyone else experiencing this problem?
If needed, I’m happy to provide additional information. Thanks!
Note: the analysis below was produced with Claude Code (Anthropic's CLI agent). I caught my own instance frozen and had Claude drive a live memory dump of it, read the managed thread stacks, and correlate them with the OHM / RAMSPDToolkit / BlackSharp sources. I've reviewed the findings; sharing them here in full so they're useful to whoever picks this up.
Root cause found — infinite wait on the global SMBus mutex during the DDR4 SPD read
I caught the app in the frozen state and took a full memory dump while it was still hung (process left running, not killed), then read the managed thread stacks and cross-checked them against the source. The freeze is not random: the update thread is stuck forever on a global SMBus/PCI mutex during the DDR4 SPD temperature read, because that mutex is acquired with an infinite timeout.
Managed stack of the frozen BackgroundWorker thread
This was the only thread holding locks (Lock Count 2) and it never returns:
Kernel32.WaitForSingleObject(...) <- BLOCKED, INFINITE
BlackSharp.Core.Interop.Windows.Mutexes.WorldMutex.Lock() <- global mutex, no timeout
RAMSPDToolkit.I2CSMBus.SMBusI801.I2CSMBusXfer(...)
RAMSPDToolkit.I2CSMBus.SMBusInterface.i2c_smbus_read_word_data_swapped(...)
RAMSPDToolkit.SPD.DDR4Accessor.UpdateTemperature()
OpenHardwareMonitor.Hardware.Memory.Sensors.SpdThermalSensor.UpdateSensor()
OpenHardwareMonitor.UI.UpdateVisitor.VisitHardware(...)
OpenHardwareMonitor.Hardware.Computer.Accept(...)
OpenHardwareMonitor.UI.MainForm.BackgroundUpdater_DoWork(...)
The exact cause
SMBusI801.I2CSMBusXfer takes two global mutexes, SMBus then PCI:
Both mutexes are Global\ and shared system-wide. Global\Access_PCI in particular is the same kernel object OHM uses in its own Mutexes.cs, and the same one LibreHardwareMonitor / HWiNFO / RGB software / vendor tools use. So the moment any other process (or a stalled bus transaction) holds that mutex and doesn't release it promptly, the SPD read blocks — and because the wait is infinite, a transient bit of contention turns into a permanent freeze. This is why it triggers "randomly, after a while": it depends on external SMBus/PCI mutex timing.
Note the asymmetry: OHM's own Mutexes.cs (ISA / PCI / EC / Razer / USB) always waits with a finiteWaitOne(timeout) (10 ms–5 s) and pairs every acquire with a release. The RAMSPDToolkit → BlackSharp WorldMutex path is the only hardware access in the process that can wait forever.
Why the whole app freezes (not just the RAM values)
MainForm.Timer_Tick only kicks off a new update if (!backgroundUpdater.IsBusy), and a singleBackgroundWorker iterates over all hardware via _computer.Accept(_updateVisitor). Once the SPD read hangs, that worker never completes → IsBusy stays true forever → no sensor is ever updated again. The timer keeps calling treeView.Invalidate() / _gadget?.Redraw() / _systemTray.Redraw(), which just repaint the last-known values, so the window stays fully responsive while every number (and the web widget, served from the same in-memory values) is frozen.
Confirmation
Unchecking the RAM menu item (Computer.IsMemoryEnabled = false, which removes the MemoryGroup and stops the SPD reads) recovered the app: it stalled for ~15 s, then resumed refreshing normally — matching the theory that the mutex was eventually released and that the memory/SPD path is the trigger.
Suggested fix
Real fix (at the source): make WorldMutex.Lock() accept a finite timeout and have I2CSMBusXferskip the transaction (return failure) when the mutex can't be acquired in time, instead of blocking forever. This is the single change that actually prevents the hang. Lives in RAMSPDToolkit-NDD / BlackSharp.
Defense in depth (in OHM): decouple the memory/SPD update from the shared BackgroundWorker (dedicated worker, or a watchdog that doesn't keep IsBusy latched) so one wedged bus read can't stop CPU/GPU/mainboard refresh.
A thread stuck in a native WaitForSingleObjectcannot be aborted from managed code, so only the finite timeout at the acquisition point (1) truly fixes it; (2) only limits the blast radius.
Diagnosed by capturing a full user-mode dump of the frozen process (dotnet-dump collect -p <PID>), reading the managed stacks (dotnet-dump analyze → clrthreads + clrstack -all), and cross-checking against OHM / RAMSPDToolkit / BlackSharp sources — with the help of Claude Code (Anthropic's CLI agent) to drive the capture and correlate the stacks with the code.
Please post a issue with a detailed description of this situation in the RAMSPDToolkit repository
as for now - decoupling the memory/SPD update from the main update flow does not fit the current application architecture, so lets wait for fix in RAMSPDToolkit
For anyone hitting this: on my machine the freeze was triggered by Corsair iCUE — the Corsair.Service.exe service polls the SMBus continuously and holds the global SMBus mutex, which RAMSPDToolkit waits on with no timeout. Stopping the Corsair service stops the freeze (closing the iCUE app alone isn't enough).
Root cause and fix are tracked upstream in Blacktempel/RAMSPDToolkit#10 — a finite mutex timeout is already committed and will ship in the next RAMSPDToolkit release.
Activity
sergiye commentedon Apr 16, 2026
hi @F0x06,
I need steps to reproduce, perhaps you can trace some pattern?
F0x06 commentedon Apr 18, 2026
Hi, for now seems random, its actually frozen at time of writing this message, still trying to find a reproducer.
PS: Doing file -> Exit on main window, the widget stays on screen i had to kill the process.
F0x06 commentedon Jul 14, 2026
Root cause found — infinite wait on the global SMBus mutex during the DDR4 SPD read
I caught the app in the frozen state and took a full memory dump while it was still hung (process left running, not killed), then read the managed thread stacks and cross-checked them against the source. The freeze is not random: the update thread is stuck forever on a global SMBus/PCI mutex during the DDR4 SPD temperature read, because that mutex is acquired with an infinite timeout.
Managed stack of the frozen
BackgroundWorkerthreadThis was the only thread holding locks (Lock Count 2) and it never returns:
The exact cause
SMBusI801.I2CSMBusXfertakes two global mutexes, SMBus then PCI:and
WorldMutex.Lock()(in BlackSharp.Core) waits with no timeout:Both mutexes are
Global\and shared system-wide.Global\Access_PCIin particular is the same kernel object OHM uses in its ownMutexes.cs, and the same one LibreHardwareMonitor / HWiNFO / RGB software / vendor tools use. So the moment any other process (or a stalled bus transaction) holds that mutex and doesn't release it promptly, the SPD read blocks — and because the wait is infinite, a transient bit of contention turns into a permanent freeze. This is why it triggers "randomly, after a while": it depends on external SMBus/PCI mutex timing.Note the asymmetry: OHM's own
Mutexes.cs(ISA / PCI / EC / Razer / USB) always waits with a finiteWaitOne(timeout)(10 ms–5 s) and pairs every acquire with a release. TheRAMSPDToolkit→BlackSharp WorldMutexpath is the only hardware access in the process that can wait forever.Why the whole app freezes (not just the RAM values)
MainForm.Timer_Tickonly kicks off a new updateif (!backgroundUpdater.IsBusy), and a singleBackgroundWorkeriterates over all hardware via_computer.Accept(_updateVisitor). Once the SPD read hangs, that worker never completes →IsBusystaystrueforever → no sensor is ever updated again. The timer keeps callingtreeView.Invalidate()/_gadget?.Redraw()/_systemTray.Redraw(), which just repaint the last-known values, so the window stays fully responsive while every number (and the web widget, served from the same in-memory values) is frozen.Confirmation
Unchecking the RAM menu item (
Computer.IsMemoryEnabled = false, which removes theMemoryGroupand stops the SPD reads) recovered the app: it stalled for ~15 s, then resumed refreshing normally — matching the theory that the mutex was eventually released and that the memory/SPD path is the trigger.Suggested fix
WorldMutex.Lock()accept a finite timeout and haveI2CSMBusXferskip the transaction (return failure) when the mutex can't be acquired in time, instead of blocking forever. This is the single change that actually prevents the hang. Lives inRAMSPDToolkit-NDD/ BlackSharp.BackgroundWorker(dedicated worker, or a watchdog that doesn't keepIsBusylatched) so one wedged bus read can't stop CPU/GPU/mainboard refresh.A thread stuck in a native
WaitForSingleObjectcannot be aborted from managed code, so only the finite timeout at the acquisition point (1) truly fixes it; (2) only limits the blast radius.Diagnosed by capturing a full user-mode dump of the frozen process (
dotnet-dump collect -p <PID>), reading the managed stacks (dotnet-dump analyze→clrthreads+clrstack -all), and cross-checking against OHM / RAMSPDToolkit / BlackSharp sources — with the help of Claude Code (Anthropic's CLI agent) to drive the capture and correlate the stacks with the code.sergiye commentedon Jul 15, 2026
Please post a issue with a detailed description of this situation in the RAMSPDToolkit repository
as for now - decoupling the memory/SPD update from the main update flow does not fit the current application architecture, so lets wait for fix in RAMSPDToolkit
Blacktempel commentedon Jul 16, 2026
Will be in next version of RAMSPDToolkit.
F0x06 commentedon Jul 16, 2026
For anyone hitting this: on my machine the freeze was triggered by Corsair iCUE — the
Corsair.Service.exeservice polls the SMBus continuously and holds the global SMBus mutex, which RAMSPDToolkit waits on with no timeout. Stopping the Corsair service stops the freeze (closing the iCUE app alone isn't enough).Root cause and fix are tracked upstream in Blacktempel/RAMSPDToolkit#10 — a finite mutex timeout is already committed and will ship in the next RAMSPDToolkit release.
upgrade dependencies (#17)
sergiye commentedon Jul 28, 2026
@F0x06 Please check the fix in the version 3.0.9705
F0x06 commentedon Aug 19, 2026
Hi ! Sorry for the late reply, i will check and give feedback, thanks ! :)