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

test: test-async-wrap-pop-id-during-load failure on mac #20888

Closed
danbev opened this issue May 22, 2018 · 11 comments
Closed

test: test-async-wrap-pop-id-during-load failure on mac #20888

danbev opened this issue May 22, 2018 · 11 comments

Comments

@danbev
Copy link
Contributor

danbev commented May 22, 2018

  • Version: v11.0.0-pre
  • Platform: Darwin MacBook-Pro-3.local 15.6.0 Darwin Kernel Version 15.6.0: Tue Jan 30 11:45:51 PST 2018; root:xnu-3248.73.8~1/RELEASE_X86_64 x86_64
  • Subsystem: test

I'm seeing the following test failure when running on mac os x:

=== debug test-async-wrap-pop-id-during-load ===
Path: parallel/test-async-wrap-pop-id-during-load
assert.js:80
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Input A expected to strictly equal input B:
+ expected - actual

- 3
+ 0
    at Object.<anonymous> (/Users/danielbevenius/work/nodejs/node/test/parallel/test-async-wrap-pop-id-during-load.js:20:8)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
    at startup (internal/bootstrap/node.js:239:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:573:3)
Command: out/Debug/node /Users/danielbevenius/work/nodejs/node/test/parallel/test-async-wrap-pop-id-during-load.js

It is sort of hard to see what the issue is by looking at the above output but adding log statement (or start with lldb/gdb) to see stderr I can see:

undefined:0



RangeError: Maximum call stack size exceeded

This can be reproduced/simplified by running

$ out/Debug/node --stack_size=50 -p "console.log('hello');"
undefined:0



RangeError: Maximum call stack size exceeded

This error originates from node.cc when trying to compile the internal/bootstrap/loaders.js

backtrace
(lldb) bt
* thread #1: tid = 0x98f62e, 0x000000010008c1fc node`node::ExecuteString(env=0x00007fff5fbfe180, source=(val_ = 0x0000000106848e48), filename=(val_ = 0x0000000106848e40)) + 412 at node.cc:1210, queue = 'com.apple.main-thread', stop reason = step over
  * frame #0: 0x000000010008c1fc node`node::ExecuteString(env=0x00007fff5fbfe180, source=(val_ = 0x0000000106848e48), filename=(val_ = 0x0000000106848e40)) + 412 at node.cc:1210
    frame #1: 0x0000000100083583 node`node::GetBootstrapper(env=0x00007fff5fbfe180, source=(val_ = 0x0000000106848e48), script_name=(val_ = 0x0000000106848e40)) + 115 at node.cc:3052
    frame #2: 0x0000000100082fb2 node`node::LoadEnvironment(env=0x00007fff5fbfe180) + 194 at node.cc:3101
    frame #3: 0x000000010008dd3e node`node::Start(isolate=0x0000000106800000, isolate_data=0x0000000106852000, argc=1, argv=0x0000000104d045d0, exec_argc=3, exec_argv=0x0000000104d046e0) + 686 at node.cc:4255
    frame #4: 0x0000000100088b5b node`node::Start(event_loop=0x0000000102ce16d0, argc=1, argv=0x0000000104d045d0, exec_argc=3, exec_argv=0x0000000104d046e0) + 1179 at node.cc:4362
    frame #5: 0x0000000100088185 node`node::Start(argc=1, argv=0x0000000104d045d0) + 453 at node.cc:4413
    frame #6: 0x0000000101c5112e node`main(argc=4, argv=0x00007fff5fbfee00) + 94 at node_main.cc:124
    frame #7: 0x0000000100001034 node`start + 52
(lldb) f
frame #0: 0x000000010008c1fc node`node::ExecuteString(env=0x00007fff5fbfe180, source=(val_ = 0x0000000106848e48), filename=(val_ = 0x0000000106848e40)) + 412 at node.cc:1210
   1207	  MaybeLocal<v8::Script> script =
   1208	      v8::Script::Compile(env->context(), source, &origin);
   1209	  if (script.IsEmpty()) {
-> 1210	    ReportException(env, try_catch);
   1211	    exit(3);
   1212	  }
   1213
(lldb) n
undefined:0



RangeError: Maximum call stack size exceeded
Process 44703 stopped
* thread #1: tid = 0x98f62e, 0x000000010008c20a node`node::ExecuteString(env=0x00007fff5fbfe180, source=(val_ = 0x0000000106848e48), filename=(val_ = 0x0000000106848e40)) + 426 at node.cc:1211, queue = 'com.apple.main-thread', stop reason = step over
    frame #0: 0x000000010008c20a node`node::ExecuteString(env=0x00007fff5fbfe180, source=(val_ = 0x0000000106848e48), filename=(val_ = 0x0000000106848e40)) + 426 at node.cc:1211
   1208	      v8::Script::Compile(env->context(), source, &origin);
   1209	  if (script.IsEmpty()) {
   1210	    ReportException(env, try_catch);
-> 1211	    exit(3);
   1212	  }
   1213

I don't see this error on the CI servers and wanted to bring this up and ask if anyone else has seen this?

@Trott
Copy link
Member

Trott commented May 22, 2018

I don't see this error on the CI servers and wanted to bring this up and ask if anyone else has seen this?

I have not seen it before.

@MylesBorins
Copy link
Contributor

@danbev
Copy link
Contributor Author

danbev commented May 24, 2018

just got a similar failure on AIX

Great, I'll take a closer look. Thanks

@Trott
Copy link
Member

Trott commented May 24, 2018

@danbev Does the test work if you revert 352ae23?

@Trott
Copy link
Member

Trott commented May 24, 2018

On my laptop, if I use --stack-size=5, I see this.

@danbev
Copy link
Contributor Author

danbev commented May 24, 2018

@danbev Does the test work if you revert 352ae23?

Yep, it works if I revert that commit.

@gireeshpunathil
Copy link
Member

Minimal reproduce. Analysis for AIX is posted in #20688 same applies for MAC too, though with a different stack size (fluctates between systems and other load factors I guess)

#cat 20888.js

function fn() {
  fn();
}
async function foo() {
 await fn();
}
foo()

#node 20888.js

(node:69273) UnhandledPromiseRejectionWarning: RangeError: Maximum call stack size exceeded
    at fn (/home/gireesh/20888.js:1:74)
...
(node:69273) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error ...

#echo $?
0
#node --stack-size=50 20888.js

(node:69278) UnhandledPromiseRejectionWarning: RangeError: Maximum call stack size exceeded
    at fn (/home/gireesh/20888.js:1:74)
(node:69278) UnhandledPromiseRejectionWarning: Unhandled promise rejection...
#echo $?
0

#node --stack-size=40 20888.js

internal/bootstrap/loaders.js:91
  const ContextifyScript = process.binding('contextify').ContextifyScript;
                                   ^
RangeError: Maximum call stack size exceeded
    at bootstrapInternalLoaders (internal/bootstrap/loaders.js:91:36)

#echo $?
6

@ryzokuken
Copy link
Contributor

FWIW, I just ran tests locally for #20916 and nothing failed.

@gireeshpunathil
Copy link
Member

was this observed since the last report (in May)? looks like no to me.

@Trott
Copy link
Member

Trott commented Dec 4, 2018

was this observed since the last report (in May)? looks like no to me.

If it's not reported here, it's unlikely anyone is going to remember having observed it, so you can tentatively assume "No, it has not been observed since."

@gireeshpunathil
Copy link
Member

closing, as this does not look like has been observed since. Please re-open if that is not the case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants