Skip to content

[BUG REPORT] 内核时间子系统调用有误 #816

@BrahmaMantra

Description

@BrahmaMantra

描述错误
测试程序在相邻两行调用Instant::now(),误差会来到9k s左右

请填写您的电脑的信息:

  • 操作系统及版本:Ubuntu 22.04
  • DragonOS版本:236e88d
  • DADK版本:dadk 0.1.11
  • Rust版本:rustc 1.80.0-nightly (faefc618c 2024-05-07)

重现步骤
重现行为的步骤:

  1. 编写用户测试程序:https://github.com/BrahmaMantra/DragonOS/tree/my_test/user/apps/test_time
    2.运行用户测试程序
    3.发现错误(多次测试发现,图片左右两边秒数相差稳定在8k-10k之间,且似乎处于两个不同的单调时钟),在循环里sleep 20ms(取消测试程序的注释)则不会触发bug

期望行为
两次调用Instant::now()时间相差很小。(由于bug触发过于稳定,有可能是暴力循环调度引发的越界问题?)

屏幕截图
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug-report这是一个bug报告(如果确认是一个bug,请管理人员添加`bug` label)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions