FATAL: update before replace for cid 2

I get this message on windows. What’s the problem here?

It’s a bug (condition that shouldn’t happen). Can you reproduce it with STTRACE=model,net,files?

(Technically, it’s getting a repository update message before it has the initial contents. That doesn’t make sense.)

Seems that i can’t reproduce it.

It’s probably a rare race condition. I’ve seen it myself.

I can reproduce it! On my NAS version 0.8.12 starts normally, but after populating repos, when try to connect to other nodes every time appears that error and Syncthing shuts down. No other output on console. What can I do to help you to understand the matter?

Ah, today tryed 0.8.13 on NAS and: “illegal instruction, (core dump)” and no way to start Syncthing!

This seems to be an effect of upgrading the Go compiler. Can you give this build a spin (I’m assuming linux/386 since that should be the affected build)?

https://nym.se/t/syncthing-linux-386-v0.8.13-5-g20a018d.tar.gz

I get this error with v0.8.13 on windows 64bit and arm…

So v0.8.13 is unusable?

Ehm… with 386 binary I have not trouble yet! :slight_smile: Only with ARM V5 binary on NAS! And 386 binary on ARM doesn’t work. Could you point me to an ARM V5 binary to try? Thank you.

I have trouble with ARM v7 and win 64

There is no fix for this issue (“update before replace for cid x”) to try, the binary above is just for the case that the 32 bit build crashed with “illegal instruction”.

For those of you who can reproduce it, the output from the command above would be useful in nailing it down.

Sure! Is the ARM V5 binary that crashes with “illegal instruction”! Linux I386 and AMD64 work great! I’ll try with strace, but don’t know if it’s installed on NAS OS!

Can you paste the full crash trace on that?

Edit: Actually, never mind, I think I know what the problem is. Try this one:

https://nym.se/t/syncthing-linux-armv5-v0.8.13-11-gb2f66cf.tar.gz

https://github.com/calmh/syncthing/issues/344 for the issue

Also the error “FATAL: update before replace for cid X” can be solved deleting repository indexes and rebuilding them. Today with 0.8.14 AMD64 Syncthing crashd! Deleting indexes and rebuilding restored functionality. No other kind of trace, only the error “cid 1”. This solved for me!

Yes, i get cid 2 with existing index files:

https://github.com/calmh/syncthing/issues/344#issuecomment-45589812

After deleting the index files i get “cid 1” error:

https://github.com/calmh/syncthing/issues/344#issuecomment-45594072

Wonderful! This new binary solved Illegal Instruction and also cid errors! It would be perfect if it would not have the same freeze if started on NAS before other nodes! As always restarting on NAS after other nodes solved any trouble, and all ok! Thank You!

with: syncthing v0.8.14-2-g4cfe303 (go1.3rc1 windows-amd64) i get now this:

[KFHXR] 12:02:47 FATAL: update before replace for cid 3

I created https://github.com/calmh/syncthing/issues/359 for this.

:frowning: Also ARM V5 binary today new “cid 2” error. Need to delete index files.

The index files should have nothing to do with it, really…

If possible I’d like to see those logs again with the latest build?

I added debug info here: https://github.com/calmh/syncthing/issues/359#issuecomment-45836778