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

Crash on career load; .sfs corruption #2796

Closed
lpgagnon opened this issue Nov 25, 2020 · 4 comments
Closed

Crash on career load; .sfs corruption #2796

lpgagnon opened this issue Nov 25, 2020 · 4 comments

Comments

@lpgagnon
Copy link

F1124 18:56:34.254451 1076 push_deserializer_body.hpp:212] Check failed: compressor_->UncompressStream(&source, &sink)

First seen going from VAB to Flight scene; but then happens again when just loading the career from the main menu.
(that means reproducible, but no journal)

I don't recall doing anything out of the ordinary between last successful load and first crash.

E1124 09:37:33.311389   780 interface.cpp:711] Base address is 00007FFCB9DA0000
    @   00007FFCE4DB6360  	google::LogMessageFatal::~LogMessageFatal [0x00007FFCE4DB635F+47]
    @   00007FFCB9E06CB4  	(No symbol) [0x00007FFCB9E06CB3]
    @   00007FFCB9E32833  	(No symbol) [0x00007FFCB9E32832]
    @   00007FFCB9E0510A  	(No symbol) [0x00007FFCB9E05109]
    @   00007FFCD47EB753  	google::protobuf::OneofDescriptorProto::operator= [0x00007FFCD47EB752+1171612]
    @   00007FFCD47EA70F  	google::protobuf::OneofDescriptorProto::operator= [0x00007FFCD47EA70E+1167448]
    @   00007FFCD48B19CC  	google::protobuf::OneofDescriptorProto::operator= [0x00007FFCD48B19CB+1983253]
    @   00007FFCB7ED59B3  	principia::serialization::DiscreteTrajectory_Zfp::MergePartialFromCodedStream [0x00007FFCB7ED59B2+226]
    @   00007FFCB7ED52DB  	principia::serialization::DiscreteTrajectory::MergePartialFromCodedStream [0x00007FFCB7ED52DA+250]
    @   00007FFCB7E91933  	google::protobuf::Arena::CreateMaybeMessage<principia::serialization::Vessel> [0x00007FFCB7E91932+3938]
    @   00007FFCB7EA8A9F  	principia::serialization::Vessel::MergePartialFromCodedStream [0x00007FFCB7EA8A9E+814]
    @   00007FFCB7EA8432  	principia::serialization::Plugin_VesselAndProperties::MergePartialFromCodedStream [0x00007FFCB7EA8431+401]
    @   00007FFCB7EA7B4F  	principia::serialization::Plugin::MergePartialFromCodedStream [0x00007FFCB7EA7B4E+206]
    @   00007FFCD480538A  	google::protobuf::OneofDescriptorProto::operator= [0x00007FFCD4805389+1277139]
    @   00007FFCB9DFCC84  	(No symbol) [0x00007FFCB9DFCC83]
    @   00007FFCB9DE6612  	(No symbol) [0x00007FFCB9DE6611]
    @   00007FFD031D10B2  	beginthreadex [0x00007FFD031D10B1+321]
    @   00007FFD042A7C24  	BaseThreadInitThunk [0x00007FFD042A7C23+19]
    @   00007FFD0602D4D1  	RtlUserThreadStart [0x00007FFD0602D4D0+32]
F1124 18:56:34.254451  1076 push_deserializer_body.hpp:212] Check failed: compressor_->UncompressStream(&source, &sink) 

Logs for initial crash:
sfs-crash-1.zip

Subsequent crash:
sfs-crash-2.zip

I can upload offending .sfs as well if that would be useful

@pleroy
Copy link
Member

pleroy commented Nov 25, 2020

I guess I would be interested in getting the save. I don't think there is any hope of salvaging it (what with two levels of compression and protobuf encoding), but it might give us a clue as to what happened.

@pleroy
Copy link
Member

pleroy commented Nov 25, 2020

Decoded stack. Not unsurprisingly, it's telling us nothing interesting, gipfeli is unable to decompress a block.

CHECK(message_->ParseFromCodedStream(&decoder));
int* const size) {
if (position_ == bytes_.size) {
// We're at the end of the array. Obtain a new one.
bytes_ = on_empty_();
inline Array<std::uint8_t> PushDeserializer::Pull() {
Array<std::uint8_t> result;
{
absl::MutexLock l(&lock_);
auto const queue_has_elements = [this]() { return !queue_.empty(); };
lock_.Await(absl::Condition(&queue_has_elements));
// The front of |done_| is the callback for the |Array<std::uint8_t>| object
// that was just processed. Run it now.
CHECK(!done_.empty());
auto const done = done_.front();
if (done != nullptr) {
done();
}
done_.pop();
// Get the next |Array<std::uint8_t>| object to process and remove it from
// |queue_|. Uncompress it if needed.
auto const& front = queue_.front();
if (front.size == 0 || compressor_ == nullptr) {
result = front;
} else {
ArraySource<std::uint8_t> source(front);
ArraySink<std::uint8_t> sink(uncompressed_data_.get());
CHECK(compressor_->UncompressStream(&source, &sink));

@lpgagnon
Copy link
Author

save file
(60MB zipped)

Sorry, something went wrong.

@pleroy
Copy link
Member

pleroy commented Jan 19, 2021

I finally looked into this. The save has a record (#484) which is too short (base64 size = 30695, binary size = 23021). The Gipfeli decoder wants to get more bytes and dies. This happens in the timeline field of a DiscreteTrajectory.Zfp message.

I did the analysis to see if we were hitting some limit or overflowing a buffer or some such but it doesn't seem to be the case. Of course, there is no telling what happened during compression.

At this point I am going to blame cosmic particles and close the issue.

Sorry, something went wrong.

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

No branches or pull requests

2 participants