镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

dns: occasionally crashing in resolve4 and setServers #14734

Description

@XadillaX
  • Version: v9.0.0-pre (master)
  • Platform: Darwin zanarpro 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64 i386 MacBookPro11,3 Darwin
  • Subsystem: c-ares

Here's the code:

// under test folder
const common = require('../common');
const dns = require('dns');

dns.resolve4('google.com', common.mustCall(function(/* err, nameServers */) {
  dns.setServers([ '8.8.8.8' ]);
}));

dns.resolve4('google.com', common.mustCall(function() {
  // do nothing...
}));

And the Node.js will occasionally crash with:

Assertion failed: (ares__is_list_empty(&server->queries_to_server)), function ares__destroy_servers_state, file ../deps/cares/src/ares_destroy.c, line 102.

Activity

  1. XadillaX commented on Aug 10, 2017

    @XadillaX
    ContributorAuthor

    I'm going to fix this issue. I think I know where the problem is, but I need some time to fix it.

  2. self-assigned this
    on Aug 10, 2017
  3. added
    caresIssues and PRs related to the c-ares dependency or the cares_wrap binding.
    confirmed-bugIssues and PRs for confirmed bugs.
    dnsIssues and PRs related to the dns subsystem.
    on Aug 10, 2017
  4. added a commit that references this issue on Jan 25, 2018
    c34ee3c
  5. dzek69 commented on Jun 16, 2018

    @dzek69

    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

    BTW: It's a duplicate of #894.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

caresIssues and PRs related to the c-ares dependency or the cares_wrap binding.confirmed-bugIssues and PRs for confirmed bugs.dnsIssues and PRs related to the dns subsystem.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions