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

/var/lang/bin/node[8]: ../src/spawn_sync.cc:460:v8::Maybe<bool> node::SyncProcessRunner::TryInitializeAndRunLoop(v8::Local<v8::Value>): Assertion `(uv_loop_init(uv_loop_)) == (0)' failed. #34855

Closed
Ra-works opened this issue Aug 20, 2020 · 4 comments

Comments

@Ra-works
Copy link

  • Version:
  • Platform:
  • Subsystem:

What steps will reproduce the bug?

Executing Node code on aws lambda

How often does it reproduce? Is there a required condition?

It is getting reproduced more often, but unable to get the specific scenario

What is the expected behavior?

It should not this error and should continue to run

What do you see instead?

2020-08-19T17:24:39.485+05:30
module: "startLinking"

2020-08-19T17:24:39.514+05:30
/var/lang/bin/node[8]: ../src/spawn_sync.cc:460:v8::Maybe node::SyncProcessRunner::TryInitializeAndRunLoop(v8::Localv8::Value): Assertion `(uv_loop_init(uv_loop_)) == (0)' failed.

2020-08-19T17:24:39.517+05:30
1: 0x560b92e29093 node::Abort() [/var/lang/bin/node]

2020-08-19T17:24:39.517+05:30
2: 0x560b92e29122 [/var/lang/bin/node]

2020-08-19T17:24:39.518+05:30
3: 0x560b92f07363 node::SyncProcessRunner::TryInitializeAndRunLoop(v8::Localv8::Value) [/var/lang/bin/node]

2020-08-19T17:24:39.518+05:30
4: 0x560b92f07542 node::SyncProcessRunner::Spawn(v8::FunctionCallbackInfov8::Value const&) [/var/lang/bin/node]

2020-08-19T17:24:39.519+05:30
5: 0x560b930496c6 [/var/lang/bin/node]

2020-08-19T17:24:39.519+05:30
6: 0x560b9304b401 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [/var/lang/bin/node]

2020-08-19T17:24:39.520+05:30
7: 0x560b938be2b9 [/var/lang/bin/node]

2020-08-19T17:24:40.065+05:30
END RequestId: f10633e7-61e7-457c-8547-ba1c39302550

2020-08-19T17:24:40.065+05:30
REPORT RequestId: f10633e7-61e7-457c-8547-ba1c39302550 Duration: 15956.00 ms Billed Duration: 16000 ms Memory Size: 3008 MB Max Memory Used: 595 MB Init Duration: 1749.62 ms

2020-08-19T17:24:40.065+05:30
RequestId: f10633e7-61e7-457c-8547-ba1c39302550 Error: Runtime exited with error: signal: aborted (core dumped) Runtime.ExitError

2020-08-19T17:24:40.204+05:30
2020-08-19T11:54:40.204Z undefined INFO The NODE_ENV set in target environment is - dev

Additional information

Unable to reproduce but mostly it is of memory issue but AWS Lambda have enough memory and as per log it did not reach the threshold

@rickyes
Copy link
Contributor

rickyes commented Aug 20, 2020

Hi, @ragorepo. Can you provide the specific code? By the way, a good title can make it easier for everyone to see issues related to their interests.

@Ra-works
Copy link
Author

Ra-works commented Aug 20, 2020

Hi, @ragorepo. Can you provide the specific code? By the way, a good title can make it easier for everyone to see issues related to their interests.

Thanks @rickyes for the reply. I tried to search related issues for last few days but no luck. This appears to be specific issue. Unable to comeup with better title rather than the exception itself.

Unfortunately despite keeping multiple log statements unable to comeup with exact location where the runtime error happening.

I could drill down to this code below:
..
...
....

   const asyncClientApi = (request) => new Promise((resolve, reject) => clients.startLinking(request, (error, linkingResponse) => {
        if( error != null ) {
            log.info("connection failed ", error);
            reject( error );
        }
        resolve({"error": error, "linkingResponse": linkingResponse});

    }));
    let {error, linkingResponse} = await asyncClientApi(request);

...
..

Please note the error is not caught or rejected. It is occurring as runtime and AWS Lambda is getting aborted.

I have upgraded nodejs versions and still the issue reproducable.

Unable to figure out the rootcause/reason with the error.

@bnoordhuis
Copy link
Member

I'm fairly sure AWS Lambda uses a custom build of Node.js so you should probably report this to them.

If you can also reproduce with a node binary from https://nodejs.org/, please fill out the issue template and include steps to reproduce.

@bnoordhuis
Copy link
Member

#34874 - it won't fix running out of resources but it will fix the abrupt termination. You'll get a regular exception instead.

@Trott Trott closed this as completed in b8ab49f Aug 24, 2020
danielleadams pushed a commit that referenced this issue Aug 25, 2020
Fixes: #34855

PR-URL: #34874
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
addaleax pushed a commit that referenced this issue Sep 22, 2020
Fixes: #34855

PR-URL: #34874
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
addaleax pushed a commit that referenced this issue Sep 22, 2020
Fixes: #34855

PR-URL: #34874
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
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

Successfully merging a pull request may close this issue.

3 participants