Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix timer overflow #10368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

Conversation

htl5241
Copy link
Contributor

@htl5241 htl5241 commented Jun 5, 2025

拉取/合并请求描述:(PR description)

[

为什么提交这份PR (why to submit this PR)

你的解决方案是什么 (what is your solution)

请提供验证的bsp和config (provide the config and bsp)

  • BSP:
  • .config:
  • action:

]

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/workflows/bsp_buildings.yml 详细请参考链接BSP自查

@github-actions github-actions bot added the Kernel PR has src relate code label Jun 5, 2025
@htl5241
Copy link
Contributor Author

htl5241 commented Jun 5, 2025

 \ | /
- RT -     Thread Operating System
 / | \     5.2.1 build Jun  5 2025 15:13:36
 2006 - 2024 Copyright by RT-Thread team
lwIP-2.2.1 initialized!
[D/24cxx] at24cxx init succeed!

[I/SFUD] Found a EON flash chip. Size is 16777216 bytes.
[I/SFUD] norflash0 flash device initialized successfully.
[I/SFUD] Probe SPI flash norflash0 by SPI device spi1_0 success.
[I/sal.skt] Socket Abstraction Layer initialize success.
[I/utest] utest is initialize success.
[I/utest] total utest testcase num: (32)
[I/SFUD] Filesystem initialized!
msh />
[I/utest] [==========] [ utest    ] loop 1/1
[I/utest] [==========] [ utest    ] started
[I/utest] [----------] [ testcase ] (utest.uassert) started
[I/utest] [==========] utest unit name: (TC_uassert_true_false)
[I/utest] [==========] utest unit name: (TC_uassert_null_not_null)
[I/utest] [==========] utest unit name: (TC_uassert_int_op)
[I/utest] [==========] utest unit name: (TC_uassert_float_op)
[I/utest] [==========] utest unit name: (TC_uassert_ptr_op)
[I/utest] [==========] utest unit name: (TC_uassert_str_op)
[I/utest] [==========] utest unit name: (TC_uassert_in_range)
[I/utest] [  PASSED  ] [ result   ] testcase (utest.uassert)
[I/utest] [----------] [ testcase ] (utest.uassert) finished
[I/utest] [----------] [ testcase ] (testcases.drivers.ipc.rt_completion.basic) started
[I/utest] Summary:
        Test times: 60s(60000)
[I/drv.emac] link up
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.drivers.ipc.rt_completion.basic)
[I/utest] [----------] [ testcase ] (testcases.drivers.ipc.rt_completion.basic) finished
[I/utest] [----------] [ testcase ] (testcases.drivers.ipc.rt_completion.timeout) started
[I/utest] Summary:
        Test times: 60s(60000 times)
        Async interruption count: 991

[I/utest] [  PASSED  ] [ result   ] testcase (testcases.drivers.ipc.rt_completion.timeout)
[I/utest] [----------] [ testcase ] (testcases.drivers.ipc.rt_completion.timeout) finished
[I/utest] [----------] [ testcase ] (components.drivers.ipc.workqueue_tc) started
[I/utest] [==========] utest unit name: (do_work_test)
[I/utest] [==========] utest unit name: (do_delay_work_test)
[I/utest] [==========] utest unit name: (cancle_work_test01)
[I/utest] [==========] utest unit name: (cancle_work_test02)
[I/utest] [==========] utest unit name: (cancle_work_test03)
[I/utest] [==========] utest unit name: (cancle_work_test04)
[I/utest] [==========] utest unit name: (cancle_delay_work_test01)
[I/utest] [==========] utest unit name: (repeat_work_test01)
[I/utest] [==========] utest unit name: (repeat_work_test02)
[I/utest] [==========] utest unit name: (repeat_work_test03)
work_flag:1
work_flag:2
work_flag:3
work_flag:4
work_flag:5
work_flag:6
work_flag:7
work_flag:8
work_flag:9
work_flag:10
work_flag:11
work_flag:12
work_flag:13
work_flag:14
work_flag:15
work_flag:16
work_flag:17
work_flag:18
work_flag:19
work_flag:20
[I/utest] [==========] utest unit name: (repeat_delay_work_test01)
[I/utest] [==========] utest unit name: (repeat_delay_work_test02)
[I/utest] [==========] utest unit name: (cancel_all_work_test)
[I/utest] [  PASSED  ] [ result   ] testcase (components.drivers.ipc.workqueue_tc)
[I/utest] [----------] [ testcase ] (components.drivers.ipc.workqueue_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.atomic_tc) started
[I/utest] [==========] utest unit name: (test_atomic_api)
[I/utest] [==========] utest unit name: (test_atomic_add)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.atomic_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.atomic_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.device.find) started
[I/utest] [==========] utest unit name: (test_rt_device_find)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.device.find)
[I/utest] [----------] [ testcase ] (testcases.kernel.device.find) finished
[I/utest] [----------] [ testcase ] (src.ipc.event_tc) started
[I/utest] [==========] utest unit name: (test_event_init)
[I/utest] [==========] utest unit name: (test_event_detach)
[I/utest] [==========] utest unit name: (test_static_event_send_recv)
[I/utest] [==========] utest unit name: (test_event_create)
[I/utest] [==========] utest unit name: (test_event_delete)
[I/utest] [==========] utest unit name: (test_dynamic_event_send_recv)
[I/utest] [  PASSED  ] [ result   ] testcase (src.ipc.event_tc)
[I/utest] [----------] [ testcase ] (src.ipc.event_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.hooklist_tc) started
[I/utest] [==========] utest unit name: (hooklist_test)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.hooklist_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.hooklist_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.irq_tc) started
[I/utest] [==========] utest unit name: (irq_test)
[I/utest] [==========] utest unit name: (interrupt_test)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.irq_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.irq_tc) finished
[I/utest] [----------] [ testcase ] (src.ipc.mailbox_tc) started
[I/utest] [==========] utest unit name: (test_mailbox_init)
[I/utest] [==========] utest unit name: (test_mailbox_deatch)
[I/utest] [==========] utest unit name: (test_mailbox_create)
[I/utest] [==========] utest unit name: (test_mailbox_delete)
[I/utest] [==========] utest unit name: (test_static_mailbox_send_recv)
[I/utest] [==========] utest unit name: (test_dynamic_mailbox_send_recv)
[I/utest] [  PASSED  ] [ result   ] testcase (src.ipc.mailbox_tc)
[I/utest] [----------] [ testcase ] (src.ipc.mailbox_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.mem_tc) started
[I/utest] [==========] utest unit name: (mem_functional_test)
[I/utest] [==========] utest unit name: (mem_alloc_test)
#####################[I/utest] [==========] utest unit name: (mem_realloc_test)
#####################[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.mem_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.mem_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.memheap_tc) started
[I/utest] [==========] utest unit name: (memheap_test)
>>>>>>>>>>test OK!
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.memheap_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.memheap_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.messagequeue_tc) started
[I/utest] [==========] utest unit name: (test_mq_init)
[I/utest] [==========] utest unit name: (test_mq_create)
[I/utest] [==========] utest unit name: (test_mq_testcase)
msg_prio = 4
msg_prio = 3
msg_prio = 1
msg_prio = 1
msg_prio = 0
msg_prio = 4
msg_prio = 3
msg_prio = 1
msg_prio = 1
msg_prio = 0
[I/utest] [==========] utest unit name: (test_mq_detach)
[I/utest] [==========] utest unit name: (test_mq_delete)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.messagequeue_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.messagequeue_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.mtsafe_kprint) started
[I/utest] [==========] utest unit name: (mtsafe_kprint_tc)
TTTTTThhThTThhTThhTTThTTiisshihhiiiisshhhihh  isiiss  iiisiiiis ss  i iisss si sss i iss iss   si s   isi t sthst hrthtrhssshtsrree htreherae   rh aaddtrhearda dtttert  h0rerade0 h0rhhaeh0xe2aaed axxe2arrdarx0d0 da 0d20d0 022000020a002x02 x20002 00dx0d000020020x200x22 2x 2002x002000000200000002022000000x2002x0
         0002
200000       0000000TT0

 18
0TThT0hh
2s82    i0
 303
Ti  85
6 shhhsiTT  Tih
 03
   isi0
       0i hsT
This ihT
ss  iiThiTsthhr ss0
isihsTsh rei
              is   iaisedsssT  st tiihii atd    hihtrhhssissh r00tttiseraer  s  exxhhhs daeitsh tia22rreer t daih0 dhardsr  00  00asrx0 e  0tet022xxd2  e2x0axh2rahx112000xta02xd0e0adr2dd02210hd002 2d  0e0440d0r2e 200010xx2104 00xd122402 1
2d0200011x4T    dd
20i4        h
0a0 0x4420T011
 1T
00 2hb2hTfhTsi
227hs0T22i
          s000ii0sTs
                      i3feaT b


Thih0ish T00
ithh Tsi6

ish0ri s

ssTitsThT stih ri eiTT  hiiihi hsesa iashhtss  sistr dtsh d iihti sis hei rteh issrh st  tras0arde0s  erhtrhihe3e ra t20 000tssdaaatdhed0h0xx223h   dd r0ea xr0205raett0  xadd 02e2000a 0x0a302
0da02000000 330adrher20x2xxh0i220830 ae0x2022s11x02
               2200i8800
1 d0 T20ffT1188         11s001
 8xh220i118T8h6i06t
                   h60sf0x f66h6s
 iT
 i040i0hTshT0ir
thsiT
     ha22
s
 T s0  s i iiTTd
                 0hxTe40t
0a eiasahtshi 2t2        hihsThsisshii2heebri htir s  ss0 0i002eshsr et it i2s2s
i r sehtr hT0s    i
              hetrh
 tdi
    sTstaTaehrdha hh  0tdhdTdriesa rdirixhr r h e d0exa ses2e0exa0i0ai 2d0 0 a 0a2d0 xsxds0002xxtdi0d002x2 2  x 10e230022r0 1030221s0xh081133ext3x81338 22r0088a0d2h82080t
00
ra
  0T30dhTT1
0          0Tihh002r
 e
s 02s0ae  20hiTTii
0 20abihsxih i2bTd1
0x0 sisc  00h0cd02200sT ssit0h2

 2ts
02TThhTihh i e4a4i0
ss  ih d tr 2      24isrsh ieistTdh 0s4x0i iistsas hi0sx
             0a
0ihses  0TThhes2h0r0ti0t
00ade0axa0st 000x0ees thraiherd 4a0 2trtahxTsi sae t4d1hdrehdr2hi sida0h0 4ear e0i s dx 2r
 22h0d1 rtx22d0 x  a
rx 213s230       20d ihesaTr20000dxT 000 dheia008x0 2h0i02x8t sd  0202200s2 x120h0i0sx21
      83800et3a2h080T082000 082
h                              10208d0r00
3c22iT3
       b3
         00 h1
T             3203iTsThT bhft0
fsiiihhs8r
          e
  20as0  hsiissTshTT0 0aidsx8ei2si stihh

rid             0
    ti sx0T2i0Th
aa s2s0add 0r teehsiri esT  s0 0s2hs Tesa ta hitt2 3t3i 0hdthhrdtishh5har5sixi reea hs rr0e
Ti 0 x 0xeihad   a0d
 e01ddh0rx s   0sd xh tT0i2s00x2asr 00x2ithh2 0t2x20d ex2200shri1h1rd200 ta000 resde4002210hd022iesaa 4a001dd4x
0x
  102T42 x
          dh40e00t
a0xr2b1TThhaT06i0 h
T00s
ch0i s ii00aTsidhh23
          c 0ss0s 00T0hd0
sxi                      2si
T02 i02
2si20sssh0t hi0x4 hiiit2 sth2
t T r0e2htrs22s  i2is0
dad  tahd          2it2h brrei20tsb ahshhTaae0aeas5
       0hesi
at esa   dTT0r
              00 hhxeee
                       Ti2aaadhids iTxx0ihs0ddd r 0sh22xsi 0   00xetx i00200 si200x220ah2ts02012i s1xx0002dr0h he0ri104 0tst40014x02a2esd

T0hT4  0
ahrh h a4Tdt0eth
   e0i00xcTi0r
              er0a2Tcss
Thsxaded0h0 i20         200
i 8t68i hi00xx2d0s44hsT 2d  0a
                 x
                  s6iT0hTsiss02200 2s h0

0ii02se0tihs rtr2022TTx0 he aisitsteb2ebhh20irds   sh h00e

axr tehe
  es0e200d 200erds  s02TT T h00ahrde0ixs 24hhtixs20dre a2 0ti0eiih 002 ea0d0hs4 e0ssri2004xadx 2rt0h
                T0x4ae
0 0hxi024ddih tdha    ai Tsat4
3x2 22            00s0 s000  iTh r0e
 a0sra303a20ia8xxt hihexdT
h0atsd0 00s0i13t          h0T02sc022rse ia2 ich21 0
 30e 2 s8i
    a0hd21 rTi01x82s
10hexaTisx60thi0T    2
 Trs             h82h 0ist2
 t 1d 02e0
0         2hh04Tshh  ir24iardeix02T0i0sxiseffs as200h0 2s atd66 0d 0
s2s0 0Tth00
Trx
   20
t      0t9i9hTT2hhirhe0s00t0s0 0rhh0seiasa0 2xh
esi0s0    T2rde40ae
00                 a
e 200xt t0 0   a0i2TThhi1d03d0dx  s 0s0iissse
00220rreer0h0 tst h2t22iisTi02ax00hhh0t0s hsi
3aertacechhie0     r
di d1003 hd   T0rrsa200281dTad0ah
00Ti 00x31
h2      2 dxb
  0xs0i t20Th20

0s0 ihi020tid2ie0r0
2ass04s04x04ti r 2ii0xss222hTs 000sa22ss  it440rh x2440eii24 di 44  sh400

4hst he4TTd t2h00t0
h20ethadd0ii0sa0   0rr9Teachh ir9e4
sx d
h    T
 20haxriedeix
0d 0x i h0h0hase as20sTihsT0t2Te 0i
t0ddx            0tx0i2T2ist hi2r0idh2r0xs3h0sirses3e2s e0a22 0i0  attd 0a3 0dx 30tcs2hhrr icd0i200x00h0 3eeaa0
 h020es 2a
3  000xx0eT0 r
            xi2Ts22
2aT0dh2 h 66002xt  f0
020r20hf s0rheissh01it0hTii
e2aa03i80 2aTdhs t
                  h00s2d27 0xi2 50i irT
2saxsises6hxi280s                      h 3i5T03ai
r0h                2st00   a T0h
 eiti

eiih4d4 2 hr0t  it4T2a0sth  ss2
a                  4si0tex4hraxhsh4r0aT ss42000red2r e
ed 0eh00hsi ssii
               s
xa2d0ii0irarderax20   2d 03aedrxTTxsst htt0 0xa 00e2hh2 trhehhe0x2
213221ii8rdixs2 d  0 202000ss0s2 eT ae0000210x2  1t3hah0da
20si s0xx200      313s308s 0e  Tih00018820020 t
2tt22
  2T
      0
       hx
 ia20h2iihes800s0221T00ehe0x0ThTri80ah8i
2idd3sa0 id
 2
   T7hTs0s 0a04Tsis t
 sh0 0e00            hr0eT4ih x i020h s xahdi0sit2sx22b
ssx
   i0T hTr2t2
deaadr03thtsi s  0s t 0200isiiheh0rc tht20s ssiaice0ihrreh32 t  si ds0a
  deT  ac0hrhtrh 0i
h                  s 0da00Treertx2 0thx0

2s2  22a0d2202 0xhxr2ri2TT2x 2idd dr2e0a0es0hh00s0   0 e2d2a2d 0ii02t0hx0x0a2 2 20i2ss22r2e0x2xd200x
00t2Tii2sa2 2000x2 0
da3033a          005020200h8232022rae0Ths 0
  it
0   08ahT2hT8a0is  th
 203hTii06xsihrre
2i dh i b0       aaahs0 esaTd3e
0
  t0s02
i      0
0Tx x
s0

rhirsia0itThhTT rTi2s0i0T ti2i1sihhteh 0s2 0hihsd si iihaii1tdh2isr 4si sssrdss4r0e1s et0t ht  e
ihdr      h0xsr
    e0
0202xs2xt2ha22 d0h a2se a aeheth 00itd0td0daiahitx0sh 0h x dsdr esh22 r02r2e020  0a dir02iex2a2dx0x0ix s0 e02sa
h0f0fs2 010h11ax020x0T202 00rd20t 221hfib00t00e b02

rdxT0hTe2b1bias
T30tf3ea5f00shd01f iaa00
h               22 i 1hT8
a0e080s9hrcii0ec8 6c00xT9i 00s
x2ei
    id2hsi0s TTxs  i
ththhi2h T          s
           00rthx00
3T2s               202
     rsi ei T0ehirs0
                    0T1tshi sTi2ae 23dhh4shai htis3dai0ci0sic rdshsr  0 dsc
s 0he0 xtaiscx hhr
eaad0h st00x12 dh hir2d 2i 00satsT
f0iT ehar  x2exhe  i rtsd00r0 htr
2                a0hdi2ar2sTi0 es002de 2ed22 hsi x0a x0a00x0a 00tsi s2xdt22
ah0rs 020h2a302302h
3T52002 r5         iex0s
        it10686h0T01sdhh820e0
ih9  0Trrc02a
a 0          dsicxe036
ssh20002a
    0
     x 40
iT        e
 iii0s2rt 0e3i2s0i0s0h s4r2s0 xh
af 02s2i si3drtehh xs eisah T
hc 0tcttsh0xx i0si0440is 0ss  4 ardeTsd0t4i2s3  itc0 a0dh
h2xT2h s2r         x00hr
 r 0e
     art
  hd0222000dx00stit0h2deeeha0022ih0 hsr0 aaard00si2s0ii ee0dd  de ee  eiasstaax00xx a0aais0
000x 0 e0        h2

      x220thha0isd2212002x3
e asi rte22                5eTs 3355aT502aharhT  00c0hc200rdeihitshx00

s00TchT9
0       6x hTisra00
sii02h d7
0ii 0T hh
ti s  id0 i h0sx 0000 hisisa2d stdh i22
0hed4e0a2          0si 0ss00xstr2i0s00h tT  ttx42 he0 2t40rihhhh2r000tra2h4r4

as4r4 eddtaTT eda 4
0aa040 e a0si h x  ce  hhirdihsTd002
x0dxT  hirsx02  02sti00eddx02
x2es0 00x0sth r0s0b1T2x 2hisse 2100x2hbi0200i  atdi02
02t1101ird0t1h3    e0i0Ts2222 hexa2 2020
  1h33r3808se 0T2hr8
06Tid0 e            03e00a6

3d 2s
      0h 0ft0TThhTx6ia
i 3                   d
s0eTihs xhcrx si s0
 ise0it0           0xitiT h2s0e2si s 2 20shir0
      ss a2 dT0htrhs4h0
   i0r0e2s             2 d1iit 1t h2i2eTr 4r7s0 sh07h0s7 0ahet0e0t rx0rxi0diasdh
      e
       r000TahT0
 2               tsaT xddehd2
 20b a2022x0220 arde02dsThbree0ir0x0 a0dx0  hi0a0d2se02xx 200
              2s xi20Tb0000bx st i
fb1bsst0                          sed820820T2hi 20s h0210f
    212f0sfe h0
 fatr2tT2h0
T8          i0fideh rTa3hi0s b
  08edrah 0esT2t0h0
0d0ahx4d i4r
            e
0s 0 i0s h   T2hT0 is8acdhsT
          i02ix0ss
xtx2 hs2x 4 iis2Tti
 tth0irtis2 7tds20ts0rTT0ie 02i4s0s 0hh hhi2sai00
 exh               hr22rhe2sehsr  0Th  03c0era3 aeiasi0hr0t0ca0ded0idd st

 0c
0   aa sT0s0hTT0htrh d2rxd
0220hx2hhrr 222 2h2eei00a2x0htih0ssi0aasd x0d022sr e0  s0d t0h22 002iasd2ii 2 xr2e020202  2ssi200a02x22222t02
r2e00eet00hbx0f022T202222
dar22            00ah0
0T eh0a0is
  h

   0d4 0cTd hT a0 d8si s
                         20i0x T2000itT3i4s

shixe h0 iTThx02
  sh0i0
       tii0
ir s st    202riTeis hThss3 ds2T00hasd  tihi i4s0 1h20r tthhhsisi
 02d2  di sts h r0rreeeTi i e at0s22axaaddahsistdh
r0ai             e
22i002t0harex0x eiaa2dT 200ixs220srthd0 0 ht0x0 00x ehr020ihsr
2                  d020dae ed2a2s 0e0es022Tr0axd 000 020 b22he2 00
heebi8s 32003a0d2i8 d2x082r2e0hb
t2200fhf           000000 xa2T2
        bx e2bi
               s
ai200a00 a
          dhh20Ti0
 r                4s

  teh
hT42hi0 2T0aiss
siissh2si      iTxi 0hTih

di T0hs i0s4e  s is0 0a s 2t
 a0rdehsiit r s1Tt0 hix hxtrs2ttsee 0hh a ehrrtdtair2hai0eeh h0sear0r
022020ae0asia2da ad sd0  d0d t  e00 x 0ht0axx020xrhx020x0x2er2
22a      000a2xd2e002a20002d02  0000002e0e0a20020xe
eaa2000e0e
ea000
   a

00aa0
02

e0

a0
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.mtsafe_kprint)
[I/utest] [----------] [ testcase ] (testcases.kernel.mtsafe_kprint) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.mutex_pi_tc) started
[I/utest] [==========] utest unit name: (test_mutex_pi)
[I/utest] [==========] utest unit name: (test_mutex_pi_recursive_prio_update)
[I/utest] [==========] utest unit name: (test_mutex_pi_timeout)
[I/utest] [==========] utest unit name: (test_mutex_pi_wakeup_mutex_waiter)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.mutex_pi_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.mutex_pi_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.mutex_tc) started
[I/utest] [==========] utest unit name: (test_static_mutex_init)
[I/utest] [==========] utest unit name: (test_static_mutex_take)
[I/utest] [==========] utest unit name: (test_static_mutex_release)
[I/utest] [==========] utest unit name: (test_static_mutex_trytake)
[I/utest] [==========] utest unit name: (test_static_pri_reverse)
[I/utest] [==========] utest unit name: (test_dynamic_mutex_create)
[I/utest] [==========] utest unit name: (test_dynamic_mutex_take)
[I/utest] [==========] utest unit name: (test_dynamic_mutex_release)
[I/utest] [==========] utest unit name: (test_dynamic_mutex_trytake)
[I/utest] [==========] utest unit name: (test_dynamic_pri_reverse)
[I/utest] [==========] utest unit name: (test_recurse_lock)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.mutex_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.mutex_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.scheduler.mutex) started
[I/utest] [==========] utest unit name: (mutex_stress_tc)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.scheduler.mutex)
[I/utest] [----------] [ testcase ] (testcases.kernel.scheduler.mutex) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.scheduler.sem) started
[I/utest] Setup environment...
[I/utest] [==========] utest unit name: (scheduler_tc)
[I/utest] Test starts...
[I/utest] 56 threads startup...
**00**00**00**00**00**00**00**00**00**00**00**00**00**00**00
**00**00**00**00**00**00**00**00**00**00**00**00**00**00**00
**00**00**00**00**00**00**00**00**00**00**00**00**00**00**00
**00**00**00**00**00**00**00**00**00**00**00**00**00**00**00
**00**00**00**00**00**00**00**00**00**00**00**00**00**00**00
**00**00**00**00**00**00**00**00**00**00**00**00**00**00**00
**00**00**00**00**00**00**00**00**00**00**00**00**00**00**00
**00**00**00**00**00**00**00**00**00**00**00**00**00**00**00
**00**00**00**00**00**00**00**00**00**00**00**00**00**00**00
**00**00**00**00**00**00**00**00**00**00**00**00**00**00**00
**00**00**00**00**00**00**00**00**00**008960
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.scheduler.sem)
[I/utest] [----------] [ testcase ] (testcases.kernel.scheduler.sem) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.scheduler.thread) started
[I/utest] [==========] utest unit name: (scheduler_tc)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.scheduler.thread)
[I/utest] [----------] [ testcase ] (testcases.kernel.scheduler.thread) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.scheduler.timed_mtx) started
[I/utest] [==========] utest unit name: (timed_mtx_tc)
[I/utest] Total failed times: 2025(in 10000)

[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.scheduler.timed_mtx)
[I/utest] [----------] [ testcase ] (testcases.kernel.scheduler.timed_mtx) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.scheduler.timed_sem) started
[I/utest] [==========] utest unit name: (timed_sem_tc)
[I/utest] Total failed times: 364(in 10000)

[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.scheduler.timed_sem)
[I/utest] [----------] [ testcase ] (testcases.kernel.scheduler.timed_sem) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.semaphore_tc) started
[I/utest] [==========] utest unit name: (test_static_semaphore_init)
[I/utest] [==========] utest unit name: (test_static_semaphore_take)
[I/utest] [==========] utest unit name: (test_static_semaphore_release)
[I/utest] [==========] utest unit name: (test_static_semaphore_detach)
[I/utest] [==========] utest unit name: (test_static_semaphore_trytake)
[I/utest] [==========] utest unit name: (test_static_semaphore_control)
[I/utest] [==========] utest unit name: (test_static_semaphore_release_isr)
[I/utest] [==========] utest unit name: (test_dynamic_semaphore_create)
[I/utest] [==========] utest unit name: (test_dynamic_semaphore_take)
[I/utest] [==========] utest unit name: (test_dynamic_semaphore_release)
[I/utest] [==========] utest unit name: (test_dynamic_semaphore_delete)
[I/utest] [==========] utest unit name: (test_dynamic_semaphore_trytake)
[I/utest] [==========] utest unit name: (test_dynamic_semaphore_control)
[I/utest] [==========] utest unit name: (test_dynamic_semaphore_release_isr)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.semaphore_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.semaphore_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.signal_tc) started
[I/utest] [==========] utest unit name: (rt_signal_install_test)
[I/utest] [==========] utest unit name: (rt_signal_mask_test)
[I/utest] [==========] utest unit name: (rt_signal_unmask_test)
[I/utest] [==========] utest unit name: (rt_signal_kill_test)
[I/utest] [==========] utest unit name: (rt_signal_wait_test)
[I/utest] received signal 30
[I/utest] [==========] utest unit name: (rt_signal_wait_test2)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.signal_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.signal_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.thread_tc) started
[I/utest] [==========] utest unit name: (test_static_thread)
[I/utest] [==========] utest unit name: (test_dynamic_thread)
[I/utest] [==========] utest unit name: (test_thread_delay)
[I/utest] [==========] utest unit name: (test_idle_hook)
[I/utest] [==========] utest unit name: (test_thread_yield)
[I/utest] [==========] utest unit name: (test_thread_yield_nosmp)
[I/utest] [==========] utest unit name: (test_thread_control)
[I/utest] [==========] utest unit name: (test_thread_priority)
[I/utest] [==========] utest unit name: (test_delay_until)
delta[100] -> 100
delta[200] -> 200
delta[300] -> 300
delta[50] -> 50
delta[20] -> 20
delta[10] -> 10
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.thread_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.thread_tc) finished
[I/utest] [----------] [ testcase ] (testcases.kernel.timer_tc) started
[I/utest] [==========] utest unit name: (test_static_timer)
[I/utest] Testing on 725
[I/utest] [==========] utest unit name: (test_static_timer_control)
[I/utest] Testing on 727
[I/utest] [==========] utest unit name: (test_static_timer_start_twice)
[I/utest] Testing on 729
[I/utest] [==========] utest unit name: (test_static_timer_op_in_callback)
[I/utest] Testing on 731
[I/utest] [==========] utest unit name: (test_dynamic_timer)
[I/utest] Testing on 734
[I/utest] [==========] utest unit name: (test_dynamic_timer_control)
[I/utest] Testing on 736
[I/utest] [==========] utest unit name: (test_dynamic_timer_start_twice)
[I/utest] Testing on 738
[I/utest] [==========] utest unit name: (test_dynamic_timer_op_in_callback)
[I/utest] Testing on 740
[I/utest] [==========] utest unit name: (test_timer_stress)
[I/utest] timer stress test begin, it will take 180 seconds
[I/utest] Testing on 295572
[I/utest] Testing on 296573
[I/utest] Testing on 297574
[I/utest] Testing on 298575
[I/utest] Testing on 299576
[I/utest] Testing on 300577
[I/utest] Testing on 301578
[I/utest] Testing on 302579
[I/utest] Testing on 303580
[I/utest] Testing on 304581
[I/utest] Testing on 305582
[I/utest] Testing on 306583
[I/utest] Testing on 307584
[I/utest] Testing on 308585
[I/utest] Testing on 309586
[I/utest] Testing on 310587
[I/utest] Testing on 311588
[I/utest] Testing on 312589
[I/utest] Testing on 313590
[I/utest] Testing on 314591
[I/utest] Testing on 315592
[I/utest] Testing on 316593
[I/utest] Testing on 317594
[I/utest] Testing on 318595
[I/utest] Testing on 319596
[I/utest] Testing on 320597
[I/utest] Testing on 321598
[I/utest] Testing on 322599
[I/utest] Testing on 323600
[I/utest] Testing on 324601
[I/utest] Testing on 325602
[I/utest] Testing on 326603
[I/utest] Testing on 327604
[I/utest] Testing on 328605
[I/utest] Testing on 329606
[I/utest] Testing on 330607
[I/utest] Testing on 331608
[I/utest] Testing on 332609
[I/utest] Testing on 333610
[I/utest] Testing on 334611
[I/utest] Testing on 335612
[I/utest] Testing on 336613
[I/utest] Testing on 337614
[I/utest] Testing on 338615
[I/utest] Testing on 339616
[I/utest] Testing on 340617
[I/utest] Testing on 341618
[I/utest] Testing on 342619
[I/utest] Testing on 343620
[I/utest] Testing on 344621
[I/utest] Testing on 345622
[I/utest] Testing on 346623
[I/utest] Testing on 347624
[I/utest] Testing on 348625
[I/utest] Testing on 349626
[I/utest] Testing on 350627
[I/utest] Testing on 351628
[I/utest] Testing on 352629
[I/utest] Testing on 353630
[I/utest] Testing on 355576
[I/utest] Testing on 356577
[I/utest] Testing on 357578
[I/utest] Testing on 358579
[I/utest] Testing on 359580
[I/utest] Testing on 360581
[I/utest] Testing on 361582
[I/utest] Testing on 362583
[I/utest] Testing on 363584
[I/utest] Testing on 364585
[I/utest] Testing on 365586
[I/utest] Testing on 366587
[I/utest] Testing on 367588
[I/utest] Testing on 368589
[I/utest] Testing on 369590
[I/utest] Testing on 370591
[I/utest] Testing on 371592
[I/utest] Testing on 372593
[I/utest] Testing on 373594
[I/utest] Testing on 374595
[I/utest] Testing on 375596
[I/utest] Testing on 376597
[I/utest] Testing on 377598
[I/utest] Testing on 378599
[I/utest] Testing on 379600
[I/utest] Testing on 380601
[I/utest] Testing on 381602
[I/utest] Testing on 382603
[I/utest] Testing on 383604
[I/utest] Testing on 384605
[I/utest] Testing on 385606
[I/utest] Testing on 386607
[I/utest] Testing on 387608
[I/utest] Testing on 388609
[I/utest] Testing on 389610
[I/utest] Testing on 390611
[I/utest] Testing on 391612
[I/utest] Testing on 392613
[I/utest] Testing on 393614
[I/utest] Testing on 394615
[I/utest] Testing on 395616
[I/utest] Testing on 396617
[I/utest] Testing on 397618
[I/utest] Testing on 398619
[I/utest] Testing on 399620
[I/utest] Testing on 400621
[I/utest] Testing on 401622
[I/utest] Testing on 402623
[I/utest] Testing on 403624
[I/utest] Testing on 404625
[I/utest] Testing on 405626
[I/utest] Testing on 406627
[I/utest] Testing on 407628
[I/utest] Testing on 408629
[I/utest] Testing on 409630
[I/utest] Testing on 410631
[I/utest] Testing on 411632
[I/utest] Testing on 412633
[I/utest] Testing on 413634
[I/utest] Testing on 415579
[I/utest] Testing on 416580
[I/utest] Testing on 417581
[I/utest] Testing on 418582
[I/utest] Testing on 419583
[I/utest] Testing on 420584
[I/utest] Testing on 421585
[I/utest] Testing on 422586
[I/utest] Testing on 423587
[I/utest] Testing on 424588
[I/utest] Testing on 425589
[I/utest] Testing on 426590
[I/utest] Testing on 427591
[I/utest] Testing on 428592
[I/utest] Testing on 429593
[I/utest] Testing on 430594
[I/utest] Testing on 431595
[I/utest] Testing on 432596
[I/utest] Testing on 433597
[I/utest] Testing on 434598
[I/utest] Testing on 435599
[I/utest] Testing on 436600
[I/utest] Testing on 437601
[I/utest] Testing on 438602
[I/utest] Testing on 439603
[I/utest] Testing on 440604
[I/utest] Testing on 441605
[I/utest] Testing on 442606
[I/utest] Testing on 443607
[I/utest] Testing on 444608
[I/utest] Testing on 445609
[I/utest] Testing on 446610
[I/utest] Testing on 447611
[I/utest] Testing on 448612
[I/utest] Testing on 449613
[I/utest] Testing on 450614
[I/utest] Testing on 451615
[I/utest] Testing on 452616
[I/utest] Testing on 453617
[I/utest] Testing on 454618
[I/utest] Testing on 455619
[I/utest] Testing on 456620
[I/utest] Testing on 457621
[I/utest] Testing on 458622
[I/utest] Testing on 459623
[I/utest] Testing on 460624
[I/utest] Testing on 461625
[I/utest] Testing on 462626
[I/utest] Testing on 463627
[I/utest] Testing on 464628
[I/utest] Testing on 465629
[I/utest] Testing on 466630
[I/utest] Testing on 467631
[I/utest] Testing on 468632
[I/utest] Testing on 469633
[I/utest] Testing on 470634
[I/utest] Testing on 471635
[I/utest] Testing on 472636
[I/utest] Testing on 473637
[I/utest] success after 265322 iterations
[I/utest] Testing on 743
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.kernel.timer_tc)
[I/utest] [----------] [ testcase ] (testcases.kernel.timer_tc) finished
[I/utest] [----------] [ testcase ] (testcases.utest.pass_tc) started
[I/utest] [==========] utest unit name: (test_assert_pass)
[I/utest] [  PASSED  ] [ result   ] testcase (testcases.utest.pass_tc)
[I/utest] [----------] [ testcase ] (testcases.utest.pass_tc) finished
[I/utest] [----------] [ testcase ] (klibc.rt_memcmp) started
[I/utest] [==========] utest unit name: (TC_rt_memcmp_str)
[I/utest] [==========] utest unit name: (TC_rt_memcmp_int_array)
[I/utest] [==========] utest unit name: (TC_rt_memcmp_float_array)
[I/utest] [==========] utest unit name: (TC_rt_memcmp_struct_array)
[I/utest] [==========] utest unit name: (TC_rt_memcmp_mixed_array)
[I/utest] [==========] utest unit name: (TC_rt_memcmp_nested_struct_array)
[I/utest] [==========] utest unit name: (TC_rt_memcmp_partial_match)
[I/utest] [==========] utest unit name: (TC_rt_memcmp_large_array)
[I/utest] [  PASSED  ] [ result   ] testcase (klibc.rt_memcmp)
[I/utest] [----------] [ testcase ] (klibc.rt_memcmp) finished
[I/utest] [----------] [ testcase ] (klibc.rt_memcpy) started
[I/utest] [==========] utest unit name: (TC_rt_memcpy_str)
[I/utest] [==========] utest unit name: (TC_rt_memcpy_align)
[I/utest] [  PASSED  ] [ result   ] testcase (klibc.rt_memcpy)
[I/utest] [----------] [ testcase ] (klibc.rt_memcpy) finished
[I/utest] [----------] [ testcase ] (klibc.rt_memmove) started
[I/utest] [==========] utest unit name: (TC_rt_memmove_basic)
[I/utest] [==========] utest unit name: (TC_rt_memmove_overlap_src_before)
[I/utest] [==========] utest unit name: (TC_rt_memmove_overlap_src_after)
[I/utest] [==========] utest unit name: (TC_rt_memmove_zero_length)
[I/utest] [==========] utest unit name: (TC_rt_memmove_same_location)
[I/utest] [==========] utest unit name: (TC_rt_memmove_null_src)
[I/utest] [==========] utest unit name: (TC_rt_memmove_null_dest)
[I/utest] [==========] utest unit name: (TC_rt_memmove_too_long)
[I/utest] [==========] utest unit name: (TC_rt_memmove_empty_string)
[I/utest] [  PASSED  ] [ result   ] testcase (klibc.rt_memmove)
[I/utest] [----------] [ testcase ] (klibc.rt_memmove) finished
[I/utest] [----------] [ testcase ] (klibc.rt_memset) started
[I/utest] [==========] utest unit name: (TC_rt_memcpy_align)
[I/utest] [==========] utest unit name: (TC_rt_memcpy_input)
[I/utest] [  PASSED  ] [ result   ] testcase (klibc.rt_memset)
[I/utest] [----------] [ testcase ] (klibc.rt_memset) finished
[I/utest] [----------] [ testcase ] (klibc.rt_sprintf) started
[I/utest] [==========] utest unit name: (TC_space_flag)
[I/utest] [==========] utest unit name: (TC_space_flag__non_standard_format)
[I/utest] [==========] utest unit name: (TC_plus_flag)
[I/utest] [==========] utest unit name: (TC_plus_flag__non_standard_format)
[I/utest] [==========] utest unit name: (TC_zero_flag)
[I/utest] [==========] utest unit name: (TC_minus_flag)
[I/utest] [==========] utest unit name: (TC_minus_flag_and_non_standard_zero_modifier_for_integers)
[I/utest] [==========] utest unit name: (TC_sharp_flag)
[I/utest] [==========] utest unit name: (TC_sharp_flag__non_standard_format)
[I/utest] [==========] utest unit name: (TC_specifier)
[I/utest] [==========] utest unit name: (TC_width)
[I/utest] [==========] utest unit name: (TC_width_20)
[I/utest] [==========] utest unit name: (TC_width_asterisk_20)
[I/utest] [==========] utest unit name: (TC_width_minus_20)
[I/utest] [==========] utest unit name: (TC_width_0_minus_20)
[I/utest] [==========] utest unit name: (TC_padding_20)
[I/utest] [==========] utest unit name: (TC_padding_dot_20)
[I/utest] [==========] utest unit name: (TC_padding_sharp_020__non_standard_format)
[I/utest] [==========] utest unit name: (TC_padding_sharp_020)
[I/utest] [==========] utest unit name: (TC_padding_sharp_20__non_standard_format)
[I/utest] [==========] utest unit name: (TC_padding_sharp_20)
[I/utest] [==========] utest unit name: (TC_padding_20_point_5)
[I/utest] [==========] utest unit name: (TC_padding_negative_numbers)
[I/utest] [==========] utest unit name: (TC_integer_types)
[I/utest] [==========] utest unit name: (TC_types__non_standard_format)
[I/utest] [==========] utest unit name: (TC_pointer)
[I/utest] [==========] utest unit name: (TC_string_length)
[I/utest] [==========] utest unit name: (TC_misc)
[I/utest] [  PASSED  ] [ result   ] testcase (klibc.rt_sprintf)
[I/utest] [----------] [ testcase ] (klibc.rt_sprintf) finished
[I/utest] [----------] [ testcase ] (klibc.rt_sscanf) started
[I/utest] [==========] utest unit name: (TC_rt_sscanf_char)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_basic_int)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_basic_float)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_basic_string)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_string_with_space)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_basic_char)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_hex_1)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_hex_2)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_oct_1)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_oct_2)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_multiple_args)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_pointer)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_width_specifier)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_suppression)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_match_set)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_match_set_negated)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_match_set_range)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_whitespace_skip)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_unsigned_int)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_long_long_int)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_short_int)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_null_string)
[I/utest] [==========] utest unit name: (TC_rt_sscanf_issue_9853)
[I/utest] [  PASSED  ] [ result   ] testcase (klibc.rt_sscanf)
[I/utest] [----------] [ testcase ] (klibc.rt_sscanf) finished
[I/utest] [==========] [ utest    ] 32 tests from 32 testcase ran.
[I/utest] [  PASSED  ] [ result   ] 32 tests.
[I/utest] [==========] [ utest    ] finished

测试全部通过

@htl5241
Copy link
Contributor Author

htl5241 commented Jun 5, 2025

@Rbb666 review 一下

@htl5241
Copy link
Contributor Author

htl5241 commented Jun 5, 2025

@Guozhanxin 帮review 一下

@aozima
Copy link
Member

aozima commented Jun 5, 2025

  1. 点个赞,作者这几天也是拼了。不过这个PR不会关了吧,有更新不要关闭原有PR,而是继续在后面更新。如果必要可以加入PR辅导群。
  2. 能对这个BUG的触发原理和修复方案做个详细说明吗?比如tick达到多少后,再延迟多少个tick能复现问题,方便其它人复现问题并验证修复的有效性。
  3. 这类PR合并没那么快,耐心等下,不要急。

@htl5241
Copy link
Contributor Author

htl5241 commented Jun 5, 2025

  1. 点个赞,作者这几天也是拼了。不过这个PR不会关了吧,有更新不要关闭原有PR,而是继续在后面更新。如果必要可以加入PR辅导群。
  2. 能对这个BUG的触发原理和修复方案做个详细说明吗?比如tick达到多少后,再延迟多少个tick能复现问题,方便其它人复现问题并验证修复的有效性。
  3. 这类PR合并没那么快,耐心等下,不要急。

没事了,有一个小bug修复了

@htl5241
Copy link
Contributor Author

htl5241 commented Jun 5, 2025

  1. 点个赞,作者这几天也是拼了。不过这个PR不会关了吧,有更新不要关闭原有PR,而是继续在后面更新。如果必要可以加入PR辅导群。
  2. 能对这个BUG的触发原理和修复方案做个详细说明吗?比如tick达到多少后,再延迟多少个tick能复现问题,方便其它人复现问题并验证修复的有效性。
  3. 这类PR合并没那么快,耐心等下,不要急。

跑一圈比如说32位跑满了溢出变0这时在比较就会出错,这个线程有可能睡死,工业设备不关机,这个线程睡死了也就只能重启。

src/timer.c Outdated
@@ -22,6 +22,8 @@
* 2023-09-15 xqyjlj perf rt_hw_interrupt_disable/enable
* 2024-01-25 Shell add RT_TIMER_FLAG_THREAD_TIMER for timer to sync with sched
* 2024-05-01 wdfk-prog The rt_timer_check and _soft_timer_check functions are merged
* 2025-06-01 htl5241 remove redundancy
* fix timer overflow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块注释需要写到同一行

src/ipc.c Outdated
@@ -46,6 +46,8 @@
* 2022-10-16 Bernard add prioceiling feature in mutex
* 2023-04-16 Xin-zheqi redesigen queue recv and send function return real message size
* 2023-09-15 xqyjlj perf rt_hw_interrupt_disable/enable
* 2025-06-01 htl5241 fix timer overflow
*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余的换行请删除

@Rbb666
Copy link
Member

Rbb666 commented Jun 9, 2025

@htl5241 Ci有几个格式问题,请调整下

image

@fengmuyou
Copy link
Contributor

  1. 点个赞,作者这几天也是拼了。不过这个PR不会关了吧,有更新不要关闭原有PR,而是继续在后面更新。如果必要可以加入PR辅导群。
  2. 能对这个BUG的触发原理和修复方案做个详细说明吗?比如tick达到多少后,再延迟多少个tick能复现问题,方便其它人复现问题并验证修复的有效性。
  3. 这类PR合并没那么快,耐心等下,不要急。

跑一圈比如说32位跑满了溢出变0这时在比较就会出错,这个线程有可能睡死,工业设备不关机,这个线程睡死了也就只能重启。

你好,有具体线程睡死的示例吗,我这边测试溢出也能正常跑,不太好复现这个问题

@htl5241
Copy link
Contributor Author

htl5241 commented Jun 10, 2025

  1. 点个赞,作者这几天也是拼了。不过这个PR不会关了吧,有更新不要关闭原有PR,而是继续在后面更新。如果必要可以加入PR辅导群。
  2. 能对这个BUG的触发原理和修复方案做个详细说明吗?比如tick达到多少后,再延迟多少个tick能复现问题,方便其它人复现问题并验证修复的有效性。
  3. 这类PR合并没那么快,耐心等下,不要急。

跑一圈比如说32位跑满了溢出变0这时在比较就会出错,这个线程有可能睡死,工业设备不关机,这个线程睡死了也就只能重启。

你好,有具体线程睡死的示例吗,我这边测试溢出也能正常跑,不太好复现这个问题

rt_tick_set(RT_TICK_MAX-1);

rt_timer_t timer = rt_timer_create(
    "timer_test", timer_event,
    RT_NULL, 1, RT_TIMER_FLAG_PERIODIC | RT_TIMER_FLAG_SOFT_TIMER);

rt_timer_start(timer);

rt_tick_set(RT_TICK_MAX);   

这个软定时器就不会在没调起,直接睡死。
其他的及其难触发,因为没被睡眠时 正好在tick末尾才能触发。

@htl5241
Copy link
Contributor Author

htl5241 commented Jun 10, 2025

  1. 点个赞,作者这几天也是拼了。不过这个PR不会关了吧,有更新不要关闭原有PR,而是继续在后面更新。如果必要可以加入PR辅导群。
  2. 能对这个BUG的触发原理和修复方案做个详细说明吗?比如tick达到多少后,再延迟多少个tick能复现问题,方便其它人复现问题并验证修复的有效性。
  3. 这类PR合并没那么快,耐心等下,不要急。

跑一圈比如说32位跑满了溢出变0这时在比较就会出错,这个线程有可能睡死,工业设备不关机,这个线程睡死了也就只能重启。

你好,有具体线程睡死的示例吗,我这边测试溢出也能正常跑,不太好复现这个问题

这些补丁就是逻辑补丁,很难触发,不能说不被触发。

@fengmuyou
Copy link
Contributor

  1. 点个赞,作者这几天也是拼了。不过这个PR不会关了吧,有更新不要关闭原有PR,而是继续在后面更新。如果必要可以加入PR辅导群。
  2. 能对这个BUG的触发原理和修复方案做个详细说明吗?比如tick达到多少后,再延迟多少个tick能复现问题,方便其它人复现问题并验证修复的有效性。
  3. 这类PR合并没那么快,耐心等下,不要急。

跑一圈比如说32位跑满了溢出变0这时在比较就会出错,这个线程有可能睡死,工业设备不关机,这个线程睡死了也就只能重启。

你好,有具体线程睡死的示例吗,我这边测试溢出也能正常跑,不太好复现这个问题

这些补丁就是逻辑补丁,很难触发,不能说不被触发。

ok,我先复现试着看一下

@htl5241
Copy link
Contributor Author

htl5241 commented Jun 10, 2025

  1. 点个赞,作者这几天也是拼了。不过这个PR不会关了吧,有更新不要关闭原有PR,而是继续在后面更新。如果必要可以加入PR辅导群。
  2. 能对这个BUG的触发原理和修复方案做个详细说明吗?比如tick达到多少后,再延迟多少个tick能复现问题,方便其它人复现问题并验证修复的有效性。
  3. 这类PR合并没那么快,耐心等下,不要急。

跑一圈比如说32位跑满了溢出变0这时在比较就会出错,这个线程有可能睡死,工业设备不关机,这个线程睡死了也就只能重启。

你好,有具体线程睡死的示例吗,我这边测试溢出也能正常跑,不太好复现这个问题

这些补丁就是逻辑补丁,很难触发,不能说不被触发。

ok,我先复现试着看一下

  1. 点个赞,作者这几天也是拼了。不过这个PR不会关了吧,有更新不要关闭原有PR,而是继续在后面更新。如果必要可以加入PR辅导群。
  2. 能对这个BUG的触发原理和修复方案做个详细说明吗?比如tick达到多少后,再延迟多少个tick能复现问题,方便其它人复现问题并验证修复的有效性。
  3. 这类PR合并没那么快,耐心等下,不要急。

跑一圈比如说32位跑满了溢出变0这时在比较就会出错,这个线程有可能睡死,工业设备不关机,这个线程睡死了也就只能重启。

你好,有具体线程睡死的示例吗,我这边测试溢出也能正常跑,不太好复现这个问题

这些补丁就是逻辑补丁,很难触发,不能说不被触发。

ok,我先复现试着看一下

其他的修改在多核时稍微容易触发点,我之前优化 删除冗余rt_schedule 这个调用时就发现smp 下就会出问题,也就是多核有可能不挂起线程进入我修改的分支正好在溢出时这个线程就会出问题。

Copy link

📌 Code Review Assignment

🏷️ Tag: kernel

Path: src
Reviewers: @GorrayLi

Changed Files (Click to expand)
  • src/ipc.c
  • src/mempool.c
  • src/timer.c

📊 Current Review Status (Last Updated: 2025-06-10 11:27 UTC)


📝 Review Instructions

  1. 维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态
    Maintainers can refresh the review status by clicking here: 🔄 Refresh Status

  2. 确认审核通过后评论 LGTM/lgtm
    Comment LGTM/lgtm after confirming approval

  3. PR合并前需至少一位维护者确认
    PR must be confirmed by at least one maintainer before merging

ℹ️ 刷新CI状态操作需要具备仓库写入权限。
ℹ️ Refresh CI status operation requires repository Write permission.

@htl5241 htl5241 closed this Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kernel PR has src relate code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.