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

Unsafe absolute RC state change: in_send_loop[ ] - all models #216

Open
nmcglo opened this issue Apr 7, 2021 · 2 comments
Open

Unsafe absolute RC state change: in_send_loop[ ] - all models #216

nmcglo opened this issue Apr 7, 2021 · 2 comments
Assignees
Labels
low priority This issue is not actively worked on but isn't a wontfix

Comments

@nmcglo
Copy link
Member

nmcglo commented Apr 7, 2021

Basically every CODES network model does this and is a reminder for me or someone to go through and fix it in all of them.

I've found nondeterminism in Dragonfly Dally if I use small VCs and cause them to overflow. If the VCs are big enough to not overflow, it's deterministic. This happens even with uniform random synthetic.

I have found an unsafe practice in basically every CODES model. Specifically, there are times when we do something like

s->in_send_loop[output_port] = 0
bf->c4 = 1

Then in the reverse handler, we'll check if (bf->c4 == 1), if it is, then we set s->in_send_loop[output_port]=1

Problem, we can't guarantee that s->in_send_loop[output_port]==1 in the forward event handler, but in the reverse handler we force it to become that.

Solution is to just add a new state saving field into the message or to create an RC stack item for it.

This is almost certainly a source of nondeterminism but is an unsafe practice anyway. We must always be aware of making absolute state changes in RC without some sort of state swapping mechanism like storing it in the msg-> or into an RC stack.

@nmcglo nmcglo self-assigned this Apr 7, 2021
@nmcglo
Copy link
Member Author

nmcglo commented Apr 7, 2021

Not the sole source of nondeterminism in Dragonfly Dally with constrained vc sizes

@nmcglo
Copy link
Member Author

nmcglo commented Apr 7, 2021

Turns out it wasn't the source at all of what I was observing. It's still a potential problem, however. Renaming to lower sense of urgency.

@nmcglo nmcglo added the low priority This issue is not actively worked on but isn't a wontfix label Apr 7, 2021
@nmcglo nmcglo changed the title Nondeterminism caused by in_send_loop[ ] RC unsafe absolute state change Unsafe absolute RC state change: in_send_loop[ ] - all models Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low priority This issue is not actively worked on but isn't a wontfix
Projects
None yet
Development

No branches or pull requests

1 participant