Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

panic: runtime error on iplocation.mmdb #33

Open
RandomUser1215R opened this issue Mar 29, 2024 · 3 comments
Open

panic: runtime error on iplocation.mmdb #33

RandomUser1215R opened this issue Mar 29, 2024 · 3 comments

Comments

@RandomUser1215R
Copy link

RandomUser1215R commented Mar 29, 2024

Hello,
I am running errors using mmdbctl_1.4.4_linux_386 verify with iplocation.mmdb (e.g. standard_location.mmdb)
Maybe it's related to the important size of the mmdb ?

./mmdbctl_1.4.4_linux_386 verify iplocation.mmdb
panic: runtime error: index out of range [654620380] with length 654620376

goroutine 1 [running]:
github.com/oschwald/maxminddb-golang.nodeReader32.readRight(...)
        /home/runner/go/pkg/mod/github.com/oschwald/maxminddb-golang@v1.12.0/node.go:54
github.com/oschwald/maxminddb-golang.(*Networks).Next(0x9c50090)
        /home/runner/go/pkg/mod/github.com/oschwald/maxminddb-golang@v1.12.0/traverse.go:142 +0x195
github.com/oschwald/maxminddb-golang.(*verifier).verifySearchTree(0x9c56f08)
        /home/runner/go/pkg/mod/github.com/oschwald/maxminddb-golang@v1.12.0/verifier.go:106 +0x7e
github.com/oschwald/maxminddb-golang.(*verifier).verifyDatabase(0x9c56f08)
        /home/runner/go/pkg/mod/github.com/oschwald/maxminddb-golang@v1.12.0/verifier.go:90 +0x25
github.com/oschwald/maxminddb-golang.(*Reader).Verify(0x9c00180)
        /home/runner/go/pkg/mod/github.com/oschwald/maxminddb-golang@v1.12.0/verifier.go:21 +0x51
github.com/ipinfo/mmdbctl/lib.CmdVerify({0x0}, {0x9c10438, 0x1, 0x1}, 0x825e31c)
        /home/runner/work/mmdbctl/mmdbctl/lib/cmd_verify.go:49 +0x142
main.cmdVerify()
        /home/runner/work/mmdbctl/mmdbctl/cmd_verify.go:35 +0x100
main.main()
        /home/runner/work/mmdbctl/mmdbctl/main.go:42 +0x141
@curious-bug
Copy link

I've run into the same error message.
Different index number (215694220) but the value is off by 4 as well (length 215694216)

@oschwald
Copy link

This issue was fixed in this commit in the underlying database reader. The bug was caused by integer overflow when running on 32-bit architectures.

Unless you specifically need 32-bit compatibility, I recommend using the amd64 binary available on the releases page. The 386 (32-bit) executable is limited to 4GB of addressable memory and may encounter other memory-related issues.

@curious-bug
Copy link

We switched to the 64 bit release of 1.4.6 and the issue is resolved, thank you

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

No branches or pull requests

3 participants