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

munmap_chunk(): invalid pointer after ares_query #27356

Closed
peakji opened this issue Apr 23, 2019 · 4 comments
Closed

munmap_chunk(): invalid pointer after ares_query #27356

peakji opened this issue Apr 23, 2019 · 4 comments
Labels
cares Issues and PRs related to the c-ares dependency or the cares_wrap binding.

Comments

@peakji
Copy link
Contributor

peakji commented Apr 23, 2019

  • 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 
...
@addaleax
Copy link
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?

@peakji
Copy link
Contributor Author

peakji commented Apr 23, 2019

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.

@hamzakilic
Copy link

torbox3uiot6wchz.onion
try this domain.

#27530

@addaleax addaleax added v10.x cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. labels May 3, 2019
@peakji
Copy link
Contributor Author

peakji commented Jun 16, 2019

Fixed in #27542

@peakji peakji closed this as completed Jun 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cares Issues and PRs related to the c-ares dependency or the cares_wrap binding.
Projects
None yet
Development

No branches or pull requests

3 participants