Skip to content
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

segfault reading DepsLog #1722

Open
fergald opened this issue Jan 23, 2020 · 2 comments
Open

segfault reading DepsLog #1722

fergald opened this issue Jan 23, 2020 · 2 comments
Labels

Comments

@fergald
Copy link

fergald commented Jan 23, 2020

I hit this building chrome. That's v1.8.2. Here's gdb stack trace is below. This is also the second time I've hit this (in about 2 years of regularly building chrome)

Sadly I tried to repro with 1.9.0 and it said something like "deps log signative or version is invalid or corrupt, starting over". So I don't know if this impacts 1.9.0 and now I've lost the relevant files.

I'm curious if 1.9.0 is just able to detect this problem and not crash or whether moving from 1.8.2 to 1.9.0 would always start over like that on files generated by 1.8.2. If it's the former, then maybe chrome should upgrade, if it's the latter then maybe this bug exists in 1.9.0 also.

#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff76b88ad in __GI_abort () at abort.c:79
#2 0x00007ffff7ebd7bd in __gnu_debug::_Error_formatter::_M_error (
this=0x5555556074c0 <__gnu_debug::_Error_formatter::_M_at(char const*, unsigned int)::__formatter>)
at ../../../../../src/libstdc++-v3/src/c++11/debug.cc:1069
#3 0x0000555555565161 in std::__debug::vector<Node*, std::allocator<Node*> >::operator[] (this=0x7fffffffd178, __n=18446744071562078796)
at /usr/include/c++/8/debug/vector:417
#4 0x000055555559085a in DepsLog::Load (this=0x7fffffffd168,
path=".ninja_deps", state=0x7fffffffcf18, err=0x7fffffffcdb0)
at src/deps_log.cc:228
#5 0x0000555555561935 in (anonymous namespace)::NinjaMain::OpenDepsLog (
this=0x7fffffffcf00, recompact_only=false) at src/ninja.cc:921
#6 0x00005555555628e8 in (anonymous namespace)::real_main (argc=1,
argv=0x7fffffffd3a8) at src/ninja.cc:1178
#7 0x0000555555562b13 in main (argc=5, argv=0x7fffffffd388)
at src/ninja.cc:1226

@fergald
Copy link
Author

fergald commented Jan 23, 2020

I suspect the trigger for this was running 2 ninjas at the same time. Not something you're supposed to do but also would be nice if it could recover.

@jhasse jhasse added the bug label Jan 23, 2020
@lorenzhs
Copy link

Just encountered this with version 1.10.0, too. Also caused by accidentally running two ninjas simultaneously. Deleting .ninja_deps gets it running again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants