[webkit-reviews] review requested: [Bug 30814] [GTK] Threading problems with some of the tests : [Attachment 42109] crossthreadstring.diff

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 29 10:29:10 PDT 2009


Xan Lopez <xan.lopez at gmail.com> has asked  for review:
Bug 30814: [GTK] Threading problems with some of the tests
https://bugs.webkit.org/show_bug.cgi?id=30814

Attachment 42109: crossthreadstring.diff
https://bugs.webkit.org/attachment.cgi?id=42109&action=review

------- Additional Comments from Xan Lopez <xan.lopez at gmail.com>
This patch seems to fix the crashers I can reproduce locally. I don't claim to
fully understand what's going on, but from reading the code it seems the m_name
string in Database is created with crossThreading String, the others are not
used differently than this one is, and so it would seem natural to expect that
all of them have to be created like that. More evidence for this comes from the
fact that the trace for the crash is like:

Thread 3 (Thread 0xb6defb90 (LWP 19474)):
#0  0x00cabea9 in WTF::CrossThreadRefCounted<WTF::OwnFastMallocPtr<unsigned
short> >::deref (this=0x840c390) at
../../JavaScriptCore/wtf/CrossThreadRefCounted.h:122
#1  0x0117b4b2 in ~StringImpl (this=0x83d3cf0) at
../../WebCore/platform/text/StringImpl.cpp:108
#2  0x00b10ad5 in WTF::RefCounted<WebCore::StringImpl>::deref (this=0x83d3cf0)
at ../../JavaScriptCore/wtf/RefCounted.h:109
#3  0x00b107eb in ~RefPtr (this=0x840bbac) at
../../JavaScriptCore/wtf/RefPtr.h:53
#4  0x00b10129 in ~String (this=0x840bbac) at
../../WebCore/platform/text/PlatformString.h:69
#5  0x012d4825 in ~Database (this=0x840bb10) at
../../WebCore/storage/Database.cpp:200
#6  0x010055a1 in WTF::ThreadSafeShared<WebCore::Database>::deref
(this=0x840bb10) at ../../JavaScriptCore/wtf/Threading.h:313
#7  0x01001153 in ~RefPtr (this=0x8408aec) at
../../JavaScriptCore/wtf/RefPtr.h:53
#8  0x012e0fa6 in WTF::HashTable<WTF::RefPtr<WebCore::Database>,
WTF::RefPtr<WebCore::Database>,
WTF::IdentityExtractor<WTF::RefPtr<WebCore::Database> >,
WTF::PtrHash<WTF::RefPtr<WebCore::Database> >,
WTF::HashTraits<WTF::RefPtr<WebCore::Database> >,
WTF::HashTraits<WTF::RefPtr<WebCore::Database> > >::deallocateTable
(table=0x8408a50, size=64) at ../../JavaScriptCore/wtf/HashTable.h:872
#9  0x012e0392 in ~HashTable (this=0xb6def24c) at
../../JavaScriptCore/wtf/HashTable.h:296
#10 0x012e0105 in ~HashSet (this=0xb6def24c) at
../../JavaScriptCore/wtf/HashSet.h:38
#11 0x012dfc16 in WebCore::DatabaseThread::databaseThread (this=0x83d3e48) at
../../WebCore/storage/DatabaseThread.cpp:117
#12 0x012dfa2b in WebCore::DatabaseThread::databaseThreadStart
(vDatabaseThread=0x83d3e48) at ../../WebCore/storage/DatabaseThread.cpp:82
#13 0x00c0540e in threadEntryPoint (contextData=0x83d3f10) at
../../JavaScriptCore/wtf/Threading.cpp:64
#14 0x0024651f in start_thread (arg=0xb6defb90) at pthread_create.c:297
#15 0x0309b04e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

And upon inspection the string being destroyed is m_displayName.


More information about the webkit-reviews mailing list