alisha-1000 commented on issue #19849: URL: https://github.com/apache/nuttx/issues/19849#issuecomment-5647131760
The race described here makes sense, especially since `tcp_timer_expiry()` can still be executing while `tcp_free()` clears the connection state. Using `work_cancel_sync()` looks like a reasonable fix because it ensures the queued timer callback has finished before the connection structure is released. It would be useful to confirm whether the callback can still be running when `tcp_free()` reaches `net_bufpool_free()`, and whether this is the intended synchronization model for TCP timers. I’d be interested in testing a minimal fix using `work_cancel_sync()` and checking whether it also covers the deadlock case described in the issue. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
