RESOLVED FIXED302929
[WTF] WorkerPool::Worker should use a CheckedPtr instead of a CheckedRef for the WorkerPool reference
https://bugs.webkit.org/show_bug.cgi?id=302929
Summary [WTF] WorkerPool::Worker should use a CheckedPtr instead of a CheckedRef for ...
Carlos Garcia Campos
Reported 2025-11-21 02:52:19 PST
Since AtomicThread keeps a reference of itself while the thread is running, it can happen that the WorkerPool is destroyed before the thread actually finishes even if join was called and threadIsStopping is already called. This can happen easily when the system is under heavy load, as we have seen in the bots when running the layout tests. Thread 1 (Thread 0x7f303bfff6c0 (LWP 2794572)): #0 0x00007f3215e17d2f in WTFCrash () at /home/buildbot-worker/WPE-WK2-Tests-EWS/build/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1 #1 0x00007f3215f2c351 in WTF::WorkerPool::Worker::~Worker() () at /home/buildbot-worker/WPE-WK2-Tests-EWS/build/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1 #2 0x00007f3215e1b25e in WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::{lambda()#1}, void>::~CallableWrapper() () at /home/buildbot-worker/WPE-WK2-Tests-EWS/build/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1 #3 0x00007f3215f858dd in WTF::wtfThreadEntryPoint(void*) () at /home/buildbot-worker/WPE-WK2-Tests-EWS/build/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1 #4 0x00007f320e08aaa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447 #5 0x00007f320e117c6c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Attachments
Carlos Garcia Campos
Comment 1 2025-11-21 02:53:44 PST
EWS
Comment 2 2025-11-23 13:42:14 PST
Committed 303468@main (5491e2624243): <https://commits.webkit.org/303468@main> Reviewed commits have been landed. Closing PR #54305 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-11-23 13:43:12 PST
Michael Catanzaro
Comment 4 2025-11-25 09:50:00 PST
*** Bug 303104 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.