Bug 245369

Summary: <jemalloc>: jemalloc_arena.c:647: Failed assertion: "nstime_compare(&decay->epoch, &time) <= 0"
Product: Base System Reporter: Haocheng Zhang <stevenhaocheng>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: bugs, ypankov
Priority: --- Flags: stevenhaocheng: maintainer-feedback? (bugs)
Version: CURRENT   
Hardware: amd64   
OS: Any   

Description Haocheng Zhang 2020-04-05 10:40:50 UTC
Here's the issue: 
<jemalloc>: jemalloc_arena.c:647: Failed assertion: "nstime_compare(&decay->epoch, &time) <= 0"
Abort (core dumped)

I got this output many many times, and I'm really upset when I see this because it usually appears when my git clone almost ends/download almost finishes/cmake configuration almost finishes. This time, I got it when I was comfiguring llvm using cmake. I had to do that work again! And it costs time! This message will just randomly pop onto my screen when I am operating my disk ("quickly and vastly", i.e. git allocating space for ENORMOUS downloads like llvm-project, or unzip extracting a zip file that is several GiB big), regardless of the command I invoked. 

Notes:
Output of uname -a: 
http://mpuw-um9c5.byethost4.com/unamea.txt
cmake.core core dump (compressed with xz -z9ekvv cmake.core):
http://mpuw-um9c5.byethost4.com/cmake.core.xz
Comment 1 Haocheng Zhang 2020-04-06 13:38:54 UTC
Please help. I'm REALLY annoyed by this thing.
Comment 2 Yuri Pankov 2020-04-06 14:08:53 UTC
(disclaimer: just an uneducated guess)

Given the following comment in the code (contrib/jemalloc/src/nstime.c), it shows a bigger problem with your hardware:

646		/* Verify that time does not go backwards. */
647		assert(nstime_compare(&decay->epoch, &time) <= 0);

Check kern.timecounter.choice values, and try changing kern.timecounter.hardware to some of the other ones.
Comment 3 Haocheng Zhang 2020-04-07 13:28:53 UTC
(In reply to Yuri Pankov from comment #2)
THANKS! Fixed! At least until now I didn't get the error! Changed from HPET -> i8254.