Bug 35491 - [Gtk] freezing in phtread_cond_wait after some clicks
Summary: [Gtk] freezing in phtread_cond_wait after some clicks
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-28 00:18 PST by Adrian Schröter
Modified: 2010-10-12 17:04 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Schröter 2010-02-28 00:18:13 PST
I observe a freezing webkit after a few clicks in web pages like facebook. This happens since a longer time already always using the webkit as shipped by openSUSE 64bit via Qt packages. I see this in arora but also with konquerors webkit part.

Backtrace is attached, but I assume we would need some debugging code to find the dead lock ? 
I am happy to debug this with some helping hand, if that brings me a working and integrated browser back :)

debuginfo packages where not yet installed, will do so now.

(gdb) bt                                                                                                                                                           
#0  0x00007f0f50ebf049 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0                                                                            
#1  0x00007f0f5070c232 in g_once_init_enter_impl () from /usr/lib64/libglib-2.0.so.0                                                                               
#2  0x00007f0f3842fdfc in gdk_display_get_type () from /usr/lib64/libgdk-x11-2.0.so                                                                                
#3  0x00007f0f3845e039 in gdk_x11_display_get_xdisplay () from /usr/lib64/libgdk-x11-2.0.so                                                                        
#4  0x00007f0f5458ff7c in WebCore::PluginView::platformStart() () from /usr/lib64/libQtWebKit.so.4                                                                 
#5  0x00007f0f5445696a in WebCore::PluginView::start() () from /usr/lib64/libQtWebKit.so.4                                                                         
#6  0x00007f0f54456bfb in WebCore::PluginView::init() () from /usr/lib64/libQtWebKit.so.4                                                                          
#7  0x00007f0f54436418 in WebCore::ScrollView::addChild(WTF::PassRefPtr<WebCore::Widget>) () from /usr/lib64/libQtWebKit.so.4                                      
#8  0x00007f0f54500587 in WebCore::RenderWidget::setWidget(WTF::PassRefPtr<WebCore::Widget>) () from /usr/lib64/libQtWebKit.so.4                                   
#9  0x00007f0f544d1a17 in WebCore::RenderPart::setWidget(WTF::PassRefPtr<WebCore::Widget>) () from /usr/lib64/libQtWebKit.so.4                                     
#10 0x00007f0f5437470e in WebCore::FrameLoader::loadPlugin(WebCore::RenderPart*, WebCore::KURL const&, WebCore::String const&, WTF::Vector<WebCore::String, 0ul> const&, WTF::Vector<WebCore::String, 0ul> const&, bool) () from /usr/lib64/libQtWebKit.so.4                                                                                                      
#11 0x00007f0f54377aa6 in WebCore::FrameLoader::requestObject(WebCore::RenderPart*, WebCore::String const&, WebCore::AtomicString const&, WebCore::String const&, WTF::Vector<WebCore::String, 0ul> const&, WTF::Vector<WebCore::String, 0ul> const&) () from /usr/lib64/libQtWebKit.so.4                                                                         
#12 0x00007f0f544d5360 in WebCore::RenderPartObject::updateWidget(bool) () from /usr/lib64/libQtWebKit.so.4                                                                      
#13 0x00007f0f543e354b in WebCore::FrameView::updateWidgets() () from /usr/lib64/libQtWebKit.so.4                                                                                
#14 0x00007f0f543e522d in WebCore::FrameView::performPostLayoutTasks() () from /usr/lib64/libQtWebKit.so.4                                                                       
#15 0x00007f0f543e66ce in WebCore::FrameView::layout(bool) () from /usr/lib64/libQtWebKit.so.4                                                                                   
#16 0x00007f0f541f0a4a in WebCore::Document::updateLayoutIgnorePendingStylesheets() () from /usr/lib64/libQtWebKit.so.4                                                          
#17 0x00007f0f543c1a80 in WebCore::DOMWindow::scrollY() const () from /usr/lib64/libQtWebKit.so.4                                                                                
#18 0x00007f0f5489a2f0 in WebCore::jsDOMWindowPageYOffset(JSC::ExecState*, JSC::Identifier const&, JSC::PropertySlot const&) () from /usr/lib64/libQtWebKit.so.4                 
#19 0x00007f0f5402d987 in JSC::Interpreter::privateExecute(JSC::Interpreter::ExecutionFlag, JSC::RegisterFile*, JSC::ExecState*, JSC::JSValue*) ()                               
   from /usr/lib64/libQtWebKit.so.4                                                                                                                                              
#20 0x00007f0f5403852f in JSC::Interpreter::execute(JSC::ProgramExecutable*, JSC::ExecState*, JSC::ScopeChainNode*, JSC::JSObject*, JSC::JSValue*) ()                            
   from /usr/lib64/libQtWebKit.so.4                                                                                                                                              
