drive icon indicating copy to clipboard operation
drive copied to clipboard

Can't push or pull: panic error

Open ale93p opened this issue 9 years ago • 4 comments

Hello everybody. I'm running drive in an Arch Linux machine and the drive folder is in the secondary ntfs hard-drive (I don't know if these information can be useful). I truly don't know how this software work so I'm asking for your help.

I'm trying to pull a new folder from my google drive but after running drive pull command I get the following error:

Proceed with the changes? [Y/n]:
 0 / 258545 [---------------------------------------------------------------------------------------------------]   0.00%
panic: assertion failed: write: circular dependency occurred

goroutine 101 [running]:
panic(0x8a7a20, 0xc42040a3c0)
	/usr/lib/go/src/runtime/panic.go:500 +0x1a1
github.com/boltdb/bolt._assert(0xc420270200, 0x9803d0, 0x23, 0x0, 0x0, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/db.go:1029 +0xff
github.com/boltdb/bolt.(*node).write(0xc42015a0e0, 0xc420270000)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/node.go:226 +0x39d
github.com/boltdb/bolt.(*node).spill(0xc42015a0e0, 0xc4203d2720, 0xc4204c16c0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/node.go:378 +0x288
github.com/boltdb/bolt.(*Bucket).spill(0xc4202ce480, 0xc4203d2600, 0xc4204c1930)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/bucket.go:570 +0x43b
github.com/boltdb/bolt.(*Bucket).spill(0xc4202842b8, 0x1e501f8b, 0xdcfb00)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/bucket.go:537 +0x93b
github.com/boltdb/bolt.(*Tx).Commit(0xc4202842a0, 0x0, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/tx.go:163 +0x125
github.com/boltdb/bolt.(*DB).Update(0xc4202a0000, 0xc4204c1b98, 0x0, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/db.go:605 +0x10d
github.com/odeke-em/drive/config.(*Context).SerializeIndex(0xc4200131c0, 0xc4201b96e0, 0x0, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/config/config.go:279 +0x1a8
github.com/odeke-em/drive/src.(*Commands).createIndex(0xc420013340, 0xc420543680, 0x9b44c0, 0xc4204c1c80)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/fetch.go:314 +0x138
github.com/odeke-em/drive/src.(*Commands).localAdd.func1(0xc4204c1d38, 0xc420242040, 0xc420013340)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/pull.go:575 +0x63
github.com/odeke-em/drive/src.(*Commands).localAdd(0xc420013340, 0xc420242040, 0x0, 0x0, 0x0, 0x0, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/pull.go:606 +0x241
github.com/odeke-em/drive/src.(*Commands).(github.com/odeke-em/drive/src.localAdd)-fm(0xc420242040, 0x0, 0x0, 0x0, 0x0, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/misc.go:1066 +0x52
github.com/odeke-em/drive/src.(*Commands).playPullChanges.func2.1(0xc420242040, 0x1, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/pull.go:478 +0x53
github.com/odeke-em/drive/src.(*changeJobSt).changeJober.func1(0xc4204d56c0, 0x41a335, 0x8a2ee0, 0xc4201b9380)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/misc.go:120 +0xb1
github.com/odeke-em/drive/src.jobSt.Do(0x4, 0xc42042c040, 0x601b4f, 0x8a2ee0, 0xc4201b9380, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/misc.go:100 +0x27
github.com/odeke-em/drive/src.(*jobSt).Do(0xc42040a090, 0x0, 0x0, 0x0, 0x0)
	<autogenerated>:6 +0x5b
github.com/odeke-em/semalim.Run.func4.1(0xc42042fb90, 0xc4201b92c0, 0xc42042fba0, 0xc42042fbb0, 0xdb5960, 0xc42040a090)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/semalim/semalim.go:71 +0x56
created by github.com/odeke-em/semalim.Run.func4
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/semalim/semalim.go:76 +0x141

I also tried to push my old modified files and what I get is:

Proceed with the changes? [Y/n]:
 617638 / 213037297 [>-----------------------------------------------------------------------------------]   0.29% 10m19s
panic: page 376 already freed

goroutine 1151 [running]:
panic(0x8a7a20, 0xc420284a40)
	/usr/lib/go/src/runtime/panic.go:500 +0x1a1
github.com/boltdb/bolt.(*freelist).free(0xc4238e5fb0, 0x14ac, 0x7fe6d1976000)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/freelist.go:121 +0x2c0
github.com/boltdb/bolt.(*node).spill(0xc4201ef960, 0xc42032f060, 0xc42032f060)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/node.go:363 +0x1dc
github.com/boltdb/bolt.(*node).spill(0xc4201ef8f0, 0xc42427a0c0, 0xc4217ed720)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/node.go:350 +0xb7
github.com/boltdb/bolt.(*Bucket).spill(0xc421700c40, 0xc42427a000, 0xc4217ed990)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/bucket.go:570 +0x43b
github.com/boltdb/bolt.(*Bucket).spill(0xc4203b69b8, 0x301e5f3a, 0xdcfb00)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/bucket.go:537 +0x93b
github.com/boltdb/bolt.(*Tx).Commit(0xc4203b69a0, 0x0, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/tx.go:163 +0x125
github.com/boltdb/bolt.(*DB).Update(0xc4201283c0, 0xc4217edbf8, 0x0, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/boltdb/bolt/db.go:605 +0x10d
github.com/odeke-em/drive/config.(*Context).SerializeIndex(0xc420013200, 0xc42152d2c0, 0x0, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/config/config.go:279 +0x1a8
github.com/odeke-em/drive/src.(*Commands).remoteMod(0xc420013600, 0xc4203ad880, 0x3, 0x3)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/push.go:404 +0x4b3
github.com/odeke-em/drive/src.(*Commands).remoteAdd(0xc420013600, 0xc4203ad880, 0x3, 0xc421181770)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/push.go:414 +0x35
github.com/odeke-em/drive/src.(*Commands).(github.com/odeke-em/drive/src.remoteAdd)-fm(0xc4203ad880, 0x1, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/misc.go:1085 +0x34
github.com/odeke-em/drive/src.(*changeJobSt).changeJober.func1(0xc4200246c0, 0x41a335, 0x8a2ee0, 0xc4210d1920)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/misc.go:120 +0xb1
github.com/odeke-em/drive/src.jobSt.Do(0x0, 0xc421873f80, 0x601b4f, 0x8a2ee0, 0xc4210d1920, 0x0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/drive/src/misc.go:100 +0x27
github.com/odeke-em/drive/src.(*jobSt).Do(0xc421875fa0, 0xc400000000, 0x423109, 0xc420cf7498, 0x7bfe7b2500000000)
	<autogenerated>:6 +0x5b
github.com/odeke-em/semalim.Run.func4.1(0xc421875f60, 0xc4210d1860, 0xc421875f70, 0xc421875f80, 0xdb5960, 0xc421875fa0)
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/semalim/semalim.go:71 +0x56
created by github.com/odeke-em/semalim.Run.func4
	/tmp/yaourt-tmp-alessio/aur-drive/src/drive-0.3.9.1/src/github.com/odeke-em/semalim/semalim.go:76 +0x141

Could be there some problem with the hard-drive? Thanks for your help.

ale93p avatar Mar 22 '17 09:03 ale93p

It just solved removing the .gd folder and performing again the initialization.

ale93p avatar Mar 22 '17 09:03 ale93p

@ale93p how was drive installed, what version.

professorjamesmoriarty avatar Mar 22 '17 09:03 professorjamesmoriarty

[alessio@arch Drive]$ drive version
drive version: 0.3.9.1
Commit Hash: '8c26f34b24e0e681acfaffee4149edbbd0aec6a2'
Go Version: go1.7.5
OS: linux/amd64
BuildTime: 2017-02-05 00:12:54.677354822 +0100 CET

I guess the problem was having drive uninstalled and reinstalled and use the previous (old) .gd folder. I saw that push and pull worked so I just continued using it that way, but now it seems that it needed a new initialization.

ale93p avatar Mar 22 '17 09:03 ale93p

Hello there @ale93p thank you for reporting the bug and welcome to drive! Thanks @shaggytwodope for guiding and recommending reinstalls ;)

@ale93p yeah unfortunately we've been plagued by a bunch of boltdb panics that I've never had time to investigate at all but they have been reported in a couple of issues. Good to know that refreshing fixed your problem, that's quite the remedy that many other folks found out so you are not alone.

Am going to close this issue as a duplicate of https://github.com/odeke-em/drive/issues/846 and a few others that you can find by this search https://github.com/odeke-em/drive/issues?utf8=%E2%9C%93&q=is%3Aissue%20circular

Thanks again for the report.

odeke-em avatar Apr 29 '17 04:04 odeke-em