Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#3,634 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
c

調査の方向性

まず apps/testing/sched/timerjitter のエントリポイントを見つけ、示されている引数(引数なし、100 5、10000 10)で QEMU RISC-V 上の3つのケースを再現します。反復回数、欠落したフレーム、ジッターの極値がどのように計算され、出力されるかを追跡します。報告された実行が確実に完了し、無効な NaN やラップアラウンドした値を避け、意味のあるレイテンシ結果を維持できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
C
スター
465
フォーク
782
平均マージ
3日 5時間
マージ済み PR(30日)
36

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/nuttx-apps のほかの issue

apache/nuttx-apps の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。