Skip to content

munmap_chunk(): invalid pointer after ares_query #27356

Description

@peakji
  • Version: v10.15.3
  • Platform: Linux 3.10.0-957.5.1.el7.x86_64
  • Subsystem: dns(?)

I guess this might be related to dns since it happened after ares_query(3).

Our software fetches URLs (using the http module and the underlying dns module) submitted by users. We are not storing URL logs for privacy reasons, but I think the issue is not related to a particular URL, because the process restarted and retried with no further errors.

It seems to be random, and I wasn't able to reproduce the issue in local environment yet.

*** Error in `node': munmap_chunk(): invalid pointer: 0x00007fffff2c0cbe ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7f5d4)[0x7efcc79055d4]
node(ares_query+0x66)[0x16a77f6]
node[0x8af5da]
node[0x8b386c]
node[0xb62a3f]
node(_ZN2v88internal21Builtin_HandleApiCallEiPPNS0_6ObjectEPNS0_7IsolateE+0xb9)[0xb635a9]
[0x37ca0c05be1d]
======= Memory map: ========
00400000-02296000 r-xp 00000000 fd:01 659651                             /usr/bin/node
02495000-02497000 r--p 01e95000 fd:01 659651                             /usr/bin/node
02497000-024ac000 rw-p 01e97000 fd:01 659651                             /usr/bin/node
024ac000-024c6000 rw-p 00000000 00:00 0 
03148000-058d8000 rw-p 00000000 00:00 0                                  [heap]
a82a700000-a82a780000 rw-p 00000000 00:00 0 
aee6b80000-aee6c00000 rw-p 00000000 00:00 0 
13bb9680000-13bb9700000 rw-p 00000000 00:00 0 
14caec00000-14caec80000 rw-p 00000000 00:00 0 
...

Activity

  1. addaleax commented on Apr 23, 2019

    @addaleax
    Member

    It’s hard to tell whether this has to do with ares_query() itself, because for these kinds of errors typically are the result of memory corruption that happened at an earlier point in time.

    Do you think you would be able to provide core dumps? Do you use any native addons? Are you using the official binary from https://nodejs.org/, or a distribution-provided one?

  2. peakji commented on Apr 23, 2019

    @peakji
    ContributorAuthor

    Do you think you would be able to provide core dumps?

    It occurred on a production server with core dump disabled. I'm still trying to reproduce in a local environment but with no luck. Actually it happened after serving 20 million URLs, seems fully random.

    Do you use any native addons?

    No, the software only uses built-in modules (no dependencies), no pure javascript or native modules form NPM.

    Are you using the official binary from https://nodejs.org/, or a distribution-provided one?

    We are using official binary distributions provided by NodeSource in production.

    I'll switch my local environment to a NodeSource version and see if I can dump a core.

  3. hamzakilic commented on May 2, 2019

    @hamzakilic

    torbox3uiot6wchz.onion
    try this domain.

    #27530

  4. added
    caresIssues and PRs related to the c-ares dependency or the cares_wrap binding.
    on May 3, 2019
  5. peakji commented on Jun 16, 2019

    @peakji
    ContributorAuthor

    Fixed in #27542

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    caresIssues and PRs related to the c-ares dependency or the cares_wrap binding.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions