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

bugs on weak memory model arch.(arm/power) #240

Open
zergvszerg opened this issue May 20, 2020 · 0 comments
Open

bugs on weak memory model arch.(arm/power) #240

zergvszerg opened this issue May 20, 2020 · 0 comments

Comments

@zergvszerg
Copy link

zergvszerg commented May 20, 2020

RpcMessageStream::try_start_send() 1can miss pending messages because it first performs a relaxed load of _send_token which can miss store/store_release of _send_token.

RpcMessageStream::get_from_pending_queue() 2can miss pending messages because it performs a relaxed load of _pending_message_count before entering the critical section guarded by _pending_lock, again, the relaxed load can miss store/store_release of _pending_message_count.

With the above two defects combined, the current message calling try_start_send() and the previous message calling get_from_pending_queue() (on_write_some() ---> try_start_send() ---> get_from_pending_queue() ) both may miss the chance to send the current pending message, which lead to the current pending message siting idle in _pending_callsuntil timeout.

I believe the scenario described above is quite likely to happen under weak memory model such as aarch64 and ppc64.

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

No branches or pull requests

1 participant