Fix-Point commented on PR #15937:
URL: https://github.com/apache/nuttx/pull/15937#issuecomment-2809276203

   > @Fix-Point @xiaoxiang781216
   > 
   > There are 2 serious problems with `work_queue_period` in this PR:
   > 
   > 1. watchdog list in work_s is reused in the callback of 
`work_queue_period`, which will causing the wd list of work_queue to be 
corrupted if period timer is expiration
   >    
![image](https://private-user-images.githubusercontent.com/758493/434257207-6638ecba-f1c0-493e-96b1-d5ebf67eaedb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDQ4MDI3OTIsIm5iZiI6MTc0NDgwMjQ5MiwicGF0aCI6Ii83NTg0OTMvNDM0MjU3MjA3LTY2MzhlY2JhLWYxYzAtNDkzZS05NmIxLWQ1ZWJmNjdlYWVkYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNDE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDQxNlQxMTIxMzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05NmJiZGU1ZDRlMmY2MjE2YzkzN2RiMDE3OWViNWQ5NjEyYjMxNDllOWI5ZDhiYTJiYTRlZTYxOGRjMWU1NmRkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.IJw0rK-fQe8xYpuJfM1c_rrRzq27qdoa8EP4nW6tHs0)
   > 2. When the CPU is busy, the period worker cannot be scheduled because the 
period time is refreshed in the watchdog callback
   > 
   > I have done a simple test in sim/nsh and found that after starting 
`work_queue_period`, the system crashed due to worker list corruption
   > 
   > I am curious whether you have tested this PR on internal project?
   
   You are right.  The question is the field reused by the queue node. I am 
going to make another periodic workqueue patch in a few days.
   


-- 
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