#21 0x00007f0f5406796f in JSC::evaluate(JSC::ExecState*, JSC::ScopeChain&, JSC::SourceCode const&, JSC::JSValue) () from /usr/lib64/libQtWebKit.so.4                             
#22 0x00007f0f54126e15 in WebCore::evaluateInWorld(JSC::ExecState*, JSC::ScopeChain&, JSC::SourceCode const&, JSC::JSValue, WebCore::DOMWrapperWorld*) ()                        
   from /usr/lib64/libQtWebKit.so.4                                                                                                                                              
#23 0x00007f0f541346b0 in WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld*) () from /usr/lib64/libQtWebKit.so.4            
#24 0x00007f0f541348d2 in WebCore::ScriptController::evaluate(WebCore::ScriptSourceCode const&) () from /usr/lib64/libQtWebKit.so.4                                              
#25 0x00007f0f5414419a in WebCore::ScriptController::executeScript(WebCore::ScriptSourceCode const&) () from /usr/lib64/libQtWebKit.so.4                                         
#26 0x00007f0f5431e741 in WebCore::HTMLTokenizer::scriptExecution(WebCore::ScriptSourceCode const&, WebCore::HTMLTokenizer::State) () from /usr/lib64/libQtWebKit.so.4           
#27 0x00007f0f54322fc7 in WebCore::HTMLTokenizer::scriptHandler(WebCore::HTMLTokenizer::State) () from /usr/lib64/libQtWebKit.so.4                                               
#28 0x00007f0f54323b20 in WebCore::HTMLTokenizer::parseNonHTMLText(WebCore::SegmentedString&, WebCore::HTMLTokenizer::State) () from /usr/lib64/libQtWebKit.so.4                 
#29 0x00007f0f5432618e in WebCore::HTMLTokenizer::parseTag(WebCore::SegmentedString&, WebCore::HTMLTokenizer::State) () from /usr/lib64/libQtWebKit.so.4                         
#30 0x00007f0f54326ae2 in WebCore::HTMLTokenizer::write(WebCore::SegmentedString const&, bool) () from /usr/lib64/libQtWebKit.so.4                                               
#31 0x00007f0f5431eed3 in WebCore::HTMLTokenizer::notifyFinished(WebCore::CachedResource*) () from /usr/lib64/libQtWebKit.so.4                                                   
#32 0x00007f0f5435d14c in WebCore::CachedScript::checkNotify() () from /usr/lib64/libQtWebKit.so.4                                                                               
#33 0x00007f0f543947cd in WebCore::Loader::Host::didFinishLoading(WebCore::SubresourceLoader*) () from /usr/lib64/libQtWebKit.so.4                                               
#34 0x00007f0f543a6493 in WebCore::SubresourceLoader::didFinishLoading() () from /usr/lib64/libQtWebKit.so.4                                                                     
#35 0x00007f0f5453cf9b in WebCore::QNetworkReplyHandler::finish() () from /usr/lib64/libQtWebKit.so.4                                                                            
#36 0x00007f0f5453d504 in WebCore::QNetworkReplyHandler::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libQtWebKit.so.4                                         
#37 0x00007f0f52630139 in QObject::event(QEvent*) () from /usr/lib64/libQtCore.so.4                                                                                              
#38 0x00007f0f52e1d8ec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4                                                                 
#39 0x00007f0f52e23ecb in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#40 0x00007f0f5262041c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#41 0x00007f0f52622b97 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQtCore.so.4
#42 0x00007f0f52649de3 in ?? () from /usr/lib64/libQtCore.so.4
#43 0x00007f0f506e2dde in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#44 0x00007f0f506e67a8 in ?? () from /usr/lib64/libglib-2.0.so.0
#45 0x00007f0f506e68d0 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#46 0x00007f0f52649923 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#47 0x00007f0f52ecbe2e in ?? () from /usr/lib64/libQtGui.so.4
#48 0x00007f0f5261ed32 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#49 0x00007f0f5261f10c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#50 0x00007f0f52622e5b in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
Comment 1 Adrian Schröter 2010-02-28 00:35:00 PST
okay, I had this for several month, but after upgrading now to latest 4.6.3 Qt snapshot, it seems to be away suddenly.

sorry for the noise. (I will reopen if it happens again)
Comment 2 Adrian Schröter 2010-02-28 01:26:00 PST
Sorry, happened again, just a bit later. backtrace looks almost identical.
Comment 3 Adrian Schröter 2010-02-28 01:48:18 PST
Looking at the bt, this could be a generic old issue, because Qt is not initializing X11 threading before opening the first window, but glib is using thread functions later (no idea why).

So it could be either a glib or libqt bug.

I will check with X11 developers these days if the X11 init for threading is still needed.
Comment 4 Adrian Schröter 2010-02-28 05:42:39 PST
k, after digging into this again, this is the problem that every single app which is using webkit (which may load a plugin which suddenly uses threading) has to be linked against -lpthread explicit (it is not enough that some lib does due to function overloading) and initialising X11 threading themself.

It is not a problem of webkit, but maybe webkit could get some compile time warnings to inform the developers about this. Esp. due to all the plugins which are using webkit we need to go every single app and check if it does it manually.

Feel free to close this bugreport in any case.