Code Monkey home page Code Monkey logo

Comments (5)

keeperofdakeys avatar keeperofdakeys commented on July 1, 2024 1

Ah now I have this in a test system I see the issue. I'll push a new release with this fix.

Thanks for the bug report.

from dns-lookup.

keeperofdakeys avatar keeperofdakeys commented on July 1, 2024

Thanks for the bug report.

What architecture are you running on? And what libc are you using, glibc? (If you don't know give me the output of "rustc --version --verbose").

The only changes made in version 2.0 was an upgrade of socket2 to the next minor version (0.5.X), a swap to windows-sys on the windows platform, and an update so lookup_addr will error instead of returning empty string when a reverse ptr record does not exist. Only the change to socket2 sounds relevant here.

As a test, could you try running this code on alpine to rule out any ignored errors?

fn main() {
    println!("before");
    println!("{:?}", dns_lookup::lookup_host("127.0.0.1"));
    println!("after");
}

If none of that helps there are some tracing tools that may help, but we need more info first.

from dns-lookup.

sjoqvist avatar sjoqvist commented on July 1, 2024

Thanks for the quick response!

Alpine uses musl instead of glibc, and my architecture is x86_64. Here is more detailed output.

$ docker run -it --rm foo-debian rustc --version --verbose
rustc 1.69.0 (84c898d65 2023-04-16)
binary: rustc
commit-hash: 84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc
commit-date: 2023-04-16
host: x86_64-unknown-linux-gnu
release: 1.69.0
LLVM version: 15.0.7
$ docker run -it --rm foo-alpine rustc --version --verbose
rustc 1.69.0 (84c898d65 2023-04-16)
binary: rustc
commit-hash: 84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc
commit-date: 2023-04-16
host: x86_64-unknown-linux-musl
release: 1.69.0
LLVM version: 15.0.7

Here's the output after the code modifications.

$ docker run -it --rm foo-debian
before
Ok([127.0.0.1])
after
$ docker run -it --rm foo-alpine
before

from dns-lookup.

keeperofdakeys avatar keeperofdakeys commented on July 1, 2024

Okay if musl is potentially causing the issue I can do some more involved testing of this next week. I'll get out a debugger and try to trace the call graph to find what's killing the code.

I just pushed a commit fixing a few compile errors on aarch64. I doubt they'll fix this issue, but if you have some time I'd appreciate if you could test.

from dns-lookup.

sjoqvist avatar sjoqvist commented on July 1, 2024

Unfortunately, it didn't help. I get the same result as before with the following Cargo.toml.

[package]
name = "foo"
version = "0.1.0"
edition = "2018"

[dependencies]
dns-lookup = { git = "https://github.com/keeperofdakeys/dns-lookup.git", rev = "ea577e2", default-features = false }

Have you checked if you can replicate the issue locally with Docker? I'm happy to help, but I posted all the files that should be necessary if you want a quicker process.

from dns-lookup.

Related Issues (19)

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.