Re: [I] [BUG] System crashes after PR #16231 [nuttx]
jlaitine commented on issue #16341: URL: https://github.com/apache/nuttx/issues/16341#issuecomment-2872129154 btw. @anchao this was closed wrongly, PR's #16342 or #16343 won't fix this. #16358 will. -- 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]
Re: [I] [BUG] System crashes after PR #16231 [nuttx]
jlaitine commented on issue #16341: URL: https://github.com/apache/nuttx/issues/16341#issuecomment-2871942980 Unfortunately, the PR #16343 doesn't fix the bug. I tried to look it a bit further, and realized that "sim" target suffers from the same tick timer drift as what was fixed earlier for riscv and arm64 platforms. I made a quick attempt to correct it in https://github.com/apache/nuttx/pull/16358 , which seems to fix the issue of test failing randomly. Another thing is why it always segfaulted when the test failed. That I didn't look up yet, but probably should, just in case there is something funny going on... -- 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]
Re: [I] [BUG] System crashes after PR #16231 [nuttx]
anchao closed issue #16341: [BUG] System crashes after PR #16231 URL: https://github.com/apache/nuttx/issues/16341 -- 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]
Re: [I] [BUG] System crashes after PR #16231 [nuttx]
Fix-Point commented on issue #16341: URL: https://github.com/apache/nuttx/issues/16341#issuecomment-2865385363 > Interesting, then it is probably some older bug, which just appears when timings change! Can you check if this PR https://github.com/apache/nuttx/pull/16343 fixed the bug? -- 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]
Re: [I] [BUG] System crashes after PR #16231 [nuttx]
jlaitine commented on issue #16341: URL: https://github.com/apache/nuttx/issues/16341#issuecomment-2862986678 Interesting, then it is probably some older bug, which just appears when timings change! -- 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]
Re: [I] [BUG] System crashes after PR #16231 [nuttx]
Fix-Point commented on issue #16341: URL: https://github.com/apache/nuttx/issues/16341#issuecomment-2862787271 Interesting, I checkout the last commit (c22df41ca6a17bcfc10c242242b0cd55945db8ab) before the https://github.com/apache/nuttx/pull/16231. It failed the same test cases ocassionally. ``` The current real time: sec is 946684884, nsec is 959353016 sleep 2 seconds Setting time: sec is 946684886, nsec is 959353016 get real time clock again Obtaining the current time after setting: sec = 946684886, nsec = 959403366 [ OK ] test_nuttx_clock_test_clock01 [ RUN ] test_nuttx_clock_test_clock02 [ OK ] test_nuttx_clock_test_clock02 [==] nuttx_time_test_suites: 7 test(s) run. [ PASSED ] 6 test(s). [ FAILED ] nuttx_time_test_suites: 1 test(s), listed below: [ FAILED ] test_nuttx_clock_test_timer03 1 FAILED TEST(S) Cmocka Test Completed. nsh> uname -a NuttX 12.7.2-vela c22df41ca6a May 8 2025 19:43:28 sim sim ``` ``` ``` [ PASSED ] 8 test(s). [==] tests: Running 1 test(s). [ RUN ] drivertest_posix_timer [ ERROR ] --- 2020 is not within the range [1990, 2010] [ LINE ] --- drivertest_posix_timer.c:162: error: Failure! [ FAILED ] drivertest_posix_timer [==] tests: 1 test(s) run. [ PASSED ] 0 test(s). [ FAILED ] tests: 1 test(s), listed below: [ FAILED ] drivertest_posix_timer 1 FAILED TEST(S) [1]1618803 segmentation fault (core dumped) ./nuttx ``` -- 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]
Re: [I] [BUG] System crashes after PR #16231 [nuttx]
jlaitine commented on issue #16341: URL: https://github.com/apache/nuttx/issues/16341#issuecomment-2862644921 Unfortunately, it looks like 16342 won't fix the issue; I cherry-picked the following patches: ``` commit 878c45eba94d96997a3e737696167b99452c0f37 (HEAD) Author: ouyangxiangzhen Date: Thu May 8 11:24:46 2025 +0800 sched/wqueue: Improve performance of the work_queue. This commit improve the performance of the work_queue by reducing unnecessary wdog timer setting. Signed-off-by: ouyangxiangzhen commit 47c3c1640fdc7dfe084a53e68c12f4b3557fa87a Author: ouyangxiangzhen Date: Thu May 8 11:17:46 2025 +0800 sched/wqueue: Fix work_cancel_sync. This commit fixed work_cancel_sync at a very rare boundary case. When a worker thread re-enqueues the work data structure during the execution of work, the user thread cannot directly dequeue the work in work_cancel_sync. Instead, it should wait until all workers' references to the work data structure have been eliminated after dequeuing. Signed-off-by: ouyangxiangzhen ``` On top of current master (156469f158753db41d39d08008aa1ae978af1a47) And the result is the same: ``` [==] nuttx_mm_test_suites: 8 test(s) run. [ PASSED ] 8 test(s). [==] tests: Running 1 test(s). [ RUN ] drivertest_posix_timer [ ERROR ] --- 2015 is not within the range [1990, 2010] [ LINE ] --- drivertest_posix_timer.c:162: error: Failure! [ FAILED ] drivertest_posix_timer [==] tests: 1 test(s) run. [ PASSED ] 0 test(s). [ FAILED ] tests: 1 test(s), listed below: [ FAILED ] drivertest_posix_timer 1 FAILED TEST(S) Segmentation fault (core dumped) ``` -- 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]
Re: [I] [BUG] System crashes after PR #16231 [nuttx]
Fix-Point commented on issue #16341: URL: https://github.com/apache/nuttx/issues/16341#issuecomment-2862251582 Hi. The issue is caused by the `work->qtime += 1` in `libs/libc/wqueue/work_queue.c`. The user workqueue using `nxsem_timedwait`, which has already taken the insufficient ticks into consideration. After removing `work->qtime += 1`, PR https://github.com/apache/nuttx/pull/16342 should have fixed this 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]
