Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yosoyubik
Copy link
Collaborator

Consider the following:

  • we achieve a direct route, on the last live flow.
  • there are no other live flows, so nothing times out—no /pump timers fire
  • we don't trigger any %fine requests, so those don't time out either.
  • the only lane in state for that peer never gets modified—that only happens on /pump and /fine %wake timers
  • a /forward-lane scry will always produce that direct route, unless sender/receiver ships initiate communication—the route gets also updated if you hear a packet on a different lane than what you have in state.

To fix that, we update the /forward-lane scry to explicitly check if the route is dead, based on the last-contact timestamp, instead of relying on the last value saved in state;

The ames driver has cached the dead lanes, and those lanes only expire on %nail gifts from arvo, but if no party sends a formal packet (e.g. the way to fix eauth communication problems has been to explicitly send a |hi) the lanes will remain there, and will send packets to nowhere.

To expire those lanes, we add a global ~m2 timers that goes over every peer and updates the lane to %dead if it has been more than ~s30 since last contact, and if so, emit a %nail gift to vere that will remove the entry from the cache—this timer will be removed in the Directed Messaging release that explicitly has a global ~m2 timer.

PS: credit to @pkova for finding this out.

PPS: draft until we get some feedback on the solution, and the migration is tested on a live ship.

For every route that turns to %dead, we emit a %nail gift to vere.
This also updates the /forward-lane scry to explicitly check if the
route is dead, based on the last-contact timestamp, instead of
relying on the last time the route was updated.
@pkova
Copy link
Collaborator

pkova commented Nov 4, 2024

The test failures here are because ames is now not generating the x is your neighbor %dill prints. +update-qos used to do this so we probably want to preserve the behavior.

@yosoyubik yosoyubik marked this pull request as ready for review November 5, 2024 12:57
@pkova pkova merged commit 5b73c76 into master Nov 5, 2024
@pkova pkova deleted the yu/dead-routes-fix branch November 5, 2024 14:26
@pkova pkova mentioned this pull request Nov 13, 2024
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.

3 participants