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

Traceback with DNS & IPv6 #3106

Closed
Mikaela opened this issue Sep 28, 2015 · 4 comments
Closed

Traceback with DNS & IPv6 #3106

Mikaela opened this issue Sep 28, 2015 · 4 comments
Labels
dns Issues and PRs related to the dns subsystem.

Comments

@Mikaela
Copy link

Mikaela commented Sep 28, 2015

I was told to report this at IRC.

I have written this script https://github.com/Mikaela/scripts/blob/gh-pages/nodejs/myip.js . When only the first part is uncommented, it runs and returns my IPv4 address.

However when I uncomment the IPv6 part too it tracebacks immediately when ran.

% ./myip.js  
node: ../deps/cares/src/ares_destroy.c:102: ares__destroy_servers_state: Assertion `ares__is_list_empty(&server->queries_to_server)' failed.
zsh: abort (core dumped)  ./myip.js

The related section of code is:

// This code makes node codedump for some reason, maybe it has a bug
// with IPv6 handling or it doesn't like my system not having native
// or not-Teredo IPv6 connectivity.

// node: ../deps/cares/src/ares_destroy.c:102: ares__destroy_servers_state: Assertion `ares__is_list_empty(&server->queries_to_server)' failed.
// zsh: abort (core dumped)  ./myip.js

// Set DNS servers to OpenDNS IPv6
var servers6 = dns.setServers(["2620:0:ccc::2", "2620:0:ccd::2"])

// Check where myip.opendns.com resolves to and I think this is a function
// that takes arguments err and addresses.
dns.resolve6('myip.opendns.com', function (err, addresses) {

    // if err contains a truthy value, an error has occurred
    if (err) throw err;

    // Print the first thing in array addresses as it has our IPv4
    // address.
    console.log(addresses[0]);
});

I am running v4.1.1 on Arch Linux and installed from Arch Linux repositories.

Edit: }); had dropped from my copy-paste in the end.

@Mikaela
Copy link
Author

Mikaela commented Sep 28, 2015

IRC now also suggested that this might be duplicate of #894, but didn't seem to be fully sure.

@mscdex mscdex added the dns Issues and PRs related to the dns subsystem. label Sep 28, 2015
@silverwind
Copy link
Contributor

Yes, looks like #894 to me. You're calling setServers with an in-flight request, which triggers the crash.

@Mikaela
Copy link
Author

Mikaela commented Sep 29, 2015

Closing as duplicate of #894.

@Mikaela Mikaela closed this as completed Sep 29, 2015
@dzek69
Copy link

dzek69 commented Jun 16, 2018

Just a note for people coming from Google search: This is fixed with 9.3.0 version and fix seems to be backported to 8.10.0 too.

I monkey patched dns module to fix that - if anyone needs to keep unpatched Node version and doesn't want the crashes - please use my fix.
More information here: https://github.com/dzek69/node-dns-bugfix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dns Issues and PRs related to the dns subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants