openqueue_removeAllCreatedBy() can remove packets currently being transmitted

Description

The function openqueue_removeAllCreatedBy() doesn't check who the current owner is before it removes a packet from the queue. If the packet is in the process of being transmitted, owned by COMPONENT_IEEE802154E, then a critical error and reset could occur.

Environment

None

Activity

Show:
john rubis
January 8, 2018, 11:24 AM

One additional thought, if the packet is allowed to be sent, then the send done executed path for that type of packet needs to be reviewed to make sure it wouldn't result in undesired execution or state change. I haven't looked at that.

Tengfei Chang
January 8, 2018, 12:30 PM

, the function is called only when the node is de-synchronized or not ready to operate (like starting to send EB for neighbor discovery). In your case, it seems the state machine is still operating, the function shouldn't be called. Does it could be other code reset the neighbor?

john rubis
January 8, 2018, 12:52 PM

I see that, I think the issue maybe in the branch in the sixtop_sendEB():

This condition follows the sync check:

張君維
January 11, 2018, 6:40 AM

Hi , in my experiments, i have 12 nodes.
Each mote will send a data to root every 20 seconds. To prevent buffer overflow, i called openqueue_removeAllCreatedBy(MY_COMPONENT_ID) to clear previous generated packet.

The experiment results was great expected some node will crash and never come back.
The time take to happen is not consistent. Some will take 5 hours some will take 27 hours.

Tengfei Chang
March 15, 2019, 10:29 AM

Resolved.

Assignee

Tengfei Chang

Reporter

john rubis

Labels

None

Story Points

5

Sprint

None

Fix versions

Affects versions

Priority

Critical
Configure