hitHuang opened a new issue, #3634:
URL: https://github.com/apache/nuttx-apps/issues/3634

   ### Description / Steps to reproduce the issue
   
     Found while testing apps/testing/sched/timerjitter on QEMU RISC-V 
(rv-virt), NuttX-13.0.0-RC2. All three reproduce under normal, non-adversarial 
usage. A separate off-by-one in the sample loop was already
     fixed in [pull#3629](https://github.com/apache/nuttx-apps/pull/3629)
   
     1. avg: nan with default args
   ```c
     nsh> timerjitter
     timer jitter in 0 run:
     (latency/us) min: 4294967295, avg: nan, max 0
   ```
     Running with no arguments at all completes 0 iterations and prints avg: 
nan. Should the default guarantee at least 1 iteration, or otherwise avoid 
printing nan?
   
     2. Very large missed-frame counts, one run did not finish
   ```c
     nsh> timerjitter 100 5
     time frame missed 1
     ...
     time frame missed 17363
     timer jitter in 5 run:
     (latency/us) min: 3129, avg: 347295, max 1269743
   ```
     Another run with the same arguments printed missed-frame lines 
continuously and never completed; it had to be terminated externally:
   ```c
     nsh> timerjitter 100 5
     time frame missed 1
     ...
     time frame missQEMU: Terminated
   ```
     3. Negative jitter shown as a huge unsigned value
   ```c
     nsh> timerjitter 10000 10
     time frame missed 1
     timer jitter in 10 run:
     (latency/us) min: 4294966445, avg: 1010, max 12854
   ```
     4294966445 = 2^32 - 851. avg in the same run is a small, plausible number, 
while min is not — suggesting min/max end up holding a negative value that gets 
displayed as a large unsigned one.
   
   
   ### On which OS does this issue occur?
   
   [OS: Linux]
   
   ### What is the version of your OS?
   
   Ubuntu 20.04
   
   ### NuttX Version
   
   master
   
   ### Issue Architecture
   
   [Arch: all]
   
   ### Issue Area
   
   [Area: Testing]
   
   ### Host information
   
     Environment
     - Board/config: boards/risc-v/qemu-rv/rv-virt/configs/knsh_romfs, running 
on QEMU
     - CONFIG_USEC_PER_TICK changed from the board's default (1000) back to the 
Kconfig default 10000
   
   
   ### Verification
   
   - [x] I have verified before submitting the report.


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

Reply via email to