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

Do not create the temporary dependency link if a connection between f… #1085

Merged
merged 15 commits into from
May 25, 2022

Conversation

edwardalee
Copy link
Collaborator

@edwardalee edwardalee commented Apr 8, 2022

…ederates has a delay. This fixes a problem that a federated program with feedback was exhibiting spurious cycle detection errors.

After fixing this, two bugs surfaced that required the following two fixes:

  • Fixed an issue where control reactions were being triggered even though the federate had no upstream/downstream zero-delay logical connections.

  • Removed the problematic optimization where all federates and the RTI assumed that all federates already have a PTAG at startup.

See lf-lang/reactor-c#83 for the accompanying PR.

@Soroosh129
Copy link
Contributor

Soroosh129 commented Apr 11, 2022

I think we might have fixed the original issue discussed in #1086.
I can't reproduce the false cycle error anymore.
To confirm, I added a simplified version of the test (FeedbackDelaySimple.lf), which for me executes to completion.
I also don't get a cycle error for FeedbackDelay.lf.

Nonetheless, it seems like there is a deadlock occurring in FeedbackDelay, which causes it to timeout.
This looks like an unrelated issue to #1086.

I propose that we keep the FeedbackDelaySimple test in this PR and merge without FeedbackDelay (if all tests pass), and subsequently create a new issue for the deadlock happening in FeedbackDelay.

@Soroosh129 Soroosh129 marked this pull request as ready for review May 25, 2022 00:28
@Soroosh129
Copy link
Contributor

I believe this PR is ready for review. I'm not sure why the Cpp tests timed out, but I'm pretty sure that's unrelated to the changes in this branch.

@Soroosh129 Soroosh129 linked an issue May 25, 2022 that may be closed by this pull request
@Soroosh129
Copy link
Contributor

@edwardalee Could you please kindly take a look at the changes here to see if they look OK? I could not ask for a review since you are the original creator of this PR.

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 to me. Be sure to update the refs in ci.yml after merging this (and before deleting this branch ;-))

Copy link
Collaborator Author

@edwardalee edwardalee left a comment

Choose a reason for hiding this comment

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

These changes look right to me, except perhaps the ci.yml change.

@@ -54,12 +54,12 @@ jobs:

# Run the C integration tests.
c-tests:
uses: lf-lang/lingua-franca/.github/workflows/c-tests.yml@master
uses: lf-lang/lingua-franca/.github/workflows/c-tests.yml@federated-delay-fix
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wait, we probably don't want these changes in ci.yml to be committed when this is merged to master, right?

Copy link
Member

@lhstrh lhstrh May 25, 2022

Choose a reason for hiding this comment

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

We do. After merging, it's a matter of changing these to master. This will work as long as the referenced branch exists.

@Soroosh129 Soroosh129 merged commit 9e1e63e into master May 25, 2022
@Soroosh129 Soroosh129 deleted the federated-delay-fix branch May 25, 2022 14:03
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.

Federated feedback with delay falsely detects cycles
3 participants