Steps to reproduce: 1. Log into gnome-shell (currently version 44 using mozjs102). 2. Wait or use it for a while (long enough for some GC to have occurred I guess). 3. Log out. https://launchpad.net/bugs/1974293 https://gitlab.gnome.org/GNOME/gjs/-/issues/472 Actual results: #0 __pthread_kill_implementation (no_tid=0, signo=11, threadid=) at ./nptl/pthread_kill.c:44 tid = ret = 0 pd = old_mask = {__val = {11}} ret = #1 __pthread_kill_internal (signo=11, threadid=) at ./nptl/pthread_kill.c:78 #2 __GI___pthread_kill (threadid=, signo=signo@entry=11) at ./nptl/pthread_kill.c:89 #3 0x00007f464d03c406 in __GI_raise (sig=sig@entry=11) at ../sysdeps/posix/raise.c:26 ret = #4 0x000056282c4afaea in dump_gjs_stack_on_signal_handler (signo=11) at ../src/main.c:495 sa = {__sigaction_handler = {sa_handler = 0x56282c4af730 , sa_sigaction = 0x56282c4af730 }, sa_mask = {__val = {0 }}, sa_flags = 0, sa_restorer = 0x0} i = #5 0x00007f464d03c4b0 in () at /lib/x86_64-linux-gnu/libc.so.6 #6 0x00007f464ad8d344 in js::gc::Cell::storeBuffer() const (this=, this=) at /usr/src/mozjs102-102.9.0-1/js/src/gc/Cell.h:357 buffer = 0x0 #7 js::gc::PostWriteBarrierImpl(void*, JSObject*, JSObject*) (next=, prev=, cellp=) at /usr/src/mozjs102-102.9.0-1/js/src/gc/StoreBuffer.h:646 buffer = 0x0 #8 js::gc::PostWriteBarrier(js::SavedFrame**, js::SavedFrame*, js::SavedFrame*) (next=, prev=, vp=) at /usr/src/mozjs102-102.9.0-1/js/src/gc/StoreBuffer.h:658 #9 js::InternalBarrierMethods::postBarrier(js::SavedFrame**, js::SavedFrame*, js::SavedFrame*) (next=, prev=, vp=0x7f4630022da0) at /usr/src/mozjs102-102.9.0-1/js/src/gc/Barrier.h:350 #10 js::InternalBarrierMethods::postBarrier(js::SavedFrame**, js::SavedFrame*, js::SavedFrame*) (vp=0x7f4630022da0, prev=, next=) at /usr/src/mozjs102-102.9.0-1/js/src/gc/Barrier.h:349 #11 0x00007f464d91f721 in js::BarrierMethods::postWriteBarrier(JSObject**, JSObject*, JSObject*) (next=0x0, prev=, vp=0x7f4630022da0) at /usr/include/mozjs-102/js/RootingAPI.h:795 p = 0x7f4630022da0 #12 JS::Heap::postWriteBarrier(JSObject* const&, JSObject* const&) (next=, prev=@0x7f4630022da0: 0x1c8a30a483a0, this=0x7f4630022da0, this=, prev=, next=) at /usr/include/mozjs-102/js/RootingAPI.h:376 p = 0x7f4630022da0 #13 JS::Heap::~Heap() (this=0x7f4630022da0, this=) at /usr/include/mozjs-102/js/RootingAPI.h:338 p = 0x7f4630022da0 #14 mozilla::detail::VectorImpl, 0ul, js::SystemAllocPolicy, false>::destroy(JS::Heap*, JS::Heap*) (aEnd=0x7f4630022da8, aBegin=) at /usr/include/mozjs-102/mozilla/Vector.h:65 p = 0x7f4630022da0 #15 mozilla::Vector, 0ul, js::SystemAllocPolicy>::~Vector() (this=0x56282d2db9d8, this=) at /usr/include/mozjs-102/mozilla/Vector.h:901 #16 JS::GCVector, 0ul, js::SystemAllocPolicy>::~GCVector() (this=0x56282d2db9d8, this=) at /usr/include/mozjs-102/js/GCVector.h:43 #17 GjsContextPrivate::~GjsContextPrivate() (this=0x56282d2db960, this=) at /usr/src/gjs-1.76.0-1/obj-x86_64-linux-gnu/../gjs/context.cpp:487 #18 0x00007f464d9211e3 in gjs_context_finalize(GObject*) (object=0x56282d2dbae0) at /usr/src/gjs-1.76.0-1/obj-x86_64-linux-gnu/../gjs/context.cpp:500 gjs = #19 0x00007f464e02ee4c in g_object_unref (_object=0x56282d2dbae0) at ../../../gobject/gobject.c:3938 weak_locations = nqueue = 0x56282d8fc5c0 object = 0x56282d2dbae0 old_ref = __func__ = "g_object_unref" #20 0x00007f464dc2508d in _shell_global_destroy_gjs_context (self=) at ../src/shell-global.c:752 _pp = _ptr = #21 0x000056282c4af00f in main (argc=, argv=) at ../src/main.c:776 context = 0x56282cd4e780 debug_flags_string = 0x56282d06c7b0 "backtrace-aborts:backtrace-math-errors:backtrace-crashes-all:backtrace-all" error = 0x0 shell_debug = ecode = 0 (gdb) Expected results: No crash.