Commit 31177da
committed
More debug, identified deadlock conditions
The CYW43 driver can come up and start processing data. Unfortunately when
it needs to send data out through LWIP we have a deadlock.
There is an CYW43 async_context semaphore owned by the calling task.
In this case, the task is the periodic callback in "asyn_con" (i.e. the
background timer).
1. When the timeout hits, the async context task is woken up and
the first thing it does is take the async_context semaphore.
2. During background processing (sys_check_timeouts) an LWIP call
is made.
3. The LWIP call sends a message to the LWIP task and wakes it up.
The ASYN_CON task is now suspended waiting for the LWIP task done
notification. It holds the ASYN_CON semaphore while asleep.
4. LWIP does a bunch of stuff and tries to do an ethernet_output
to send bits over the wire (i.e. accept DHCP or something).
5. Eventually LWIP's netif call stack goes to the CYW43 object
(while still in the LWIP task) who tries to acquire the
CYW43 semaphore and fails (because it's already held by the async
task that's sleeping).
6. There is no 6, it's deadlocked at this point.1 parent e2f324e commit 31177da
File tree
12 files changed
+7
-6
lines changed- libraries
- lwIP_CYW43/src/utility
- lwIP_Ethernet/src
- lib
- rp2040
- rp2350-riscv
- rp2350
12 files changed
+7
-6
lines changedBinary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
| |||
0 commit comments