I finally figured out what went wrong and it's almost embarrassing: The 
crash occurred specifically on single core machines as I was allocating a 
worker thread for each available core, but always subtracted 1 for the main 
thread. On single core machines this meant that no workers were allocated 
causing V8 to crash on the as soon as garbage collection was triggered.

On Saturday, 3 May 2025 at 11:46:11 UTC+2 Kasper Isager Dalsgarð wrote:

> Another colleague is now hitting this on a Linux machine running under 
> KVM. I'm still no closer to figuring out where things go wrong; any input 
> would be greatly appreciated.
>
> On Thursday, 15 August 2024 at 14:00:29 UTC+2 Kasper Isager Dalsgarð wrote:
>
>> After several attempts at debugging this, I *think* I've narrowed it 
>> down to the some sort of interaction with QEMU as it consistently happens 
>> when running V8 on an emulated Android device on both 32- and 64-bit 
>> architectures.
>>
>> On Thursday 7 March 2024 at 09:48:23 UTC+1 Kasper Isager Dalsgarð wrote:
>>
>>> A colleague of mine briefly hit the same assertion on Android arm64-v8a, 
>>> but has since been unable to reproduce it. I still haven't been able to 
>>> narrow down what triggers it.
>>>
>>> On Thursday 22 February 2024 at 12:07:22 UTC+1 Kasper Isager Dalsgarð 
>>> wrote:
>>>
>>>> I'm consistently observing a crash on Android armeabi-v7a during 
>>>> scavenge collection triggered by `String::NewFromUtf8(Isolate *, const 
>>>> char 
>>>> *)`, though I don't suspect that the exact call that triggered the 
>>>> scavenge 
>>>> collection relates to the issue. For reference, this is the failing debug 
>>>> check I'm hitting:
>>>>
>>>> ```
>>>> #
>>>> # Fatal error in ../../../v8/src/heap/scavenger.cc, line 393
>>>> # Debug check failed: copied_list.IsEmpty().
>>>> #
>>>> ```
>>>>
>>>> I'm having a really hard time debugging why this happens and the fact 
>>>> that it doesn't happen on arm64-v8a has me even more puzzled. I've read 
>>>> through https://groups.google.com/g/v8-users/c/sdU232XmyOw where the 
>>>> same debug check failed, but the was caused by a race condition whereas 
>>>> the 
>>>> code I'm running uses only a single thread.
>>>>
>>>> Which APIs could cause that check to fail? I've tried removing all my 
>>>> uses of weak persistent handles, for example, but that doesn't make a 
>>>> difference. Could it my `Platform` implementation that breaks some 
>>>> invariants that I'm not aware of?
>>>>
>>>> All of the code that interacts with V8 is available here by the way: 
>>>> https://github.com/holepunchto/libjs. I of course don't expect anyone 
>>>> to read through all of that, I'll provide excerpts and summaries of 
>>>> portions that might be relevant to the issue.
>>>>
>>>> Any help would be much appreciated, thanks!
>>>>
>>>

-- 
-- 
v8-users mailing list
v8-users@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+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/v8-users/2b3123c0-800d-4c99-be31-6f26d09f8df8n%40googlegroups.com.

Reply via email to