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

Handle messages arriving during initial STA wait #316

Merged
merged 3 commits into from
Dec 13, 2023
Merged

Conversation

edwardalee
Copy link
Contributor

@edwardalee edwardalee commented Dec 2, 2023

Some errors have appeared in master that are not caught. For example, the federated STPParameter.lf test case prints the following error message:

Federate 1: Timer ticked at (0, 0).
Federate 0: Environment 0: ---- Spawning 2 workers.
Federate 1: ERROR: STP violation occurred in a trigger to reaction 1, and there is no handler.
**** Invoking reaction at the wrong tag!
Federate 1: Received 1.

In fact, the "Received 1" message is supposed to occur before the "Timer ticked" message.

I assume that this has been changed to a non-fatal error to prevent flaky test failures, but in this case, it is masking a real test failure.

This PR pulls events off the event queue before advancing to the start time so that messages received during the initial STA wait are properly handled.

However, it turns out there are more problems. The federated test DecentralizedP2PComm succeeds but prints out the following error messages:

Federate 0: Received 100.
Federate 1: Received 0 late.
Federate 1: ERROR: STP offset was violated by (0, 1).
...

So there are more problems...

Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK, but as a general comment: I have to admit that all the of the ifdefs throughout this code I find it pretty difficult to understand what's going on...

@edwardalee edwardalee merged commit fe39d61 into main Dec 13, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants