Nikos I am still confuse. The documentation also state that reenter the isolate is allowed: https://source.chromium.org/chromium/chromium/src/+/main:v8/include/v8-isolate.h;l=731 So before creating an unlocker we must exit the isolate the number of times we entered it (and then re-enter it again the same number of times after the unlocker is destroyed)?
Or is there some mechanism that handles it when we exit/enter the isolate? On Tuesday 16 January 2024 at 13:58:19 UTC+2 Meir Shpilraien wrote: > Thanks Nikos, > > You are right, I missed it in our documentation. Will fix our code. > > Thank you for the quick response. > > On Tuesday 16 January 2024 at 13:46:19 UTC+2 [email protected] wrote: > >> Hi Meir, >> >> You are correct about the purpose of the CHECK that I introduced in CL >> 5173257 <https://chromium-review.googlesource.com/c/v8/v8/+/5173257>. >> >> The documentation >> <https://source.chromium.org/chromium/chromium/src/+/main:v8/include/v8-locker.h;drc=65034fdf545d2f937dd05f1aa535c39ba21ccac5;l=45> >> >> of the Locker/Unlocker API specifies that a thread has to exit the isolate >> before using v8::Unlocker and enter it again afterwards. >> >> Without seeing your code, I cannot be sure that this is the issue but >> from what you write I suspect that it is. It should also be very easy to >> fix. >> >> See here for a similar fix that had to be made in chromium: CL 5168625 >> <https://chromium-review.googlesource.com/c/chromium/src/+/5168625>. >> >> Best regards, >> Nikos. >> >> On Tuesday, January 16, 2024 at 12:18:22 PM UTC+1 [email protected] wrote: >> >> Hey, >> >> We recently encounter an issue in which our code, when run on V8 main >> branch, crashes with this fatal error: >> # >> # Fatal error in ../../src/execution/isolate.cc, line 4996 >> # Check failed: current_thread_id_ == thread_id (<unprintable> vs. >> <unprintable>). >> # >> # >> # >> >> I saw that this check was added recently on this PR: >> https://chromium-review.googlesource.com/c/v8/v8/+/5173257 >> >> Its purpose is to verify a correct use of entering and existing an >> isolate. But I do not see it is taking into consideration the >> Locker/Unlocker API. In case the current thread uses Unlocker and then >> another thread tries to enter the isolate it will failed. >> >> Is my analysis correct or am I missing something? >> Thanks, >> Meir >> >> Disclaimer The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful. This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. Providing a safer and more useful place for your human generated data. Specializing in; Security, archiving and compliance. To find out more visit the Mimecast website. -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/15e6f6d5-176c-4e3b-b739-0ab88668fb5en%40googlegroups.com.
