Git Product home page Git Product logo

Comments (7)

vikstrous avatar vikstrous commented on September 15, 2024

I think this had something to do with the way I was trying to use this library... This crash happened in a docker container. Outside the container it works fine.

from geoip.

vikstrous avatar vikstrous commented on September 15, 2024

It looks like if I use godep go build -a github.com/abh/geoip it works, but if I set my GOPATH to the _workspace directory manually and just do go build -a github.com/abh/geoip without godoep, it fails.

This seems like more of a general go/godep issue. Feel free to close this issue.

from geoip.

vikstrous avatar vikstrous commented on September 15, 2024

Actually after running this a few times I realized that sometimes it prints

Error Traversing Database for ipnum = 3484092211 - Perhaps database is corrupt?
Error Traversing Database for ipnum = 2130706433 - Perhaps database is corrupt?

and other times it crashes and it has nothing to do with godop. It's just a race condition.

from geoip.

oschwald avatar oschwald commented on September 15, 2024

It appears you are trying to use a GeoIP2/GeoLite2 database with this library. This library only supports the Legacy format, which you can find at http://dev.maxmind.com/geoip/legacy/geolite/.

from geoip.

vikstrous avatar vikstrous commented on September 15, 2024

Oh, I see. That makes sense. Is there a way to check the format and return an error?

from geoip.

oschwald avatar oschwald commented on September 15, 2024

It turns out this is an issue with libGeoIP and GEOIP_MEMORY_CACHE mode that causes a segault. This isn't a bug with the Go library.

from geoip.

oschwald avatar oschwald commented on September 15, 2024

@vikstrous, the segfault was fixed in libGeoIP 1.6.7. Should this issue be closed now?

from geoip.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.