Bug 302929
| Summary: | [WTF] WorkerPool::Worker should use a CheckedPtr instead of a CheckedRef for the WorkerPool reference | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> |
| Component: | Web Template Framework | Assignee: | Carlos Garcia Campos <cgarcia> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bugs-noreply, mcatanzaro, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Carlos Garcia Campos
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Carlos Garcia Campos
Pull request: https://github.com/WebKit/WebKit/pull/54305
EWS
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
<rdar://problem/165312694>
Michael Catanzaro
*** Bug 303104 has been marked as a duplicate of this bug. ***