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

Assertion failed: (r) == (0), file src\cares_wrap.cc, line 1262 #5588

Closed
BrightLamp opened this issue Mar 7, 2016 · 13 comments
Closed

Assertion failed: (r) == (0), file src\cares_wrap.cc, line 1262 #5588

BrightLamp opened this issue Mar 7, 2016 · 13 comments
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. dns Issues and PRs related to the dns subsystem.

Comments

@BrightLamp
Copy link

When i set the Internet (TCP/IPv4) property to
IP address: 192.168.1.253 & 255.255.255.0

Node.js failed to startup:
Assertion failed: (r) == (0), file src\cares_wrap.cc, line 1262

I found this in windows10 & node.js version 5.7.0

@ChALkeR ChALkeR added the lib / src Issues and PRs related to general changes in the lib or src directory. label Mar 7, 2016
@micnic
Copy link
Contributor

micnic commented Mar 7, 2016

Do you have any minimal code to reproduce this issue?
I tried to reproduce this by doing a HTTP request (Node 5.7.1), but everything went fine.

@bnoordhuis
Copy link
Member

Do you have this problem with v5.5.0 as well? We upgraded c-ares (the component that does DNS), then partially reverted it again.

I say partially because while 35c3832 got reverted in 127dd62, I see that f1a0827 is still present. v5.5.0 is the last release without that commit. /cc @indutny

@mscdex mscdex added c++ Issues and PRs that require attention from people who are familiar with C++. dns Issues and PRs related to the dns subsystem. and removed lib / src Issues and PRs related to general changes in the lib or src directory. labels Mar 7, 2016
@BrightLamp
Copy link
Author

It is a notebook computer which has not local area network(LAN), i must use the wireless local area network(WLAN) to connect my new network router i bought yesterday.
When i set a special IP address instead of AUTO, the WLAN shows "Limited".

Then
"Assertion failed: (r) == (0), file src\cares_wrap.cc, line 1262"
comes up by just double click the node.exe.

After disable the WLAN or change IP address to AUTO, node.js runs well.

By the way, when node5.7.1 works wrong, node5.5.0 runs well.
Thanks.

@anaisbetts
Copy link

Can we reopen this? Reverting to an older node version is not "Solved" from a bug perspective

@addaleax addaleax reopened this Jul 16, 2016
@addaleax
Copy link
Member

@paulcbetts I take it you can confirm that this is still an issue in v6.3.0?

@addaleax addaleax added the cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. label Jul 16, 2016
@anaisbetts
Copy link

anaisbetts commented Jul 17, 2016

@adamesque ^^ peep the referenced Electron bug, it seems to be something specific to a minority of systems

@anaisbetts
Copy link

00 000000f8`6b7ecbb8 00007ffa`2c8fb185 ntdll!NtTerminateProcess+0x14
01 000000f8`6b7ecbc0 00007ffa`2ad74d8a ntdll!RtlExitUserProcess+0xe5
*** WARNING: Unable to verify checksum for D:\Code\electron-v1.2.6-win32-x64\node.dll
02 000000f8`6b7eccb0 00007ff9`e9aa0468 KERNEL32!ExitProcessImplementation+0xa
03 000000f8`6b7ecce0 00007ff9`e9aa0404 node!exit_or_terminate_process+0x48 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\exit.cpp @ 129]
04 000000f8`6b7ecd10 00007ff9`e9a87209 node!common_exit+0x150 [d:\th\minkernel\crts\ucrt\src\appcrt\startup\exit.cpp @ 269]
05 000000f8`6b7ecd40 00007ff9`e92b1ef2 node!raise+0x165 [d:\th\minkernel\crts\ucrt\src\appcrt\misc\signal.cpp @ 463]
06 000000f8`6b7ecdc0 00007ff9`e92bb570 node!node::cares_wrap::Initialize+0x8e [c:\jenkins\workspace\electron-win-x64\vendor\node\src\cares_wrap.cc @ 1330]
07 000000f8`6b7ecea0 00007ff9`e9674919 node!node::Binding+0x1cc [c:\jenkins\workspace\electron-win-x64\vendor\node\src\node.cc @ 2517]
08 000000f8`6b7edb40 00007ff9`e950a62c node!v8::internal::FunctionCallbackArguments::Call+0x99 [c:\jenkins\workspace\libchromiumcontent-win\vendor\chromium\src\v8\src\api-arguments.cc @ 17]

@meteormatt
Copy link

meteormatt commented Aug 22, 2016

I face the same problem on Windows Server 2012 R2
Node.js v6.4.0

@Nedgeva
Copy link

Nedgeva commented Oct 7, 2016

Same here
NodeJS v6.7.0 x64 Win7
Node exits automatically (with "Assertion failed: (r) == (0)" error) if IP changed to local.

@bnoordhuis
Copy link
Member

This has been fixed by #8710 and is scheduled for back-porting to the release branches.

You still won't end up with a workable binary if the system resolver is borked but at least you get an exception that you can catch and marvel at. That is, this now works:

try {
  var dns = require('dns');
} catch (e) {
  console.error(e);
}
if (dns) {
  // ...
}

@weagle08
Copy link

so does this allow me to run on a LAN network just using configured IP with no DNS set?

@bnoordhuis
Copy link
Member

Depends on the exact configuration but probably not. See #8966 for more discussion.

@anaisbetts
Copy link

@bnoordhuis Thanks for the fix and the update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. dns Issues and PRs related to the dns subsystem.
Projects
None yet
Development

No branches or pull requests

10 participants