# 'mismatching index ID for us’ on almost every restart (again)

**URL:** https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036
**Category:** Support
**Created:** [December 18, 2020, 2:39pm UTC](https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036 "2020-12-18T14:39:21Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![terry](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/b9e5f3/32.png) [@terry](https://forum.syncthing.net/u/terry)
#### Post date: [December 18, 2020, 2:39pm UTC](https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036/1 "2020-12-18T14:39:21Z")

</div>

Same issue as [https://github.com/syncthing/syncthing/issues/7051](https://github.com/syncthing/syncthing/issues/7051) / ['has mismatching index ID for us' on almost every restart](https://forum.syncthing.net/t/has-mismatching-index-id-for-us-on-almost-every-restart/15767/3)

1.12.1 RC1

I can send a log, but I need to send a sanitized one, however every folder seems to be saying the same thing

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [December 18, 2020, 3:06pm UTC](https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036/2 "2020-12-18T15:06:54Z")

</div>

I don’t see this on my devices and in the log you sent me there’s no repetition of a device+folder-ID, i.e. no indication that it does happen repetitively.

When do you see this happening?

---

<div class="post-metadata">

### Author: ![terry](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/b9e5f3/32.png) [@terry](https://forum.syncthing.net/u/terry)
#### Post date: [December 18, 2020, 3:18pm UTC](https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036/3 "2020-12-18T15:18:50Z")

</div>

Each time I restart. I will PM you an updated log which shows that each time I restart a new index is requested

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [December 18, 2020, 4:03pm UTC](https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036/4 "2020-12-18T16:03:52Z")

</div>

Are you running an odd docker setup or something where the database isn’t persisted over restarts?

---

<div class="post-metadata">

### Author: ![terry](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/b9e5f3/32.png) [@terry](https://forum.syncthing.net/u/terry)
#### Post date: [December 18, 2020, 4:18pm UTC](https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036/5 "2020-12-18T16:18:52Z")

</div>

Pure windows setup via synctray. It’s on it’s own dedicated PC, no 3rd party AV. DB on an SSD.

---

<div class="post-metadata">

### Author: ![terry](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/b9e5f3/32.png) [@terry](https://forum.syncthing.net/u/terry)
#### Post date: [December 18, 2020, 4:22pm UTC](https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036/6 "2020-12-18T16:22:40Z")

</div>

apparently I had a panic - (panic-20201218-151345.reported), but that could be due to me restarting St is short succession

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [December 18, 2020, 6:01pm UTC](https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036/7 "2020-12-18T18:01:07Z")

</div>

What is the panic?

Tow consecutive mismatches for the same device & folder combo:

```
129:[RTF25] 14:24:38 INFO: Device DWJVRMJ-... folder "A" (a) has mismatching index ID for us (0xA0175C8807ED7CBB != 0x42C01C3C03087F58)
[...]
566:[RTF25] 15:10:32 INFO: Device DWJVRMJ-... folder "A" (a) has mismatching index ID for us (0x42C01C3C03087F58 != 0x6F4E1206A392035F)

```

So the remote adjusts to the new id (sends it in the second exchange), but we locally already have a new one.

I don’t see anything out of the ordinary in between, that would explain it.

I think the way we get a new local index ID is racy, but that’s the case since forever and being a race, shouldn’t cause such consistent problems:  
Both on sending and receiving a CC, we call `fset.IndexID(protocol.LocalDevice)` and in the beginning (no index id), both will create a new one. If both operations get a snapshot with en empty id, they will get two new, different index IDs.

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [December 18, 2020, 6:40pm UTC](https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036/8 "2020-12-18T18:40:16Z")

</div>

@terry Would you be willing to test a binary from CI if I apply the fix for the race to v1.12.1-rc.1? On master: [lib/db: Prevent IndexID creation race by imsodin · Pull Request #7211 · syncthing/syncthing · GitHub](https://github.com/syncthing/syncthing/pull/7211) Not saying this is definitely the solution at all, but would like to know anyway 🙂

---

<div class="post-metadata">

### Author: ![imsodin](https://forum.syncthing.net/user_avatar/forum.syncthing.net/imsodin/32/3317_2.png) [@imsodin](https://forum.syncthing.net/u/imsodin)
#### Post date: [December 18, 2020, 8:54pm UTC](https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036/9 "2020-12-18T20:54:09Z")

</div>

Actually no need to test anything, the new log has the solution:

```
[RTF25] 14:24:34 INFO: Reinitializing delta index IDs

```

Nothing wrong with Syncthing, just `-reset-deltas`.

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [January 17, 2021, 8:54pm UTC](https://forum.syncthing.net/t/mismatching-index-id-for-us-on-almost-every-restart-again/16036/10 "2021-01-17T20:54:14Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
