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
OpenClaw's diagnostic subsystem runs action=release_lane to free stuck lane claims, but the action is a no-op when the claim is held by a live worker process. The result released=0 is logged but no items are actually released. The lane stays guarded indefinitely, blocking subsequent updates and causing silent agent stalls where the agent session appears alive but receives no new messages.
This has been reproduced 3 times in 4 days across different machines, agents, and configurations.
Reproduction
OpenClaw gateway running with a Telegram channel account
Inbound message arrives; gateway worker claims it via a channel_ingress_events row write
The agent runtime stalls on a tool call or runtime operation (not necessarily a config issue — can be transient)
Worker holds the claim indefinitely
Gateway's diagnostic subsystem detects stuck state every ~144 seconds (per gateway log evidence)
release_lane action runs. Logged: released=0. No items released.
Lane stays guarded. Subsequent messages pile up in pending indefinitely.
Agent session remains "active" by heartbeat timestamp but receives nothing
Gateway restart is the only known recovery
Symptoms observed by users
Agent session timestamp shows recent activity (heartbeat is recent)
Session health metrics look normal (token count, model, runtime state)
User sends messages — they appear delivered to Telegram
Agent never responds
Outbound messages from agent work fine
Only restart restores comms
Restart "fix" is temporary: gateway reaches the same stall again within minutes-to-hours
Expected behavior
release_lane should actually free the lane when the worker holding the claim is non-responsive:
Detect stalled workers (worker thread not making progress for > N seconds)
Force-release the stuck claim (mark claim_owner and claim_token as NULL)
Mark the associated channel_ingress_events row as failed with reason lane-released-on-stuck
Allow subsequent updates to be processed by a fresh claim
Actual behavior
release_lane returns released=0 and the lane stays guarded. The log line released=0 is informational but misleading: it implies the recovery ran, but no work was done.
The gateway worker is blocked on a mutex inside malloc while running a SQLite query. Memory footprint at sample time: 664 MB current, 1.2 GB peak — significant allocation churn during the diagnostic timer callbacks.
Hypothesis: the diagnostic timer (run_timers → Environment::RunTimers → timer callback → release_lane SQL) is blocking on a malloc mutex that another thread is holding. This is consistent with the released=0 symptom: the diagnostic never returns from the SQLite query to actually update the row state.
Note: attempts=0, last_error is null, but claimed_at is hours old. The worker that holds the claim is alive (the gateway process is running, ~38-43% CPU) but the claim is never released or progressed.
Workaround (user-side)
While this bug is open, the workaround is to query SQLite and force-fail the stuck claims:
-- Find stuck claims on a given accountSELECT event_id, status, attempts, claim_owner, claim_token
FROM channel_ingress_events
WHERE status ='claimed'AND account_id ='<account_id>';
-- Force-fail themUPDATE channel_ingress_events
SET status ='failed',
failed_reason ='manual-cleanup-stuck-claim',
failed_at = strftime('%s','now')*1000,
last_error ='Stuck claim force-failed to free lane',
claim_owner =NULL,
claim_token =NULLWHERE status ='claimed'AND account_id ='<account_id>';
Note: this restores comms for hours-to-minutes before recurrence. Not a permanent fix.
Suggested upstream fix
Modify the release_lane action to:
Detect stalled workers: if the claim_owner PID is alive but the claim has not progressed in > N seconds (configurable, suggest 60s default), treat the claim as stalled.
Force-release stalled claims: set claim_owner = NULL, claim_token = NULL, mark the row as failed with failed_reason = 'lane-released-on-stuck'.
Update released count: reflect actual items released, not just the count of claims the action attempted to release.
Add a timeout to the diagnostic timer callback: if the SQLite query or release_lane operation blocks for > 5 seconds, abort the diagnostic cycle with a warning log instead of hanging the gateway worker. This addresses the malloc-mutex blocking we observed in the stack trace.
Investigate WAL-mode + cross-thread lock contention: our evidence shows the gateway worker is blocked on _pthread_mutex_firstfit_lock_slow (macOS malloc subsystem) during a SQLite column lookup. This suggests cross-thread contention within the Node process where one thread is in nanov2_free while another is calling SQLite. Could be related to how the diagnostic timer interacts with the WAL write lock.
Possible relationship to 2026.6.8
Recent 2026.6.8 release notes mention:
"stuck-session recovery scheduling no longer resets warning backoff"
"fix Telegram rich delivery and ingress recovery"
"SQLite avoids WAL on NFS state volumes"
These could be partial fixes to this surface, but the underlying release_lane no-op symptom is not explicitly called out. Could the 2026.6.8 changes be extended or backported to specifically address the release_lane no-op? If 2026.6.8 reproduces this issue, the symptom is still present after the latest stable.
Sub-agent embedded run timeout does not release CommandLane — same symptom class (lane not releasing after timeout), different scope (sub-agent run lane, not channel ingress lane).
Reporter context
Reporter: KBzA operations team (Krieger Bangerz Agency)
Environment: Mac Mini fleet (Apple Silicon + Intel), Telegram channel accounts
User impact: agent comms silently stall; users must recognize the symptom and trigger gateway restart
Detection difficulty: high (session health looks normal; only manual SQLite inspection reveals the issue)
Verification steps for maintainers
Spin up a Telegram channel on OpenClaw 2026.6.1 (or 2026.6.8).
Send an inbound message that triggers a tool call the agent can't complete (e.g., missing API key, missing tool permission).
Wait for the agent to stall (typically 60-180 seconds).
Send a new inbound message.
Observe: new message sits in pending, lane stays guarded, release_lane action returns released=0.
Confirm: gateway restart is required to restore comms.
Summary
OpenClaw's diagnostic subsystem runs
action=release_laneto free stuck lane claims, but the action is a no-op when the claim is held by a live worker process. The resultreleased=0is logged but no items are actually released. The lane stays guarded indefinitely, blocking subsequent updates and causing silent agent stalls where the agent session appears alive but receives no new messages.This has been reproduced 3 times in 4 days across different machines, agents, and configurations.
Reproduction
channel_ingress_eventsrow writerelease_laneaction runs. Logged:released=0. No items released.pendingindefinitely.Symptoms observed by users
Expected behavior
release_laneshould actually free the lane when the worker holding the claim is non-responsive:claim_ownerandclaim_tokenas NULL)channel_ingress_eventsrow asfailedwith reasonlane-released-on-stuckActual behavior
release_lanereturnsreleased=0and the lane stays guarded. The log linereleased=0is informational but misleading: it implies the recovery ran, but no work was done.Reproduction environments
In all three cases, gateway restart resolved the symptom but the underlying
release_laneno-op returned within minutes (or hours) of restart.Stack trace evidence (2026-06-19 incident, gateway PID 84043)
The gateway worker is blocked on a mutex inside malloc while running a SQLite query. Memory footprint at sample time: 664 MB current, 1.2 GB peak — significant allocation churn during the diagnostic timer callbacks.
Hypothesis: the diagnostic timer (
run_timers→Environment::RunTimers→ timer callback →release_laneSQL) is blocking on a malloc mutex that another thread is holding. This is consistent with thereleased=0symptom: the diagnostic never returns from the SQLite query to actually update the row state.Log evidence
This pattern recurs every ~144 seconds.
releasedis always 0. The lane never frees.Database state observed (post-mortem)
Stuck claims look like this in
~/.openclaw/state/openclaw.sqlite:Note:
attempts=0,last_erroris null, butclaimed_atis hours old. The worker that holds the claim is alive (the gateway process is running, ~38-43% CPU) but the claim is never released or progressed.Workaround (user-side)
While this bug is open, the workaround is to query SQLite and force-fail the stuck claims:
Then restart the gateway service:
Note: this restores comms for hours-to-minutes before recurrence. Not a permanent fix.
Suggested upstream fix
Modify the
release_laneaction to:claim_ownerPID is alive but the claim has not progressed in > N seconds (configurable, suggest 60s default), treat the claim as stalled.claim_owner = NULL,claim_token = NULL, mark the row asfailedwithfailed_reason = 'lane-released-on-stuck'.releasedcount: reflect actual items released, not just the count of claims the action attempted to release.release_laneoperation blocks for > 5 seconds, abort the diagnostic cycle with a warning log instead of hanging the gateway worker. This addresses the malloc-mutex blocking we observed in the stack trace._pthread_mutex_firstfit_lock_slow(macOS malloc subsystem) during a SQLite column lookup. This suggests cross-thread contention within the Node process where one thread is innanov2_freewhile another is calling SQLite. Could be related to how the diagnostic timer interacts with the WAL write lock.Possible relationship to 2026.6.8
Recent 2026.6.8 release notes mention:
These could be partial fixes to this surface, but the underlying
release_laneno-op symptom is not explicitly called out. Could the 2026.6.8 changes be extended or backported to specifically address therelease_laneno-op? If 2026.6.8 reproduces this issue, the symptom is still present after the latest stable.Affected versions
Related issues
Reporter context
Verification steps for maintainers
pending, lane stays guarded,release_laneaction returnsreleased=0.