Skip to content

fatal v8 error:Entering the V8 API without proper locking in place  #23997

Description

@lolobug
stack :
signal 6 (SIGABRT), code -6 (?), fault addr 00004d37
#00  pc 0x39acc  /system/lib/libc.so (tgkill+12)
#01  pc 0x13dad  /system/lib/libc.so (pthread_kill+52)
#02  pc 0x14a27  /system/lib/libc.so (raise+10)
#03  pc 0x11145  /system/lib/libc.so (???)
#04  pc 0xf6ac  /system/lib/libc.so (abort+4)
#05  pc 0x37291  /data/app/com.xxxx-1/lib/arm/libj2v8.so (???)
#06  pc 0x3943ed  /data/app/com.xxxx-1/lib/arm/libv8.so (v8::HandleScope::Initialize(v8::Isolate*)+100)
#07  pc 0x394381  /data/app/com.xxxx-1/lib/arm/libv8.so (v8::HandleScope::HandleScope(v8::Isolate*)+4)
#08  pc 0xbccdc  /data/app/com.xxxx-1/lib/arm/libnode.so (node::Environment::CheckImmediate(uv_check_s*)+40)
  • Version:10.3.0
  • Platform:android:
    Subsystem:

V8 fatat handler message : Entering the V8 API without proper locking in place (HandleScope::HandleScope)
This occurs by chance.

I noticed :

uv_check_start(immediate_check_handle(), CheckImmediate);

Actually I place all the operations of node in a single thread and use a V8::Locker.
Is it possible that the CheckImmediate will switch to another thread?

there's V8 HandleScope::Initialize code:

Utils::ApiCheck(
  !v8::Locker::IsActive() ||
  internal_isolate->thread_manager()->IsLockedByCurrentThread() ||
   internal_isolate->serializer_enabled(),
   "HandleScope::HandleScope",
   "Entering the V8 API without proper locking in place");

Activity

  1. added
    c++Issues and PRs that require attention from people who are familiar with C++.
    v8 engineIssues and PRs related to the V8 dependency.
    on Nov 3, 2018
  2. Trott commented on Nov 4, 2018

    @Trott
    Member

    I know Android is currently an unsupported platform, but any chance someone wants to comment on this issue? @nodejs/v8

  3. hashseed commented on Nov 4, 2018

    @hashseed
    Member

    Don't use lockers if you only use a single thread.

    I can't provide any more advice without more context unfortunately.

  4. refack commented on Nov 4, 2018

    @refack
    Contributor

    @JaneaSystems have a working Android version (@joaocgreis, @bzoz)

  5. lolobug commented on Nov 5, 2018

    @lolobug
    Author

    Don't use lockers if you only use a single thread.

    I can't provide any more advice without more context unfortunately.

    Thanks @hashseed . It may be solved without using a locker.
    But I want to know whether the "CheckImmediate" callback switch to another thread from the main thread of the uv loop.
    uv_check_start(immediate_check_handle(), CheckImmediate);

  6. jaimecbernardo commented on Nov 5, 2018

    @jaimecbernardo
    Contributor

    @JaneaSystems have a working Android version (@joaocgreis, @bzoz)

    Regarding https://github.com/janeasystems/nodejs-mobile on Android:

    We don't have any related issue, nor have anything similar happened on out tests, so I'm not sure what this can be. Our scenario is single threaded use for mobile, so it may not even occur inside that scenario, since we're not using the mentioned V8::Locker.

  7. added
    embeddingIssues and PRs related to embedding Node.js in another project.
    on Nov 5, 2018
  8. addaleax commented on Nov 5, 2018

    @addaleax
    Member

    @lolobug This sounds like an issue with embedding Node and using libnode.so, but that means that, most likely, we are unable to help unless you share more information about your embedding usage (for example, your code?).

  9. Trott commented on Nov 13, 2018

    @Trott
    Member

    I'm going to close this, but feel free to re-open if code is shared from original poster or if it otherwise becomes possible to troubleshoot further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++Issues and PRs that require attention from people who are familiar with C++.embeddingIssues and PRs related to embedding Node.js in another project.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions