Skip to content

eyre: use original listener on delete/unsubscribe#7188

Merged
pkova merged 6 commits into
developfrom
yu/fix-eyre-subscriptions
Jun 30, 2025
Merged

eyre: use original listener on delete/unsubscribe#7188
pkova merged 6 commits into
developfrom
yu/fix-eyre-subscriptions

Conversation

@yosoyubik

@yosoyubik yosoyubik commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator

since %gall removed its larval core, scries on load are not possible (see #7079 for a solution to that). Instead, we move the logic to find these stale subscriptions into a generator to /app/hood that will compare every agent's %eyre channel subscription with the state of %eyre's current subscription. Here we use the %lave task (introduced to remove stale incoming subscriptions in %gall agents due to an ames-gall desync) to pass the duct of the subscription we want to delete.

@yosoyubik yosoyubik force-pushed the yu/fix-eyre-subscriptions branch from 0ac211a to c8f502e Compare June 25, 2025 13:57
@pkova

pkova commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator

Eyre unsubscriptions have been broken since #6561 when we began using an incorrect duct for the Gall %leave. This means that the Eyre channel subscriptions get removed but the underlying Gall subscription never gets cleaned up. Notably this is broken even when we reap the channel every ~h12.

The trivial fix for the underlying issue is here. We will also write a Gall migration that will clean up any outstanding subscriptions.

@pkova

pkova commented Jun 26, 2025

Copy link
Copy Markdown
Collaborator

Gall does not have larval stage so it cannot scry on +load. We put the cleanup migration in /app/hood instead. Note that the issue at hand isn't an absolutely massive memory leak because if any of the stale Gall subscriptions ever get a %fact emitted it ends up in Eyre with the error message removing watch for non-existent channel x and this does successfully clean up the subscription. In other words we have only leaked subscriptions that never emit a %fact after the HTTP client has disconnected.

@yosoyubik yosoyubik marked this pull request as ready for review June 27, 2025 04:39
@pkova pkova merged commit 6f1be18 into develop Jun 30, 2025
1 check passed
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.

2 participants