-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Labels
Arch: risc-vIssues related to the RISC-V (32-bit or 64-bit) architectureIssues related to the RISC-V (32-bit or 64-bit) architectureArea: DriversDrivers issuesDrivers issuesOS: LinuxIssues related to Linux (building system, etc)Issues related to Linux (building system, etc)Type: BugSomething isn't workingSomething isn't working
Description
Description / Steps to reproduce the issue
After PR #15931 , I am experiencing USB crashes in the following use case:
- Have ttyACM serial connection open between the PC and NuttX device (MPFS 64-bit risc-v)
- Continuously send data from PC to the device, and from device to PC
- Pull the USB plug
Result:
[CPU0] riscv_exception: EXCEPTION: Load access fault. MCAUSE: 0000000000000005, EPC: 00000000a003490a, MTVAL: 000000014065b788
[CPU0] riscv_exception: PANIC!!! Exception = 0000000000000005
[CPU0] dump_assert_info: Current Version: NuttX 10.4.0 fa125d9 Mar 17 2025 14:27:35 risc-v
Reverting commit c497c5f fixes the issue
Here is some further info:
- priv->nwrq increases uncontrollably after the USB has been disconnected. Also before disconnecting, it grows beyond CONFIG_CDCACM_NWRREQS
- priv->nwrq increase causes also debugassert at cdcacm_unbind, if unbinding the connection
- priv->txfree gets corrupted in cdcacm_sndpacket, here the EP_SUBMIT(ep, req); will cause a call to cdcacm_wrcomplete, which keeps adding the same wrcontainer to the txfree.
The issue is seen in SMP, single-core and in CONFIG_BUILD_KERNEL and in CONFIG_BUILD_FLAT
On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
Ubuntu 22.04
NuttX Version
master
Issue Architecture
[Arch: risc-v]
Issue Area
[Area: Drivers]
Host information
No response
Verification
- I have verified before submitting the report.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Arch: risc-vIssues related to the RISC-V (32-bit or 64-bit) architectureIssues related to the RISC-V (32-bit or 64-bit) architectureArea: DriversDrivers issuesDrivers issuesOS: LinuxIssues related to Linux (building system, etc)Issues related to Linux (building system, etc)Type: BugSomething isn't workingSomething isn't working