Since 0.14, lots of 'sync-conflict' files appearing

Running for around 30 minutes, so far so good. Just to check, would files shrinking also be an issue? That might explain the 0’s at the end of the files I was seeing?

Will run tests for the the next several hours and let you know.

Thank you BTW, it’s appreciated.

Hmm. Yes, shrinkage would cause that. Need to double check that case as well! Thanks.

No problem :slight_smile: Just had a failure, but I suspect that it’s shrinking that’s the cause.

However, it’s certainly not feeling like it’s happening as frequently, so is definitely an improvement.

Try this build when it’s completed: https://build.syncthing.net/job/syncthing-pr/2611/artifact/

It should be safer against modification-while-scanning and (for now) panic if an inconsistency slips through anyway so we can track it easier…

I’ve been running 3 different versions of my scripts for the past hour

-rw-r--r--   1 me  staff   4.9M 25 Jul 22:32 myfile
-rw-r--r--   1 me  staff   335K 25 Jul 22:32 myfile2
-rw-r--r--   1 me  staff     0B 25 Jul 22:32 myfile3
-rw-r--r--   1 me  staff   226K 25 Jul 22:32 myfile3.tmp

No conflicts, no visible errors.

Uptime   1h 8m
Version  v0.14.0+9-g77da5fc, Mac OS X (64

No panics. As an aside, if the code panics I expect it’ll restart automatically (e.g. launched as a service in OSX), so that is why I monitored the uptime.

Looks good!

Will leave my messy scripts running overnight.

Scripts ran without sync conflicts for the past 8 hours. That’s a fantastic improvement.

I noticed uptime for syncthing was only 4h 9m.

Checked the stderr log:

panic(0x681be0, 0xc8225da9b0)
    /usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/syncthing/syncthing/lib/scanner.hashFiles(0xc8201ef890, 0x2a, 0x20000, 0xc82162e120, 0xc820503560, 0x1077450, 0xc821cf2b80, 0xc82162e060)
    /home/buildslave/workspace/syncthing-pr/src/github.com/syncthing/syncthing/lib/scanner/blockqueue.go:101 +0x87b
github.com/syncthing/syncthing/lib/scanner.newParallelHasher.func1(0xc8201ef890, 0x2a, 0x20000, 0xc82162e120, 0xc820503560, 0x1077450, 0xc821cf2b80, 0xc82162e060, 0x1077478, 0xc8225da6c0)
    /home/buildslave/workspace/syncthing-pr/src/github.com/syncthing/syncthing/lib/scanner/blockqueue.go:28 +0x6a
created by github.com/syncthing/syncthing/lib/scanner.newParallelHasher
    /home/buildslave/workspace/syncthing-pr/src/github.com/syncthing/syncthing/lib/scanner/blockqueue.go:30 +0x16e

Checked stdout:

....
[KI3N7] 23:53:10 INFO: Completed initial scan (rw) of folder minime-temp
[KI3N7] 02:38:50 INFO: File{Name:"syncthingcheck/myfile3", Type:FILE, LocalVersion:0, Permissions:0644, Modified:1469497130, Version:{[{KI3N7UU 99}]}, Length:0, Deleted:false, Invalid:false, NoPermissions:false, Blocks:[Block{0/131072/eb48336b432608a8a9428adadc609967b554b7604d856a3f3505f8e1a509b18a} Block{131072/131072/2d8bda01d8da8938da26aee58d1dc0c245c5c48e7b29e7f734c5e0e5980fb2d3} Block{262144/131072/e228cb92df96761ce6c90326be4f4f5277bee8cc372463a3fdb31d14e01369db} Block{393216/131072/0e4e7ea99f88a356d4de91da1c3ec625fb4a33d329c5a7255cea5f8bf825d298} Block{524288/22264/ad0c34ce516e27b84284cc1ceaea71e22719fbe3f9481c0a043e70116a405c31}]}
[KI3N7] 02:38:51 INFO: syncthing v0.14.0+9-g77da5fc "Dysprosium Dragonfly" (go1.6.3 darwin-amd64) unknown-user@lx-buildslave.syncthing.net 2016-07-25 20:16:59 UTC
....

The script generating myfile3 is basically the same as my first script (with all instances of myfile changed to myfile3 and the following at the bottom of the loop:

    if [ $RANDOM -gt 32762 ]; then
        echo Truncating
        tail -n $RANDOM myfile3 > myfile3.tmp
        rm myfile3
        mv myfile3.tmp myfile3
    fi
    done

So both the scripts that just add seem fine, the one with a truncation step occasionally caused the panic.

Ah, I can see how that might happen. Thanks.

Congrats on 0.14.2; I really appreciate you taking a look and resolving the problem I was experiencing. Thank you.

Will let you know if I experience any other inconsistencies.

3 Likes

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