Closed mzimmerman closed 3 years ago
Thanks for the report. Would you be able to provide steps to reproduce? A SIGBUS would generally happen if the file was modified while it was open when using the memory-map mode.
I get this error intermittently, and it is usually on the "Open" function call (one of the mmdb types) instead of on a "lookup" function. The mmdb files are on a samba based CEPH network share when I get the issue.
If I point to the CEPH mount directly (kernel mount), then there's no issue at all.
Copying the file locally seems not to reproduce the issue at all.
So I guess this has to do with a lack of SAMBA (on linux) being able to do mmap'd files correctly? Thanks for the help.
Yes, I would guess this is related to the reliability of mmap
on the mount. Besides copying it locally, you could also read the file into memory and use the FromBytes
function to open it with the reader.
True -- since these files aren't that big that worked just fine. Thanks for the help!
Opening file described at https://www.maxmind.com/en/geoip2-isp-database results in unexpected fault address.
`unexpected fault address 0x7f38fa135003 fatal error: fault [signal SIGBUS: bus error code=0x2 addr=0x7f38fa135003 pc=0x4e178c]
goroutine 1 [running]: runtime.throw(0x5156fd, 0x5) /usr/lib/go-1.16/src/runtime/panic.go:1117 +0x72 fp=0xc00014b860 sp=0xc00014b830 pc=0x435712 runtime.sigpanic() /usr/lib/go-1.16/src/runtime/signal_unix.go:731 +0x2c8 fp=0xc00014b898 sp=0xc00014b860 pc=0x44a368 github.com/oschwald/maxminddb-golang.nodeReader28.readLeft(...) /home/mezimm00/go/pkg/mod/github.com/oschwald/maxminddb-golang@v1.8.0/node.go:25 github.com/oschwald/maxminddb-golang.(*nodeReader28).readLeft(0xc0001280c0, 0x0, 0x50aea0)