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

[HELP] TCP/IP psock_send_eventhandler hardfault #15049

Closed
1 task done
vladsomai opened this issue Dec 4, 2024 · 8 comments · Fixed by #15287
Closed
1 task done

[HELP] TCP/IP psock_send_eventhandler hardfault #15049

vladsomai opened this issue Dec 4, 2024 · 8 comments · Fixed by #15287
Labels
Community: Question Further information is requested

Comments

@vladsomai
Copy link

Description

Hello,

We are running NuttX 12.6 on a STM32H7 MCU and ran into an issue right after accepting a socket connection where the board crashed. The hardfault together with the addr2line output on each flash address is attached as a txt file.
hardfault.txt

I attached an image with the Wireshark trace.
wireshark

The IP 192.168.1.36 is running NuttX 12.6 release, while the IP 192.168.1.178 is running Windows 10.
According to the Wireshark data, both sides of the connection send a [PSH, ACK] message. The message going from 36 -> 178 waits for ACK with Seq=1, but the Windows machine sends a request instead of an ACK with Seq=1 causing the board to enter in hardfault.

Can someone help identify what could cause this issue and how to fix it?

Verification

  • I have verified before submitting the report.
@vladsomai vladsomai added the Community: Question Further information is requested label Dec 4, 2024
@acassis
Copy link
Contributor

acassis commented Dec 4, 2024

@wengzhe could you please take a look ^

@acassis
Copy link
Contributor

acassis commented Dec 4, 2024

@vladsomai did you test on 12.7.0 to confirm same issue still present?

@vladsomai
Copy link
Author

@acassis we tested today on 12.7.0 and the issue is still present

@wengzhe
Copy link
Contributor

wengzhe commented Dec 9, 2024

Hi @vladsomai, I'm confused with the backtrace you posted: /Nuttx/net/tcp/tcp_send_buffered.c:434, which seems to be the first line of the function psock_send_eventhandler https://github.com/apache/nuttx/blob/releases/12.6/net/tcp/tcp_send_buffered.c#L434. Is your code same as the code on GitHub (which means you got the hardfault when your device just entered psock_send_eventhandler)?

@vladsomai
Copy link
Author

Hello @wengzhe , I compiled nuttx+our app with -Og flag and the crash dump looks the same, pointing to the begging of psock_send_eventhandler.
To answer your question:

  1. The code is the same as the one from GitHub, tag "nuttx-12.7.0".
  2. Compiling with -Og and -g flags gives the same output.

Any ideas why that could be?

@wengzhe
Copy link
Contributor

wengzhe commented Dec 19, 2024

Hi @vladsomai, we have found a similar issue that may crash in psock_send_eventhandler, but
not at the beginning, so I'm not sure whether they're the same one, may you try this patch? #15287

@xiaoxiang781216 xiaoxiang781216 linked a pull request Dec 20, 2024 that will close this issue
@acassis
Copy link
Contributor

acassis commented Dec 21, 2024

@vladsomai please confirm that PR fixed the issue for you!

@vladsomai
Copy link
Author

Sorry for comming back so late guys, we are having the holiday break and will not be able to test this until 8th of January. Thank you for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community: Question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants