Hi Jakob,
The issue started with 11.0 (10.9 is good). More precisely it's commit 26bc8bb4 (see [1]).
Unfortunately, without knowledge of the v8 internals, it's really hard to find a direct link in this commit to the place mksnapshot exits and debug further. It would be fantastic if I could get some more hints or a patch to try (even if untested).
Thanks,
Jean-Claude
--------------------------
[1] git bisect output
C:\Users\jean-claude\Documents\src\google\v8>git bisect good
26bc8bb4013a984d9e7a3e8feff8b1058458f349 is the first bad commit
commit 26bc8bb4013a984d9e7a3e8feff8b1058458f349
Date: Wed Nov 23 15:06:55 2022 +0100
[ext-code-space] Make process-wide code range leaky
Make the process-wide code range a once-initialised leaky object, rather
than having a global weak_ptr + per-heap shared pointers and allowing it
to be collected when all Isolates die.
These weak pointers add locking overhead when accessing the code range,
which shows up in GC and deoptimization traces when attempting to
calculate Code objects from PCs. The process-wide pointer compression
cage is already leaky, so it makes sense for the code range to be
similar.
Bug: v8:11460
Change-Id: Ibebd468ebad9eafe8aec49f575cdbf604e4b6cc0
Cr-Commit-Position: refs/heads/main@{#84462}
src/execution/isolate.cc | 3 +-
src/heap/code-range.cc | 61 ++++++++++++++++------------------
src/heap/code-range.h | 7 ++--
src/heap/heap.cc | 28 ++++++++--------
src/heap/heap.h | 14 ++++++--
src/init/isolate-allocator.cc | 3 +-
src/objects/code.cc | 2 +-
src/snapshot/embedded/embedded-data.cc | 2 +-
src/snapshot/embedded/embedded-data.h | 2 +-
9 files changed, 64 insertions(+), 58 deletions(-)