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

runtime error: slice bounds out of range #576

Open
0ZeroCN opened this issue Oct 10, 2023 · 5 comments
Open

runtime error: slice bounds out of range #576

0ZeroCN opened this issue Oct 10, 2023 · 5 comments

Comments

@0ZeroCN
Copy link

0ZeroCN commented Oct 10, 2023

panic: runtime error: slice bounds out of range [::4326323766] with length 21474
83647

goroutine 1 [running]:
go.etcd.io/bbolt.unsafeByteSlice(...)
H:/m/Server/vendor/go.etcd.io/bbolt/unsafe.go:27
go.etcd.io/bbolt.(*leafPageElement).key(...)
H:/m/Server/vendor/go.etcd.io/bbolt/page.go:126
go.etcd.io/bbolt.(*Cursor).nsearch.func2(0xc000429f80?)
H:/m/Server/vendor/go.etcd.io/bbolt/cursor.go:328 +0x92
sort.Search(0x1940598?, 0xc0005177f0)
D:/Program Files/Go/src/sort/search.go:65 +0x46
go.etcd.io/bbolt.(*Cursor).nsearch(0xc000016060?, {0x11b61e8?, 0xc00004e000?, 0x
9384d9?})
H:/m/Server/vendor/go.etcd.io/bbolt/cursor.go:327 +0xf4
go.etcd.io/bbolt.(*Cursor).search(0xc000517ab8, {0x11b61e8, 0x5, 0x5}, 0x0?)
H:/m/Server/vendor/go.etcd.io/bbolt/cursor.go:257 +0x1ee
go.etcd.io/bbolt.(*Cursor).searchPage(0xc000517ab8, {0x11b61e8, 0x5, 0x5}, 0xbb8
ee0?)
H:/m/Server/vendor/go.etcd.io/bbolt/cursor.go:308 +0x15a
go.etcd.io/bbolt.(*Cursor).search(0xc000517ab8, {0x11b61e8, 0x5, 0x5}, 0x100c000
517a48?)
H:/m/Server/vendor/go.etcd.io/bbolt/cursor.go:265 +0x1c5
go.etcd.io/bbolt.(*Cursor).seek(0xc000517ab8, {0x11b61e8?, 0x0?, 0xc000517af0?})

    H:/m/Server/vendor/go.etcd.io/bbolt/cursor.go:159 +0x45

go.etcd.io/bbolt.(*Bucket).Bucket(0xc0000b27f8, {0x11b61e8, 0x5, 0xc0000f51a0?})

    H:/m/Server/vendor/go.etcd.io/bbolt/bucket.go:105 +0xb2

go.etcd.io/bbolt.(*Tx).Bucket(...)
H:/m/Server/vendor/go.etcd.io/bbolt/tx.go:101
local.dev/nightsky/db.ReadUser.func1(0x30?)

@0ZeroCN
Copy link
Author

0ZeroCN commented Oct 10, 2023

go.etcd.io/bbolt v1.3.6

@ahrtr
Copy link
Member

ahrtr commented Oct 10, 2023

thx @0ZeroCN for raising this issue. Is it possible the share the db file so that I can take a closer look?

@0ZeroCN
Copy link
Author

0ZeroCN commented Oct 11, 2023

The database file size is 4G, which is too large. I have no problem creating a new database.

@ahrtr
Copy link
Member

ahrtr commented Oct 11, 2023

  • Look like the db file is corrupted. I think it's highly possible that we can fix it using the surgery command. So no matter how big the db is, I still would like to double confirm.
  • We need to enhance the check command: (1) not panic, and (2) provide more useful diagnosis info.

Do you remember how the issue was created? Was there any power shutdown or hard reset of the server?

@0ZeroCN
Copy link
Author

0ZeroCN commented Oct 11, 2023

I'm just upgrading the program, but restoring to the old program doesn't have this problem.The code has not been modified, just upgrading go.exe to the latest version.

@github-actions github-actions bot added the stale label Apr 16, 2024
@ahrtr ahrtr removed the stale label May 10, 2024
@github-actions github-actions bot added the stale label Aug 9, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
@ahrtr ahrtr reopened this Dec 10, 2024
@github-actions github-actions bot removed the stale label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants