Repository: pytorch
Issue: Got this error when just running my flask script
Labels: needs reproduction,module: internals,triaged

### 🐛 Describe the bug

Just made a virtual environment and when running my code. I relaunched the app and it continued normally. Got this on teh console and also wandering why it happened :

terminate called after throwing an instance of 'c10::Error'
  what():  fast_1 >= fast_0 INTERNAL ASSERT FAILED at "../c10/util/ApproximateClock.cpp":18, please report a bug to PyTorch. getCount is non-monotonic.
Exception raised from measurePair at ../c10/util/ApproximateClock.cpp:18 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x57 (0x7fc891f73897 in /home/genuis/Projects/godsEye/aeglios_venv/lib/python3.10/site-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x64 (0x7fc891f23b25 in /home/genuis/Projects/godsEye/aeglios_venv/lib/python3.10/site-packages/torch/lib/libc10.so)
frame #2: c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, char const*) + 0x43 (0x7fc891f71343 in /home/genuis/Projects/godsEye/aeglios_venv/lib/python3.10/site-packages/torch/lib/libc10.so)
frame #3: <unknown function> + 0x809ee (0x7fc891f6e9ee in /home/genuis/Projects/godsEye/aeglios_venv/lib/python3.10/site-packages/torch/lib/libc10.so)
frame #4: c10::ApproximateClockToUnixTimeConverter::measurePairs() + 0x2d (0x7fc891f6ea1d in /home/genuis/Projects/godsEye/aeglios_venv/lib/python3.10/site-packages/torch/lib/libc10.so)
frame #5: c10::ApproximateClockToUnixTimeConverter::ApproximateClockToUnixTimeConverter() + 0xc (0x7fc891f6ea4c in /home/genuis/Projects/godsEye/aeglios_venv/lib/python3.10/site-packages/torch/lib/libc10.so)
frame #6: <unknown function> + 0x28c09 (0x7fc893576c09 in /home/genuis/Projects/godsEye/aeglios_venv/lib/python3.10/site-packages/torch/lib/libc10_cuda.so)
frame #7: <unknown function> + 0x14d66 (0x7fc893562d66 in /home/genuis/Projects/godsEye/aeglios_venv/lib/python3.10/site-packages/torch/lib/libc10_cuda.so)
frame #8: <unknown function> + 0x647e (0x7fc8a258c47e in /lib64/ld-linux-x86-64.so.2)
frame #9: <unknown function> + 0x6568 (0x7fc8a258c568 in /lib64/ld-linux-x86-64.so.2)
frame #10: _dl_catch_exception + 0xe5 (0x7fc8a2174af5 in /lib/x86_64-linux-gnu/libc.so.6)
frame #11: <unknown function> + 0xdff6 (0x7fc8a2593ff6 in /lib64/ld-linux-x86-64.so.2)
frame #12: _dl_catch_exception + 0x88 (0x7fc8a2174a98 in /lib/x86_64-linux-gnu/libc.so.6)
frame #13: <unknown function> + 0xe34e (0x7fc8a259434e in /lib64/ld-linux-x86-64.so.2)
frame #14: <unknown function> + 0x9063c (0x7fc8a209063c in /lib/x86_64-linux-gnu/libc.so.6)
frame #15: _dl_catch_exception + 0x88 (0x7fc8a2174a98 in /lib/x86_64-linux-gnu/libc.so.6)
frame #16: _dl_catch_error + 0x33 (0x7fc8a2174b63 in /lib/x86_64-linux-gnu/libc.so.6)
frame #17: <unknown function> + 0x9012e (0x7fc8a209012e in /lib/x86_64-linux-gnu/libc.so.6)
frame #18: dlopen + 0x48 (0x7fc8a20906c8 in /lib/x86_64-linux-gnu/libc.so.6)
frame #19: <unknown function> + 0x2614fb (0x55672fdec4fb in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #20: <unknown function> + 0x25fa27 (0x55672fdeaa27 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #21: <unknown function> + 0x15ac59 (0x55672fce5c59 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #22: _PyEval_EvalFrameDefault + 0x2a27 (0x55672fcd05d7 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #23: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #24: _PyEval_EvalFrameDefault + 0x614a (0x55672fcd3cfa in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #25: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #26: _PyEval_EvalFrameDefault + 0x8ac (0x55672fcce45c in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #27: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #28: _PyEval_EvalFrameDefault + 0x6bd (0x55672fcce26d in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #29: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #30: _PyEval_EvalFrameDefault + 0x6bd (0x55672fcce26d in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #31: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #32: _PyEval_EvalFrameDefault + 0x6bd (0x55672fcce26d in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #33: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #34: <unknown function> + 0x159dc9 (0x55672fce4dc9 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #35: _PyObject_CallMethodIdObjArgs + 0xff (0x55672fdc57cf in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #36: PyImport_ImportModuleLevelObject + 0x4b3 (0x55672fcf97e3 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #37: _PyEval_EvalFrameDefault + 0x32f3 (0x55672fcd0ea3 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #38: <unknown function> + 0x13f9c6 (0x55672fcca9c6 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #39: PyEval_EvalCode + 0x86 (0x55672fdc0256 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #40: <unknown function> + 0x23ae2d (0x55672fdc5e2d in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #41: <unknown function> + 0x15ac59 (0x55672fce5c59 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #42: _PyEval_EvalFrameDefault + 0x2a27 (0x55672fcd05d7 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #43: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #44: _PyEval_EvalFrameDefault + 0x614a (0x55672fcd3cfa in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #45: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #46: _PyEval_EvalFrameDefault + 0x8ac (0x55672fcce45c in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #47: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #48: _PyEval_EvalFrameDefault + 0x6bd (0x55672fcce26d in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #49: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #50: _PyEval_EvalFrameDefault + 0x6bd (0x55672fcce26d in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #51: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #52: <unknown function> + 0x159dc9 (0x55672fce4dc9 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #53: _PyObject_CallMethodIdObjArgs + 0xff (0x55672fdc57cf in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #54: PyImport_ImportModuleLevelObject + 0x4b3 (0x55672fcf97e3 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #55: _PyEval_EvalFrameDefault + 0x32f3 (0x55672fcd0ea3 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #56: <unknown function> + 0x13f9c6 (0x55672fcca9c6 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #57: PyEval_EvalCode + 0x86 (0x55672fdc0256 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #58: <unknown function> + 0x23ae2d (0x55672fdc5e2d in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #59: <unknown function> + 0x15ac59 (0x55672fce5c59 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #60: _PyEval_EvalFrameDefault + 0x2a27 (0x55672fcd05d7 in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #61: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #62: _PyEval_EvalFrameDefault + 0x614a (0x55672fcd3cfa in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)
frame #63: _PyFunction_Vectorcall + 0x7c (0x55672fce59fc in /home/genuis/Projects/godsEye/aeglios_venv/bin/python3)


### Versions

Collecting environment information...
PyTorch version: 2.3.1+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.35

Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.5.0-14-generic-x86_64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      48 bits physical, 48 bits virtual
Byte Order:                         Little Endian
CPU(s):                             2
On-line CPU(s) list:                0,1
Vendor ID:                          AuthenticAMD
Model name:                         AMD A6-9225 RADEON R4, 5 COMPUTE CORES 2C+3G
CPU family:                         21
Model:                              112
Thread(s) per core:                 1
Core(s) per socket:                 2
Socket(s):                          1
Stepping:                           0
Frequency boost:                    enabled
CPU max MHz:                        2600.0000
CPU min MHz:                        1300.0000
BogoMIPS:                           5190.72
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good acc_power nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm perfctr_core perfctr_nb bpext ptsc mwaitx cpb hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 xsaveopt arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov
Virtualization:                     AMD-V
L1d cache:                          64 KiB (2 instances)
L1i cache:                          128 KiB (2 instances)
L2 cache:                           2 MiB (2 instances)
NUMA node(s):                       1
NUMA node0 CPU(s):                  0,1
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Mitigation; untrained return thunk; SMT disabled
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Retpolines, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] torch==2.3.1
[pip3] torchvision==0.18.1
[pip3] triton==2.3.1
[conda] Could not collect


cc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh