Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[BUG] testing/sched/timerjitter: unexpected results under normal usage

Aperta
#3,634 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
c

Direzione di ricerca

Inizia individuando il punto di ingresso apps/testing/sched/timerjitter e riproducendo i tre casi su QEMU RISC-V con gli argomenti mostrati: nessun argomento, 100 5 e 10000 10. Traccia come vengono calcolati e stampati le iterazioni, i frame persi e gli estremi del jitter. Il lavoro è completato quando le esecuzioni riportate terminano in modo affidabile, evitano valori NaN non validi o valori con wraparound e preservano risultati significativi sulla latenza.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Type: Bug
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

  1. avg: nan with default args
  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?

  1. Very large missed-frame counts, one run did not finish
  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:

  nsh> timerjitter 100 5
  time frame missed 1
  ...
  time frame missQEMU: Terminated
  1. Negative jitter shown as a huge unsigned value
  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
  • I have verified before submitting the report.
Lingua principale
C
Stelle
465
Fork
782
Merge medio
3g 5h
PR unite (30g)
36

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/nuttx-apps

Tutte le issue di apache/nuttx-apps

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.