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

gnrc_lorawan: fix gnrc_pktbuf_release_error (introduced by #16080) #16617

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

jia200x
Copy link
Member

@jia200x jia200x commented Jul 6, 2021

Contribution description

This PR fixes an issue introduced by #16080, in which the wrong pktsnip is released on TX errors.
I removed the head variable and asserted "payload" just to avoid this kind of mistakes in the future.

Testing procedure

It's quite hard to test LoRAWAN right now if we don't have working setups with TTN, but I have a running instance of Chirpstack. I will post results ASAP.

If the transmissions fails (e.g the node didn't join), there's an assertion on master:

2021-07-06 13:59:26,331 # txtsnd 3 02 test
2021-07-06 13:59:26,338 # sys/net/gnrc/pktbuf/gnrc_pktbuf.c:94 => 0x8000165
2021-07-06 13:59:26,340 # *** RIOT kernel panic:
2021-07-06 13:59:26,341 # FAILED ASSERTION.

With this PR:

2021-07-06 14:28:20,569 # reboot
2021-07-06 14:28:20,613 # NETOPT_RX_END_IRQ not implemented by driver
2021-07-06 14:28:20,621 # main(): This is RIOT! (Version: 2021.07-devel-489-g13274-pr/gnrc_lorawan_fix_release)
2021-07-06 14:28:20,626 # Initialization successful - starting the shell now
> txtsnd 3 01 test
2021-07-06 14:28:25,992 # txtsnd 3 01 test
> txtsnd 3 01 test
2021-07-06 14:28:26,840 # txtsnd 3 01 test
2021-07-06 14:28:27,021 # txtsnd 3 01 test
2021-07-06 14:28:27,169 # txtsnd 3 01 test
2021-07-06 14:28:27,318 # txtsnd 3 01 test
2021-07-06 14:28:27,460 # txtsnd 3 01 test
2021-07-06 14:28:27,603 # txtsnd 3 01 test
2021-07-06 14:28:27,756 # txtsnd 3 01 test
2021-07-06 14:28:29,070 # txtsnd 3 01 test
> txtsnd 3 01 test
2021-07-06 14:28:30,244 # txtsnd 3 01 test

Issues/PRs references

#16080

@jia200x jia200x added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch Area: LoRa Area: LoRa radio support labels Jul 6, 2021
@github-actions github-actions bot added Area: network Area: Networking Area: sys Area: System and removed Area: LoRa Area: LoRa radio support labels Jul 6, 2021
Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

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

ACK, as @jia200x mentions its hard to test with no gateway, I don't have access to one ATM, so trusting his testing, and the change is sensible.

@fjmolinas fjmolinas added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 6, 2021
@jia200x
Copy link
Member Author

jia200x commented Jul 7, 2021

thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants