Crash when running ninja on my build in archlinux
Author: jcelerierCreated Sep 15, 2026Updated Sep 15, 2026
When running on archlinux with the latest ninja version available there:
ninja --version
1.13.2/usr/include/c++/15.2.1/bits/stl_vector.h:1263: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = Node*; _Alloc = std::allocator<Node*>; reference = Node*&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at pthread_kill.c:44
#1 __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at pthread_kill.c:100
#3 0x00007ffff7844d48 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff78257c1 in __GI_abort () at abort.c:77
#5 0x00007ffff7c9e059 in std::__glibcxx_assert_fail (file=<optimized out>, line=<optimized out>, function=<optimized out>, condition=<optimized out>)
at ../../../../../gcc/libstdc++-v3/src/c++11/assert_fail.cc:41
#6 0x000055555555c239 in std::vector<Node*, std::allocator<Node*> >::operator[] () at /usr/include/c++/15.2.1/bits/stl_vector.h:1263
#7 DepsLog::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, State*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) [clone .constprop.0] () at /usr/src/debug/ninja/ninja-1.13.2/src/deps_log.cc:223
#8 0x0000555555568c67 in OpenDepsLog () at /usr/src/debug/ninja/ninja-1.13.2/src/ninja.cc:1496
#9 0x0000555555574cb7 in real_main () at /usr/src/debug/ninja/ninja-1.13.2/src/ninja.cc:1845
#10 0x0000555555560aaf in main () at /usr/src/debug/ninja/ninja-1.13.2/src/ninja.cc:1895I have an archive of my source /build tree but it's a few gigabytes, otherwise here's all the ninja-relevant files:
Source: ninja-build/ninja