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

Channels initialization synchronization issue #408

Open
phanikishoreg opened this issue Aug 31, 2020 · 0 comments
Open

Channels initialization synchronization issue #408

phanikishoreg opened this issue Aug 31, 2020 · 0 comments

Comments

@phanikishoreg
Copy link
Member

phanikishoreg commented Aug 31, 2020

It looks like the channels initialization API might be overwriting the channel data-structures in the shared memory. The __chan_init_with private API (called within chan_snd_init_with and chan_rcv_init_with) currently checks if something has been produced, if so, it doesn't initialize the blockpoints but in other cases, for example, if someone's waiting on the blockpoint, it is not handled, instead the channel is reinitialized, perhaps causing the issue I have seen.

The issue in chan_evt.toml: chan_hi initializes both channels and does a send and a receive in the rendezvous, and it looks like chan_lo only does channel initialization after this point in chan_hi, and making the chan_send from chan_lo never to wakeup the chan_hi that was previously blocked on chan_recv.

Workaround used: The way I dealt with it, is after the chan_hi does its initialization it sleeps for 10ms and so does chan_lo. This way, they're both initialized by the time either of them do send or recv from those channels.

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