jlaitine commented on issue #16430:
URL: https://github.com/apache/nuttx/issues/16430#issuecomment-3177797035

   > [@jlaitine](https://github.com/jlaitine) I randomly came across this issue 
when debugging something possibly related to this. Since you seem to have 
deeper knowledge of signals and their handling, maybe you can comment on this.
   > 
   > I am seeing that on a ESP32S3 in tickless mode after several hours a 
usleep randomly blocks and I am assuming that somehow the respective signal 
that should wake it is not being handled. The issue is more apparent if I 
enable WIFI and telnet on the chip, which adds additional processes with 
potentially more context switches. Does any of this ring a bell in the sense it 
might be related to the bug/vulnerability you described?
   > 
   > Thanks!
   
   Hi,
   
   I don't think that this issue would *directly* cause the symptoms you 
describe. This issue in principle causes 2 things:
   
   1) real time responsiveness issue:
   - a normal user side task/process can keep the whole system in critical 
section by just using signals
   2) security / reliability issue
   - a badly behaving signal hander can lock-up / reset the whole system
   
   Having said that, I *have* encountered issues in SMP where tasks end up in 
some of the queues, and are never picked up from there by the scheduling 
(effectively locking up the system). I have fixed these for TII by modifying 
the SMP algorithms for scheduling queue management (upstream version in 
https://github.com/apache/nuttx/pull/16673), but unfortunately this PR has 
caused some other issues for ESP, so it is pending until proven to work and ESP 
issues resolved. I  believe that for that particular PR the issues are caused 
by existing bugs in esp32 drivers (which I described also in that PR). So 
perhaps look into that direction.
   
   Anyhow, if there is a HW debugger available, I'd suggest trying to break one 
of the cores at the time when the lockup occurs, and study the state of the 
system; are all cores locked in spinlock? are all cores running idle task while 
there are tasks pending in g_pendingtasks or g_readytorun queues?
   


-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to