-
Notifications
You must be signed in to change notification settings - Fork 244
Free the arbitrated client token from client manager #444
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This assert will trigger if we follow the non status ok path here:https://github.com/EmbeddedRPC/erpc/pull/444/files#diff-74a78bba1605a2e491d18277550d2c7db7943691c691d14d7a732558f9a0c681L83. Since then nothing has called received. But something may have set a result.
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.
Sorry @elupus , I don't understand you, can you please explain the flow deeply please?
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.
If the arbitrator->send call fails for whatever reason. The buffer will be signalled as failed. However the buffer has already been handed of to handed of to another thread (the receiving thread). This other thread can then just have received data that complete this request or it can just have received some aborting read condition.
The race condition ls very tight with master of erpc (but very much there), if you fix some other race conditions like making sure errors are propagated from the arbitrator, the race condition window grows.
In general, if we handed the buffer to another thread we shall always remove it as well. How it was finalized is nothing that make sense to assert on (warning could be fine)
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.
Sorry @elupus , I still don't understand.
On which of the two asserts you talking, the token or semaphore? and if send failed, why other thread has the buffer (and what is your system, the sender and reciever are on same CPU?)
Is this issue that happened to you or theoretical issue?
Can you please explain step by step, with permalink to the relevant lines?
Uh oh!
There was an error while loading. Please reload this page.
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.
I have the same problem assert,How should we solve it?@elupus
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.
I will check how we handle this internally. Since #469 stalled which is semi related i got sidetracked.