Skip to content

Assertion Error on v8.11.4 (macOS 10.13) #22570

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
gdams opened this issue Aug 28, 2018 · 3 comments
Closed

Assertion Error on v8.11.4 (macOS 10.13) #22570

gdams opened this issue Aug 28, 2018 · 3 comments
Labels
child_process Issues and PRs related to the child_process subsystem.

Comments

@gdams
Copy link
Member

gdams commented Aug 28, 2018

  • Version: v8.11.4
  • Platform: Darwin irtdev01x 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
  • Subsystem:

I'm not 100% sure what the cause of the isssue is here so any help would be appreciated!

node[55901]: ../src/process_wrap.cc:167:static void node::(anonymous namespace)::ProcessWrap::Spawn(const FunctionCallbackInfo<v8::Value> &): Assertion `gid_v->IsInt32()' failed.
 1: node::Abort() [/Users/jenkins/.nvs/node/8.11.4/x64/bin/node]
 2: node::(anonymous namespace)::DomainEnter(node::Environment*, v8::Local<v8::Object>) [/Users/jenkins/.nvs/node/8.11.4/x64/bin/node]
 3: node::(anonymous namespace)::ProcessWrap::Spawn(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/jenkins/.nvs/node/8.11.4/x64/bin/node]
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/Users/jenkins/.nvs/node/8.11.4/x64/bin/node]
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/Users/jenkins/.nvs/node/8.11.4/x64/bin/node]
 6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/jenkins/.nvs/node/8.11.4/x64/bin/node]
 7: 0x3030c1b042fd

Steps to recreate:

npm install -g citgm
citgm <any_module>
@addaleax
Copy link
Member

I can’t reproduce this locally, but … child_process.spawn('node', {gid: (2**20)**2}) does the trick, even on master, because we check only that gid is an integer in JS, when we really should check that it’s an Int32 (and there’s a chance of it being a getter, which I think we also don’t account for).

@addaleax addaleax added the child_process Issues and PRs related to the child_process subsystem. label Aug 28, 2018
lundibundi added a commit to lundibundi/node that referenced this issue Aug 29, 2018
uid/gid must be uint32, which is asserted on a c++ side but wasn't
checked on a JS side and therefore resulted in a process crash.

Refs: nodejs#22570
@gdams
Copy link
Member Author

gdams commented Aug 29, 2018

FYI the gid on this mac was as follows:

id jenkins
uid=20001(jenkins) gid=4294967295(nogroup) groups=12(everyone),20(staff),61(localaccounts),702(com.apple.sharepoint.group.2),701(com.apple.sharepoint.group.1),703(com.apple.sharepoint.group.3),100(_lpoperator)

changing it from 4294967295(nogroup) to 20(staff) has fixed things on my end

addaleax pushed a commit that referenced this issue Aug 31, 2018
uid/gid must be uint32, which is asserted on a c++ side but wasn't
checked on a JS side and therefore resulted in a process crash.

Refs: #22570

PR-URL: #22574
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
addaleax pushed a commit that referenced this issue Aug 31, 2018
uid/gid must be uint32, which is asserted on a c++ side but wasn't
checked on a JS side and therefore resulted in a process crash.

Refs: #22570

PR-URL: #22574
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
targos pushed a commit that referenced this issue Sep 3, 2018
uid/gid must be uint32, which is asserted on a c++ side but wasn't
checked on a JS side and therefore resulted in a process crash.

Refs: #22570

PR-URL: #22574
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
targos pushed a commit that referenced this issue Sep 6, 2018
uid/gid must be uint32, which is asserted on a c++ side but wasn't
checked on a JS side and therefore resulted in a process crash.

Refs: #22570

PR-URL: #22574
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@apapirovski
Copy link
Contributor

This got fixed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
child_process Issues and PRs related to the child_process subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants