Upgrading v8 from 7.4 to 8.5

122 views
Skip to first unread message

Vinayaka Kamath

unread,
Nov 3, 2020, 12:19:21 AM11/3/20
to v8-users
Hello All,

I am involved with a project that relies on v8 for most of its features. We are trying to upgrade the v8 engine to 8.5 and the project compiles without any error.

We also have a debugger that uses inspector protocol -- however after the upgradation the debugger crashes when session_->dispatchProtocolMessage(message); is invoked.

I am relatively new to v8 and don't understand it completely, however I noticed that the implementation of platform, return values of Set, Get were changed between the versions(and the corresponding changes are made). I don't see any changes with respect to the inspector -- I am afraid I am missing something here. 


Any help would be very much appreciated! 

The debugger crashes with the following message:
==============================================
# Fatal error in HandleScope::HandleScope
# Entering the V8 API without proper locking in place
#
== Minidump location: crash/cfecbc18-15f2-428d-a10256ac-40061e00.dmp Status: 1 ==
Failed to read from stderr pipe, err: EOF
Failed to read from stdout pipe, err: EOF
Exiting c++ debug worker with error: signal: illegal instruction
===============================================

Also the symbols in the coredump (after conversion from minidump to coredump) is not getting resolved. I see ????? for line numbers and function names!

Vinayaka Kamath

unread,
Nov 3, 2020, 1:16:40 AM11/3/20
to v8-users
I have attached the stack trace from attaching the debugger to the running program below:

Ben Ernst

unread,
Nov 3, 2020, 2:52:34 AM11/3/20
to v8-u...@googlegroups.com
Vinayaka, the answer is here in your console output.

# Fatal error in HandleScope::HandleScope
# Entering the V8 API without proper locking in place
#  

You want to use v8::Locker consistently, pretty much wherever you have a HandleScope you need to instantiate a v8::Locker immediately before.

Regards,
Ben

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/6e4e4a0c-b446-471b-8076-04afb2b3f5cen%40googlegroups.com.

Vinayaka Kamath

unread,
Nov 3, 2020, 3:04:15 AM11/3/20
to v8-users
Hello Ben,

But I don't have an HandleScopes in my code -- neither in my InspectorClient nor in my agent. The error seems to be getting raised from v8::Utils::ApiCheck(). Do I need to set some flags in any of the changed function prototypes in the new v8 version? or does any of the new functions corresponding to the v8-inspector require a locker on isolate? Because the exact same code doesn't crash with older versions of v8.

Thanks 

Vinayaka Kamath

unread,
Nov 3, 2020, 3:56:45 AM11/3/20
to v8-users
Hello,

While upgrading the v8 version -- I have replaced platform->CallOnForegroundThread  with platform->CallOnWorkerThread. Could the "Fatal error in HandleScope::HandleScope # Entering the V8 API without proper locking in place" happen because of that?

Thanks

Ben Noordhuis

unread,
Nov 3, 2020, 4:29:08 AM11/3/20
to v8-users
On Tue, Nov 3, 2020 at 9:56 AM Vinayaka Kamath
<vinayak...@couchbase.com> wrote:
> While upgrading the v8 version -- I have replaced platform->CallOnForegroundThread with platform->CallOnWorkerThread. Could the "Fatal error in HandleScope::HandleScope # Entering the V8 API without proper locking in place" happen because of that?

The task calls into V8? Then yes, that's almost certainly it.
Reply all
Reply to author
Forward
0 new messages