question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incomplete cleanup in scheduler leading to bugs

See original GitHub issue

The test that caused the error was added in ktbarrett/cocotb@d589303f9ae8cca17789b21b597e4bec66cf80bf. The failure can be observed by running the failing test and at least one other test after it.

cd tests/test_cases/test_cocotb
make MODULE=test_concurrency_primitives COCOTB_SCHEDULER_DEBUG=1 TESTCASE="test_exceptions_forked_late,test_exceptions_first"

sim.log

You can see from the log that the coroutine test_exceptions_forked_late.<locals>.await_later that was scheduled in the first test was not cleaned up and fires in the second test and causes it to fail.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ktbarrettcommented, Apr 24, 2020

@eric-wieser Did you check the log from the OP? You can see a couroutine from the first test is still being scheduled during the second test (line 59). After the Timer returns it reschedules that coroutine where it awaits on the outcome from raise_soon, which is stored.

0reactions
ktbarrettcommented, Dec 9, 2021

The correct solution is to not use fork, but prefer start_soon instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bugs fixed in each 19.0.0.0.0 Release Update and ... - ANBOB
This document lists the non-security important bugs( NOT ALL bug fixes) ... 31071080, INCREASE WAIT IN RMON TO ENSURE ORPHAN CLEANUP WHEN ...
Read more >
[New scheduler] Fix new scheduler bug by kisuke95 · Pull Request ...
I've run scripts/format.sh to lint the changes in this PR. · Testing Strategy. Unit tests; Release tests; This PR is not tested (please...
Read more >
MySQL bugs fixed by Aurora MySQL database engine updates
The following sections identify MySQL bugs that have been fixed by Aurora MySQL ... Fixed an issue which can lead to a failure...
Read more >
process - Is it feasible to track or measure the cause of bugs or is this ...
If too many bugs is a big problem, then management and lead programmers ... High bug rates can be a symptom of a...
Read more >
730169 – postgresql generated core file is incomplete
This is unrelated to GDB, this is a kernel core file producer bug. ... In the unmodified schedule, you'll only see concurrent core...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found