Code Monkey home page Code Monkey logo

Comments (8)

abtink avatar abtink commented on June 7, 2024

It is been a while since I last read the DataPollSender and Mac code, but checking the code I dont see anything obvious that would lead to such a behavior.

  • The DataPollSender should immediately SendDataPoll() from ProcessRxFrame() if it sees aFrame.GetFramePending() on the received frames.
  • Mac should finish kOperationWaitingForData from HandleReceivedFrame()

Unable to obtain due to messages overriding each other when logging at level 5. Logging at level 4 does not trigger the bug.

Gotta love a Heisenbug 😄

from openthread.

jwhui avatar jwhui commented on June 7, 2024

@CodingRays , can you attach the pcap file?

from openthread.

CodingRays avatar CodingRays commented on June 7, 2024

So heres a minimal setup to reproduce the issue i found. This uses only dongles:

From a fresh clone of the nrf52840:
Build using ./script/build nrf52840 USB_trans -DOT_BOOTLOADER=USB -DOT_LOG_LEVEL_DYNAMIC=ON
On the mtd following commands:

log level 5
mode -
pollperiod 10000

On the ftd to test

udp send <mleid> 5000 -s 512

Since the bug appears ~50% of the time a few transmission might be required but it should trigger very reliably.

I sadly lost the pcap file from the image but here is a capture from a test using the above setup.
The bug appears between packet 172 and 173. Network key: 6ce43b5b088aa1a10db563e803d1a28b
data_poll_dongle.zip

from openthread.

jwhui avatar jwhui commented on June 7, 2024

Looking at the packet trace again, it appears that the ACK was sent with the Frame Pending bit set, but no data frame transmission followed. The default Data Poll Timeout is set to 100ms:

#define OPENTHREAD_CONFIG_MAC_DATA_POLL_TIMEOUT 100

The Data Sequence Number jumps from 125 in frame 169 to 127 in frame 175. So it appears that it tried to send a data frame. But without more logging from the sender, it is difficult to determine exactly the root cause. It could be due to CCA failures. It could be that the frame was transmitted but a collision occurred. Both of which would be legitimate reasons for packet loss.

Can you provide detailed logs from the parent?

from openthread.

CodingRays avatar CodingRays commented on June 7, 2024

I can try to get the logs.

But its hard to believe its completely unrelated to the logging due to just how consistent it is. I have not had a single such failure during all my testing while logging was disabled while with it enabled its 50% of all ip packets / ~16% of all fragments.

from openthread.

jwhui avatar jwhui commented on June 7, 2024

I'm hoping the logs can provide some visibility into why data frames are not being transmitted following an ACK with the Frame Pending bit set.

from openthread.

CodingRays avatar CodingRays commented on June 7, 2024

Ok so ive spent a while testing and i was no longer able to reproduce the bug. It did occur once and as previously when it did happen it was reliable until i changed the configuration. Here 10s after the change i continued testing and it immediately stopped. However without knowing any conditions to trigger it its hard to investigate. I also couldnt get logs from that test. One thing to note though is that now the wireshark logs show the data poll being sent but no response from the parent.

I am using different hardware (newer chip revisions) now though and will try and test with the original hardware hopefully soon and get back after i do that.

from openthread.

CodingRays avatar CodingRays commented on June 7, 2024

Alright i cant reproduce the bug anymore event with different hardware. I have no idea what changed.
I guess the issue can be closed then.

from openthread.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.