[Webkit-unassigned] [Bug 54629] [webkitwebsrc] locks randomly fetching an uri
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 13 05:50:37 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=54629
Philippe Normand <pnormand at igalia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mrobinson at webkit.org,
| |svillar at igalia.com
--- Comment #4 from Philippe Normand <pnormand at igalia.com> 2011-04-13 05:50:37 PST ---
I can't reproduce that exact deadlock here. However I found some issues related to multi-threading in ResourceHandleSoup.
The hlsdemux element runs a thread which creates a WebKitWebSrc element (and that chains into WebKit's resource loader) for each fragment to get from the server.
It seems that using a GRefPtr in the libsoup read/close callbacks triggers some threadsafety crashes like this one:
(gdb) bt
#0 0x00007f5446fd6579 in WebCore::TimerBase::stop (this=0x7f5430099e38)
at ../../Source/WebCore/platform/Timer.cpp:189
#1 0x00007f5446fd641c in WebCore::TimerBase::~TimerBase (this=0x7f5430099e38,
__in_chrg=<value optimized out>) at ../../Source/WebCore/platform/Timer.cpp:175
#2 0x00007f54467e8bc6 in WebCore::Timer<WebCore::ResourceHandle>::~Timer (this=0x7f5430099e38,
__in_chrg=<value optimized out>) at ../../Source/WebCore/platform/network/ResourceHandle.h:94
#3 0x00007f54467e4da6 in WebCore::ResourceHandleInternal::~ResourceHandleInternal (this=0x7f5430099a00,
__in_chrg=<value optimized out>) at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:134
#4 0x00007f54467ea3ad in WTF::deleteOwnedPtr<WebCore::ResourceHandleInternal> (ptr=0x7f5430099a00)
at ../../Source/JavaScriptCore/wtf/OwnPtrCommon.h:59
#5 0x00007f54467e973b in WTF::OwnPtr<WebCore::ResourceHandleInternal>::~OwnPtr (this=0x7f54300a79f0,
__in_chrg=<value optimized out>) at ../../Source/JavaScriptCore/wtf/OwnPtr.h:57
#6 0x00007f54467e4ebd in WebCore::ResourceHandle::~ResourceHandle (this=0x7f54300a79e0,
__in_chrg=<value optimized out>) at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:140
#7 0x00007f54467e4f00 in WebCore::ResourceHandle::~ResourceHandle (this=0x7f54300a79e0,
__in_chrg=<value optimized out>) at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:143
#8 0x00007f54467a6f46 in WTF::RefCounted<WebCore::ResourceHandle>::deref (this=0x7f54300a79e8)
at ../../Source/JavaScriptCore/wtf/RefCounted.h:141
#9 0x00007f54467a726d in WTF::derefIfNotNull<WebCore::ResourceHandle> (ptr=0x7f54300a79e0)
at ../../Source/JavaScriptCore/wtf/PassRefPtr.h:59
#10 0x00007f54467e97d7 in WTF::RefPtr<WebCore::ResourceHandle>::~RefPtr (this=0x7fff73778440,
__in_chrg=<value optimized out>) at ../../Source/JavaScriptCore/wtf/RefPtr.h:58
#11 0x00007f54467e7ff5 in WebCore::readCallback (source=0x7f53d4005340, asyncResult=0x1d35de0, data=0x0)
at ../../Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:753
#12 0x00007f5444fecf15 in async_ready_callback_wrapper (source_object=0x7f53d4005340, res=0x1d35de0,
user_data=0x0) at ginputstream.c:470
#13 0x00007f5440f2110d in read_async_done (stream=0x7f53d4005340) at soup-http-input-stream.c:723
#14 0x00007f5443a49d8e in g_closure_invoke (closure=0x7f54300fba90, return_value=0x0, n_param_values=1,
param_values=0x7f543034e480, invocation_hint=0x7fff73778690) at gclosure.c:767
#15 0x00007f5443a5c6da in signal_emit_unlocked_R (node=<value optimized out>, detail=0, instance=0x1c09c00,
emission_return=0x0, instance_and_params=0x7f543034e480) at gsignal.c:3256
#16 0x00007f5443a65d3a in g_signal_emit_valist (instance=<value optimized out>,
signal_id=<value optimized out>, detail=<value optimized out>, var_args=0x7fff73778880) at gsignal.c:2987
#17 0x00007f5443a65ee3 in g_signal_emit (instance=<value optimized out>, signal_id=<value optimized out>,
detail=<value optimized out>) at gsignal.c:3044
#18 0x00007f5440f343b3 in process_queue_item (item=0x1d29e00, should_prune=0x7fff737789bc, loop=1)
at soup-session-async.c:376
#19 0x00007f5440f34705 in run_queue (sa=<value optimized out>) at soup-session-async.c:418
#20 0x00007f5440f34d53 in idle_run_queue (sa=0x13f0830) at soup-session-async.c:441
#21 0x00007f54431575c3 in g_main_dispatch (context=0x13b82d0) at gmain.c:2447
#22 g_main_context_dispatch (context=0x13b82d0) at gmain.c:3020
#23 0x00007f5443157da0 in g_main_context_iterate (context=0x13b82d0, block=1, dispatch=1,
self=<value optimized out>) at gmain.c:3098
#24 0x00007f5443158412 in g_main_loop_run (loop=0x1a46b00) at gmain.c:3306
#25 0x00007f54458da557 in IA__gtk_main () at gtkmain.c:1255
#26 0x0000000000402af9 in main (argc=2, argv=0x7fff73778cd8) at ../../Tools/GtkLauncher/main.c:274
Would it make sense to not use GRefPtr in those callbacks? Sergio? Martin?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list