-
Notifications
You must be signed in to change notification settings - Fork 160
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
router: make AddLinkType
acquire the DataPlane mutex
#4614
Conversation
I am aware of the current failure, I will look into it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jcp19)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jcp19)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jcp19)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the test failure made me realize that this cannot work as-is. AddLinkType is called by AddExternalInterface, which takes the same Mutex. So we need an un-safe version of addLinkType. Since AddLinkType doesn't seem to be called from anywhere else, I wonder if we actually need an exported (and safe) version at all.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jcp19)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jcp19)
router/dataplane.go
line 408 at r1 (raw file):
// be called on a not yet running dataplane. func (d *DataPlane) AddLinkType(ifID uint16, linkTo topology.LinkType) error { d.mtx.Lock()
Mutex is already held by only caller.
Good point. By the same token, I guess that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotta wait for Dominik's input on that one. It might be intended to support a configuration API.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jcp19)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh...wait. How come AddExternalInterface doesn't already deadlock on AddNeighborIA? Does go support recursive mutexes by default?
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jcp19)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind.... these are different mutexes. I should read the code more carefully.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jcp19)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and the same is true in the case of AddLinkType, so my initial objection was wrong. Apologies. I also don't know why the end-to-end test fails, though.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jcp19)
No worries, I also missed the fact that they are different mutexes at first 😅 |
The checks went through this time and it is unclear why. It is strange that they failed before, maybe the timeouts are too tight? PS: similar failures were reported in runs of the CI for different PRs, so I assume that the cause of the error is independent of these changes |
Yeah, something like that: #4606
…On Thu, Sep 12, 2024 at 3:05 PM João Pereira ***@***.***> wrote:
The checks went through this time and it is unclear why. It is strange
that they failed before, maybe the timeouts are too tight?
—
Reply to this email directly, view it on GitHub
<#4614 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBLEYOAPK6PRMV7DU3VN3NTZWGGP7AVCNFSM6AAAAABOBMMBDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBWGIZTCNBTGU>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
--
JEAN-CHRISTOPHE HUGLY
Software Engineer
+41 79 455 68 69
***@***.*** ***@***.***>
scion.org <http://www.scion.org/>
SCION Association <https://www.linkedin.com/company/scion-association/>
<https://www.scion.org/>
|
Fixes #4282
With this change, the implementation of
AddLinkType
matches that of the other setters and the comment that precedes it.