-
Notifications
You must be signed in to change notification settings - Fork 61
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
Jemalloc assertion that time goes backwards #249
Comments
Pinning QEMU to a single CPU didn't help here so it is not related to QEMU using different counts across CPUs. I think the issue here might be (if I understand sys/mips/tick.c correctly) that the timer is only 32 bits. It seems like all it does is read the low 32 bits of the count register (https://github.com/CTSRD-CHERI/cheribsd/blob/master/sys/mips/mips/tick.c#L205). |
This should hopefully address CTSRD-CHERI/cheribsd#249. At the very least the test_cp0_wait.py now actually waits exactly 1 second if CP0_Compare gets set to CP0_Count + 50 million.
…econds) FreeBSD writes 0xffffffff when it is not waiting for a timer which could previously cause a very early timer interrupt if the wrapped CP0_count was close to UINT32_MAX. This is not a correct fix for CTSRD-CHERI/cheribsd#249, but at least I can now actually get beyond the reading symbols phase in GDB.
This should hopefully address CTSRD-CHERI/cheribsd#249. At the very least the test_cp0_wait.py now actually waits exactly 1 second if CP0_Compare gets set to CP0_Count + 50 million.
…econds) FreeBSD writes 0xffffffff when it is not waiting for a timer which could previously cause a very early timer interrupt if the wrapped CP0_count was close to UINT32_MAX. This is not a correct fix for CTSRD-CHERI/cheribsd#249, but at least I can now actually get beyond the reading symbols phase in GDB.
Closing this since with workaround I added to QEMU (CTSRD-CHERI/qemu@fd6f754) I can now run gdb without this assertion triggering. |
Seems like the workaround is not sufficient: Just saw this when running the testsuite (in
|
Worked around in 52ec185. |
FWIW, it's breaking MIPS runs on FreeBSD CI: https://ci.freebsd.org/job/FreeBSD-head-mips64-test/14/console. Would it make sense to upstream it, or perhaps add as a port-local patch? |
Or we fix CLOCK_MONOTONIC to not go backwards? Having QEMU's time go backwards is one thing, but having CLOCK_MONOTONIC go backwards as a result is another and a true FreeBSD bug. |
This sounds like time is going backwards again:
Probably related to
CTSRD-CHERI/qemu#44
CTSRD-CHERI/qemu#54
CTSRD-CHERI/qemu#55
The text was updated successfully, but these errors were encountered: