Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

behn: the ship in src.bowl effects the setting and unsetting of timers from an agent #6884

Open
brbenji opened this issue Jan 12, 2024 · 2 comments
Labels

Comments

@brbenji
Copy link

brbenji commented Jan 12, 2024

Describe the bug
Setting and unsetting a behn timer from a gall agent is ship dependent. src.bowl is relevant to canceling timers, in addition to the given wire. Only the ship associated with a timer's wire can unset that timer.

To Reproduce
Steps to reproduce the behaviour: mildly difficult

  1. boot two ships (~bus ~fun)
  2. create an app that accepts pokes for setting and cancelling timers (i.e. https://github.com/brbenji/cancel-my-timer)
  3. set a timer on ~bus with ~fun
  4. attempt to cancel timer on ~bus with ~bus
  5. reference +timers to see the timer still exists and ~fun is written in the wire for it

Expected behaviour
Canceling a timer with the same wire used to set it would work regardless of the ship in src.bowl.

Screenshots
Screen Shot 2024-01-12 at 11 30 44 AM
Screen Shot 2024-01-12 at 11 31 27 AM
Screen Shot 2024-01-12 at 11 32 01 AM

System (please supply the following information, if relevant):

  • 412K

Additional context
In designing a timer server agent for %chess we had to make a compromise. Because the wire can be insufficient for cancelling a timer, adding a timer-id into state was necessary. In our specific case, the server agent's host ship would set a behn timer, and then a poke from another ship would trigger the timer cancel. However, because the ship in src.bowl actually matters, we had to add to our state to cancel the timer somewhere other than on-poke where the src.bowl matched the ship the timer was associated with.

I believe this is because the duct is used throughout the process of timer setting and unsetting within behn, making the ship source relevant. Whether that can be changed or not, the larger issue is this fact is hidden in Userspace and causes lots of confusion.

Notify maintainers
@joemfb, @belisarius222, @philipcmonk

@brbenji brbenji added the bug label Jan 12, 2024
@belisarius222
Copy link
Contributor

This is an awful bug. Thank you for the detailed report. I hope the bug can be fixed without deep changes to Gall, but it might require a bigger effort to clean up Gall's duct handling generally.

@brbenji
Copy link
Author

brbenji commented May 14, 2024

For historical record, I learned this bug was previously discovered by ~hodzod-walrus as mentioned in the urbit-faq repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants