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

panic: invalid page type: 6: 10 #828

Open
pasquinadeus opened this issue Jan 4, 2017 · 13 comments
Open

panic: invalid page type: 6: 10 #828

pasquinadeus opened this issue Jan 4, 2017 · 13 comments

Comments

@pasquinadeus
Copy link

Trying to pull my drive contents ("Share" directory) using the command line:

drive pull --depth -1 -export docx,pptx,xlsx,pdf --fix-clashes -no-prompt -verbose Share

results in:

panic: invalid page type: 6: 10

goroutine 1 [running]:
panic(0x55a2cd4a92c0, 0xc823ae3320)
/usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6
github.com/boltdb/bolt.(*Cursor).search(0xc822cbd500, 0xc822cbd560, 0x1c, 0x1c, 0x6)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/boltdb/bolt/cursor.go:256 +0x215
github.com/boltdb/bolt.(*Cursor).searchPage(0xc822cbd500, 0xc822cbd560, 0x1c, 0x1c, 0x7f2a0e0ae000)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/boltdb/bolt/cursor.go:314 +0x165
github.com/boltdb/bolt.(*Cursor).search(0xc822cbd500, 0xc822cbd560, 0x1c, 0x1c, 0xf)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/boltdb/bolt/cursor.go:271 +0x3aa
github.com/boltdb/bolt.(*Cursor).seek(0xc822cbd500, 0xc822cbd560, 0x1c, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/boltdb/bolt/cursor.go:159 +0xda
github.com/boltdb/bolt.(*Bucket).Get(0xc823b99e80, 0xc822cbd560, 0x1c, 0x1c, 0x0, 0x0, 0x0)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/boltdb/bolt/bucket.go:268 +0xf4
github.com/odeke-em/drive/config.(*Context).DeserializeIndex.func1(0xc8202daa80, 0x0, 0x0)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/drive/config/config.go:134 +0x1bc
github.com/boltdb/bolt.(*DB).View(0xc820172960, 0xc822cbd728, 0x0, 0x0)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/boltdb/bolt/db.go:626 +0xb9
github.com/odeke-em/drive/config.(*Context).DeserializeIndex(0xc82016eec0, 0xc820440580, 0x1c, 0x0, 0x0, 0x0)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/drive/config/config.go:140 +0x196
github.com/odeke-em/drive/src.(*Commands).deserializeIndex(0xc82016f000, 0xc820440580, 0x1c, 0x20)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/drive/src/push.go:242 +0x38
github.com/odeke-em/drive/src.(*Commands).(github.com/odeke-em/drive/src.deserializeIndex)-fm(0xc820440580, 0x1c, 0x0)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/drive/src/changes.go:718 +0x34
github.com/odeke-em/drive/src.resolveConflicts(0xc823ae2f80, 0x2, 0x2, 0xc8239d6000, 0xc822cbd908, 0xc823f0a888, 0x1, 0x1, 0x0, 0x0, ...)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/drive/src/changes.go:699 +0x135
github.com/odeke-em/drive/src.(*Commands).resolveConflicts(0xc82016f000, 0xc821b68000, 0x52ee, 0x5400, 0x5400, 0x0, 0x0)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/drive/src/changes.go:718 +0x1df
github.com/odeke-em/drive/src.pull(0xc82016f000, 0x2, 0x0, 0x0)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/drive/src/pull.go:116 +0x41b
github.com/odeke-em/drive/src.(*Commands).Pull(0xc82016f000, 0x0, 0x0)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/drive/src/pull.go:71 +0x36
main.(*pullCmd).Run(0xc8201c8000, 0xc82000a130, 0x1, 0x1, 0xc8201b4ea0)
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/drive/cmd/drive/main.go:786 +0xb50
github.com/odeke-em/command.Run()
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/command/command.go:202 +0xaa
github.com/odeke-em/command.ParseAndRun()
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/command/command.go:209 +0x19
main.main()
/build/drive-6YcWil/drive-0.3.8.1/src/github.com/odeke-em/drive/cmd/drive/main.go:125 +0x22c7

I tried with a self compiled binary and the debian "curated" package available from the webpage. Same result.

Any clue as to what the "invalid page type" panic might mean?

Thanks for the software,
best regards,
Ricardo

@odeke-em
Copy link
Owner

odeke-em commented Jan 7, 2017

Hello there @pasquinadeus, thank you for reporting this issue and welcome to drive!

Firstly, my apologies for the late reply.

So this isn't an error that pops off the page for me in drive, it looks like an issue with boltdb. This is the second boltdb panic that has been reported, after #824.

@pasquinadeus
Copy link
Author

Hi Odeke-em,

Let me know if I can do anything to help debug this. My experience with go is very limited but I'm motivated to have this fixed.

Thanks,
Ricardo

@odeke-em
Copy link
Owner

odeke-em commented Jan 8, 2017

Thanks @pasquinadeus for the reply. So am currently using boltdb https://github.com/boltdb/bolt/tree/852d3024fa8d89dcc9a715bab6f4dcd7d59577dd. I haven't updated my boltdb since November 25 2015 and it works alright. Hopefully that's just a regression
from the new updates, otherwise will require a bit of digging.

@pasquinadeus
Copy link
Author

Sorry, had a trip and only got back yesterday.

As seen in the other thread I tried ( on a fresh GOPATH ):

go get -u github.com/odeke-em/drive/cmd/drive
go get github.com/odeke-em/drive/drive-gen && drive-gen
cd $GOPATH/src/github.com/boltdb/bolt && git reset --hard 852d3024fa8d89dcc9a715bab6f4dcd7d59577dd
drive-gen

this results in a binary:

gdrive@UR-SERVER01:~/gopath/src/github.com/boltdb/bolt$ drive version
drive version: 0.3.9
Commit Hash: '5278f2bbc4a68f116d9ce95ba5a7bc61b1e322ab'
Go Version: go1.7.4
OS: linux/amd64
BuildTime: 2017-01-12 12:04:12.784324611 +0000 WET

then I did a "drive init" on a fresh directory and ran the pull command:

time drive pull --depth -1 -export docx,pptx,xlsx,pdf --fix-clashes -no-prompt -verbose Share

and about 10 minutes later it starting getting the repository (still going, but the other error appeared after a few files and we are past that point).

I tried first on the old drive directory and it failed with the original error. Only by "drive init"ing on a fresh directory did it work so the issue is related with the disk cache. Hope this info might help other people.

Thanks for the software, if you need further debugging let me know.
Best regards,
Ricardo

@odeke-em
Copy link
Owner

Awesome work @pasquinadeus, thank you very much for the analysis and for posting your findings.
@nelaaro quoted your findings so perhaps we should put this information in a wiki, if you please?

@nelaaro
Copy link

nelaaro commented Jan 16, 2017

@odeke-em
Copy link
Owner

odeke-em commented Feb 3, 2017

Hey folks, please get and test out the latest boltdb as per boltdb/bolt#654
You can do so by running

$ go get -u -v github.com/odeke-em/drive/drive-gen && drive-gen

and let me know if the problem persists and I'll report back to the boltdb issue.

@srvanrell
Copy link

srvanrell commented Feb 21, 2017

Hi there, I don't know if I have the same problem. I received the following message. What should I do?

panic: invalid page type: 64: 10

goroutine 88 [running]:
panic(0x936000, 0xc4202baee0)
/usr/lib/golang/src/runtime/panic.go:481 +0x3e6
github.com/boltdb/bolt.(*Cursor).search(0xc4205eb8d0, 0xc4202baec0, 0x7, 0x8, 0x40)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/boltdb/bolt/cursor.go:256 +0x215
github.com/boltdb/bolt.(*Cursor).seek(0xc4205eb8d0, 0xc4202baec0, 0x7, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/boltdb/bolt/cursor.go:159 +0xda
github.com/boltdb/bolt.(*Bucket).CreateBucket(0xc4203c01d8, 0xc4202baec0, 0x7, 0x8, 0x8, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/boltdb/bolt/bucket.go:172 +0x1b4
github.com/boltdb/bolt.(*Bucket).CreateBucketIfNotExists(0xc4203c01d8, 0xc4202baec0, 0x7, 0x8, 0xc4202baec0, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/boltdb/bolt/bucket.go:206 +0x55
github.com/boltdb/bolt.(*Tx).CreateBucketIfNotExists(0xc4203c01c0, 0xc4202baec0, 0x7, 0x8, 0x7, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/boltdb/bolt/tx.go:115 +0x57
github.com/odeke-em/drive/config.(*Context).SerializeIndex.func1(0xc4203c01c0, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/odeke-em/drive/config/config.go:271 +0xd3
github.com/boltdb/bolt.(*DB).Update(0xc4201be5a0, 0xc4205ebb70, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/boltdb/bolt/db.go:598 +0xb3
github.com/odeke-em/drive/config.(*Context).SerializeIndex(0xc42001d1c0, 0xc420414300, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/odeke-em/drive/config/config.go:279 +0x1a3
github.com/odeke-em/drive/src.(*Commands).createIndex(0xc42001d440, 0xc4201b1600, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/odeke-em/drive/src/fetch.go:314 +0x1df
github.com/odeke-em/drive/src.(*Commands).localAdd.func1(0xc4205ebd50, 0xc420352680, 0xc42001d440)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/odeke-em/drive/src/pull.go:574 +0x65
github.com/odeke-em/drive/src.(*Commands).localAdd(0xc42001d440, 0xc420352680, 0x0, 0x0, 0x0, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/odeke-em/drive/src/pull.go:601 +0x33d
github.com/odeke-em/drive/src.(*Commands).(github.com/odeke-em/drive/src.localAdd)-fm(0xc420352680, 0x0, 0x0, 0x0, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/odeke-em/drive/src/misc.go:1066 +0x56
github.com/odeke-em/drive/src.(*Commands).playPullChanges.func2.1(0xc420352680, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/odeke-em/drive/src/pull.go:477 +0x57
github.com/odeke-em/drive/src.(*changeJobSt).changeJober.func1(0x0, 0x0, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/odeke-em/drive/src/misc.go:120 +0x23e
github.com/odeke-em/drive/src.jobSt.Do(0x0, 0xc42035de80, 0x0, 0x0, 0x0, 0x0)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/odeke-em/drive/src/misc.go:100 +0x35
github.com/odeke-em/drive/src.(*jobSt).Do(0xc4202bad20, 0x0, 0x0, 0x0, 0x0)
:6 +0xb0
github.com/odeke-em/semalim.Run.func4.1(0xc4202bace0, 0xc420191d40, 0xc4202bacf0, 0xc4202bad00, 0x7f76b46b10d8, 0xc4202bad20)
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/odeke-em/semalim/semalim.go:71 +0x46
created by github.com/odeke-em/semalim.Run.func4
/builddir/build/BUILD/drive-a9f53bc4cc9d9d2eada836602ad4b4a7902424a6/_build/src/github.com/odeke-em/semalim/semalim.go:76 +0x12c

BTW, I'm using drive version: 0.3.9 on Fedora 24

@srvanrell
Copy link

@canpolat I'm afraid I cannot try those suggestions. I ended up reinstalling my OS so I started all over again with drive.

@nelaaro
Copy link

nelaaro commented Mar 2, 2017 via email

@srvanrell
Copy link

@canpolat I got the same problem yesterday. I failed to follow instructions of option 1 due to the requirements but I found a simple workaround: I deleted .gd/drivedb. Then I continue using drive as always

@nelaaro
Copy link

nelaaro commented Mar 9, 2017

@odeke-em I think we can close this issue now, as the updates to fix boltdb #boltdb/bolt#654

As well as removing the .gd/drivedb file get everything working.

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

No branches or pull requests

5 participants