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

at86rf2xx: Dead lock when sending while receiving #8242

Open
roberthartung opened this issue Dec 12, 2017 · 9 comments
Open

at86rf2xx: Dead lock when sending while receiving #8242

roberthartung opened this issue Dec 12, 2017 · 9 comments
Assignees
Labels
Area: drivers Area: Device drivers Area: network Area: Networking Community: help wanted The contributors require help from other members of the community Impact: major The PR changes a significant part of the code base. It should be reviewed carefully Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@roberthartung
Copy link
Member

The at86rf2xx driver doesn't check the current state when sending. Therefor it is possible, that a deadlock occurs. at86rf2xx_tx_prepare tries to set the state to AT86RF2XX_STATE_TX_ARET_ON, however, if the receiver is currently in BUSY_RX state, the idle_state will be set accordingly.
The send afterwards is still successful, however, the idle_state is wrong. The _isr method of at86rf2xx_netdev.c will set the idle_state afterwards, however it will never be reached and this results in a dead lock.

I will provide a fix shortly: Add busy waiting before sending / switching states.

@miri64 miri64 added Area: drivers Area: Device drivers Area: network Area: Networking labels Dec 12, 2017
@roberthartung
Copy link
Member Author

Update: Probably extending at86rf2xx_set_state to also check for BUSY_RX and BUSY_TX might solve the problem. Will update issue accordingly.

@jnohlgard
Copy link
Member

Are you working on a PR for this or is this a potential "help wanted" issue?

@roberthartung
Copy link
Member Author

@gebart I am currently trying to figure out what exactly the problem is!

@kaspar030
Copy link
Contributor

Any news here?

@kaspar030 kaspar030 removed this from the Release 2018.04 milestone Apr 22, 2018
@virajsahai
Copy link

If this is a "help wanted" candidate..I would like to take this up!

@jnohlgard
Copy link
Member

@virajsahai any help is welcome. Feel free to open a PR if you find what the actual problem is.

@DipSwitch
Copy link
Member

This is the same bug as described under: #7276 (comment)

It has been tried to be fixed with PR's: #7115 #7275 #7276 #8186

@DipSwitch DipSwitch added Impact: major The PR changes a significant part of the code base. It should be reviewed carefully Community: help wanted The contributors require help from other members of the community Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Aug 12, 2018
@stale
Copy link

stale bot commented Aug 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Aug 10, 2019
@PeterKietzmann PeterKietzmann added the State: don't stale State: Tell state-bot to ignore this issue label Aug 19, 2019
@stale stale bot removed the State: stale State: The issue / PR has no activity for >185 days label Aug 19, 2019
@miri64
Copy link
Member

miri64 commented Jul 1, 2020

@roberthartung Can you check if #12728 fixed this? I think this is the same behavior as described in #11256.

@miri64 miri64 added this to the Release 2020.07 milestone Jul 1, 2020
@aabadie aabadie removed the State: don't stale State: Tell state-bot to ignore this issue label May 20, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2020.10 milestone Jun 22, 2021
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 22, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: network Area: Networking Community: help wanted The contributors require help from other members of the community Impact: major The PR changes a significant part of the code base. It should be reviewed carefully Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

10 participants