Skip to content

cluster-render: no framework reconnect while another target's scene is subscribed - #228

Closed
IterioDev wants to merge 1 commit into
mainfrom
cluster-render-target-recovery
Closed

IterioDev wants to merge 1 commit into
mainfrom
cluster-render-target-recovery

Conversation

@IterioDev

Copy link
Copy Markdown
Collaborator

Why

On an iDrive 7 head unit (0.6.9), an app had the hud target switched on, but that unit's HUD renderer never subscribes to the hud's scene. The rendering check recovers the hud again and again, as it should:

target hud: asking for scene 0x1000400 30000 ms after its release, which the display confirmed and its renderer unsubscribed
target hud: the display reports scene 0x1000400 mapped but its renderer is not subscribed (1500 ms); unmapping, unfetching and asking again on the ladder
INCIDENT target hud lost: renderer unsubscribed ...

Every third recovery in a row, though, it reconnects the RAMSES framework:

INCIDENT target hud reconnecting the RAMSES framework: no renderer subscription through 36 recoveries in a row
ramses: reconnecting as participant 801

That reconnect drops every content of the participant, including the panel target, which was fine the whole time (rendered: renderer ...0001 subscribed for 1150 s):

dcsm: heartbeats at removal of 0x10004f8 ...
INCIDENT target panel lost: KOMBI removal, cap 5000 ceiling 5000, since-shown 92 s
target panel back after 2138 ms, full request

So the panel disappeared for about 2 s every ~92 s because of a target whose renderer is not there. The removals also lowered the upload cap (lowered from 5500 KB/s: in 30 s, 2 x scene removed).

The reconnect (0f21561) is for a participant session the renderer side no longer serves, e.g. one the display kept over a restart of this side. In that case no target of ours gets a subscription. When another target's scene is subscribed on the same framework, the session is served and a reconnect cannot help the one target. It only takes the other targets down.

Design

  • SlotManager::verify: at every kReconnectAfter-th recovery in a row, the reconnect goes only if no other target's published scene has a renderer subscribed. Otherwise one line is logged instead:
    target hud: no renderer subscription through 3 recoveries in a row; the RAMSES framework not reconnected: target panel's scene 0x10004f8 is subscribed by renderer <guid>
  • The recovery itself is unchanged: taken down, unpublished from the second in a row, asked for again on the ladder (top step 30 s). The count is per target already, so nothing else changes.
  • The reconnect for stalled fetches is unchanged. A subscription to another scene does not show that the display completes new fetches.
  • When the other target's renderer goes too (no scene subscribed), the next kReconnectAfter-th recovery of either target reconnects as before, at most once per kReconnectGapMs.
  • The slots.h header and the on_renderer_stuck comment say so. README and PROTOCOL.md do not describe this reconnect, so they are unchanged.
  • No extra back-off for a target that never subscribes. The ladder already tops out at 30 s, and with this change each cycle touches only that target's own slot. A longer wait would also delay a renderer that comes up later.

Tests

  • make test: 1678 checks pass (1674 on main).
  • service_test, new case: a panel target subscribed and shown next to a hud target whose renderer never subscribes. The test's reconnect drops every mapping, as the display does. Through 9 recoveries of the hud (3 x kReconnectAfter) there is no framework reconnect, each skip is logged, and the panel stays mapped, shown and rendered and is never lost. Then the panel's renderer goes too, and exactly one reconnect is asked. With main's slots.cpp, three of the four checks fail: the hud reconnects at its 3rd and 9th recovery, and the panel's mapping is dropped.
  • slots_test's existing case (one target, the renderer never subscribing: one reconnect after kReconnectAfter recoveries) passes unchanged.
  • Not run here: the check against the head unit's own RAMSES library (needs Docker). Not yet tried on a car.

🤖 Generated with Claude Code

…s subscribed

A target whose renderer never subscribes to its scene is recovered on the
ladder, and every third recovery in a row the unit reconnected its RAMSES
framework. The reconnect is for a participant session the renderer side
no longer serves. But when another target's scene is subscribed on the same
framework, the session is served: only the one target's renderer is
absent. The reconnect then cannot help it, and it drops every other
target's content. A healthy panel was removed and fetched again every
~90 s, and the removals lowered the upload cap.

The reconnect now goes only while no other target's published scene has a
renderer subscribed. Otherwise the skip is logged with the subscribed
target and renderer. The recovery itself, the reconnect for stalled
fetches and the case with no target subscribed are unchanged.

service_test: a panel subscribed and shown next to a hud whose renderer
never subscribes. Over 9 recoveries there is no reconnect and the panel is
never lost. With the panel's renderer gone too, one reconnect is asked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@IterioDev IterioDev closed this Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant