HighResWallClockTimer assert can fail on MacOS (Debug mode)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- performance
Research direction
Start with src/include/stir/HighResWallClockTimer.h around lines 252–272 and inspect the stop implementation, especially the microSecs type and the m_Secs assertion. Use the linked GitHub Actions failure and gettimeofday documentation to assess the type mismatch versus a backwards clock adjustment. Done means the MacOS debug timing path no longer triggers the assertion while preserving the reported elapsed time.
Written by the indexing model from the issue text.
Description
for the first time ever, a job failed on this
https://github.com/UCL/STIR/actions/runs/3152842139/jobs/5128571067#step:8:22350
Assertion failed: (m_Secs >= 0), function stop, file /Users/runner/work/STIR/STIR/src/include/stir/HighResWallClockTimer.h, line 271
Relevant code is
https://github.com/UCL/STIR/blob/4142d5969e4320e32ed9dbe463b0fd50f36fb3f6/src/include/stir/HighResWallClockTimer.h#L252-L272
There seems to be 2 possible causes (see gettimeofday man page:
microSecsuses the wrong type (it should besuseconds_t, notint)- GHA runs a time service that adjusted its time backwards (unlikely)
Previous timings in that job are of the order of 0.006473s.
- Dominant language
- C++
- Stars
- 160
- Forks
- 113
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from UCL/STIR
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·