Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webprocess is hanged (Deadlock) in parkConditionallyImpl #430

Closed
nrajan002c opened this issue Jan 2, 2018 · 2 comments
Closed

Webprocess is hanged (Deadlock) in parkConditionallyImpl #430

nrajan002c opened this issue Jan 2, 2018 · 2 comments

Comments

@nrajan002c
Copy link

We are seeing WebProcess hang in stable WPE version.
This hang is because of deadlock in parkConditionallyImpl.

Frame Signature Module Source
#0 libpthread-2.19.so@0xedc6 libpthread-2.19.so  
#1 libpthread-2.19.so@0x9bdd libpthread-2.19.so  
#2 libpthread-2.19.so@0x9947 libpthread-2.19.so  
#3 timedWait libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WTF/wtf/ThreadingPthreads.cpp:359 (0x7)
#4 parkConditionallyImpl libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WTF/wtf/ParkingLot.cpp:598 (0xd)
#5 performTaskSync libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WTF/wtf/ParkingLot.h:85 (0x3)
#6 setViewportSize libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:149 (0x3)
#7 contentsSizeChanged libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:100 (0x13)
#8 handleMessage<Messages::DrawingArea::UpdateBackingStoreState, WebKit::DrawingArea, void (WebKit::DrawingArea::*)(long long unsigned int, bool, float, const WebCore::IntSize&, const WebCore::IntSize&)> libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WebKit2/Platform/IPC/HandleMessage.h:40 (0x27)
#9 didReceiveMessage libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/build/DerivedSources/WebKit2/DrawingAreaMessageReceiver.cpp:61 (0x19)
#10 dispatchMessage libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WebKit2/Platform/IPC/MessageReceiverMap.cpp:123 (0x9)
#11 didReceiveMessage libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WebKit2/WebProcess/WebProcess.cpp:641 (0x3)
#12 dispatchMessage libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WebKit2/Platform/IPC/Connection.cpp:893 (0xb)
#13 dispatchOneMessage libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WebKit2/Platform/IPC/Connection.cpp:951 (0x3)
#14 performWork libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WTF/wtf/Function.h:50 (0x7)
#15 _FUN libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WTF/wtf/glib/RunLoopGLib.cpp:66 (0x3)
#16 g_main_context_dispatch libglib-2.0.so.0.4800.1 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/glib-2.0/1_2.48.1-r0/glib-2.48.1/glib/gmain.c:3154 (0x3)
#17 g_main_context_iterate libglib-2.0.so.0.4800.1 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/glib-2.0/1_2.48.1-r0/glib-2.48.1/glib/gmain.c:3840 (0x5)
#18 g_main_loop_run libglib-2.0.so.0.4800.1 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/glib-2.0/1_2.48.1-r0/glib-2.48.1/glib/gmain.c:4034 (0x9)
#19 run libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WTF/wtf/glib/RunLoopGLib.cpp:97 (0x5)
#20 ChildProcessMain<WebKit::WebProcess, WebKit::WebProcessMain> libWPEWebKit.so.0.0.20161117 /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WebKit2/Shared/unix/ChildProcessMain.h:61 (0x3)
#21 main WPEWebProcess /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WebKit2/WebProcess/EntryPoint/unix/WebProcessMain.cpp:52 (0x7)
#22 libc-2.19.so@0x16337 libc-2.19.so  
#23 google_breakpad::TypedMDRVA::AllocateObjectAndArray WPEWebProcess /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/breakpad/svn-r0/trunk/./src/client/minidump_file_writer-inl.h:66 (0x17)
#24 libc-2.19.so@0xf4ffe libc-2.19.so  
#25 ConvertUTF8toUTF32 WPEWebProcess /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/breakpad/svn-r0/trunk/src/common/convert_UTF.c:484 (0xf)
#26 main WPEWebProcess /mnt/jenkins/workspace/CXD01ANI-Yocto-Release/build-ciscoxid/tmp/work/cortexa15t2hf-vfp-neon-rdk-linux-gnueabi/wpe-webkit/0.2+gitAUTOINC+5c0c3fd0aa-r0/git/Source/WebKit2/WebProcess/EntryPoint/unix/WebProcessMain.cpp:53 (0x35)
@nrajan002c
Copy link
Author


Trace1.docx
Trace2.docx

zdobersek added a commit to WebPlatformForEmbedded/WPEBackend-rdk that referenced this issue Jan 16, 2018
In order to avoid potential lockups in handling Wayland protocol event
dispatching, adopt the same procedures that are used in
src/wayland/display.cpp. EventSource callbacks are enhanced:
- prepare() now dispatches pending events as long as there are
prepared events being provided,
- check() returns TRUE if new events can in fact be read,
- dispatch() only dispatches the pending events.

This is a speculative fix that attempts to address lockups that are
reported in issue #430 of the WPEWebKit repository.
WebPlatformForEmbedded/WPEWebKit#430
zdobersek added a commit to WebPlatformForEmbedded/WPEBackend-rdk that referenced this issue Jan 16, 2018
In order to avoid potential lockups in handling Wayland protocol event
dispatching, adopt the same procedures that are used in
src/wayland/display.cpp. EventSource callbacks are enhanced:
- prepare() now dispatches pending events as long as there are
prepared events being provided,
- check() returns TRUE if new events can in fact be read,
- dispatch() only dispatches the pending events.

This is a speculative fix that attempts to address lockups that are
reported in issue #430 of the WPEWebKit repository.
WebPlatformForEmbedded/WPEWebKit#430
zdobersek added a commit to WebPlatformForEmbedded/WPEBackend-rdk that referenced this issue Feb 1, 2018
In order to avoid potential lockups in handling Wayland protocol event
dispatching, adopt the same procedures that are used in
src/wayland/display.cpp. EventSource callbacks are enhanced:
- prepare() now dispatches pending events as long as there are
prepared events being provided,
- check() returns TRUE if new events can in fact be read,
- dispatch() only dispatches the pending events.

Previous code was prone to race conditions that occur while reading
from wl_display and dispatching those read events. Here we do this by
leveraging the default dispatch queue, but other components (e.g. the
graphics drivers or Westeros) are utilizing the same Wayland display
connection through different dispatch queues on other threads.
Previous code was thus prone to thread lockups, while these changes
take up the approach already utilized by other Wayland backends via
Wayland::EventSource::sourceFuncs (src/wayland/display.cpp).

More detail on this issue and the appropriate approach is described
in the Wayland documentation:
https://wayland.freedesktop.org/docs/html/apb.html#Client-classwl__display

This attempts to address lockups that are reported in issue #430 of
the WPEWebKit repository.
WebPlatformForEmbedded/WPEWebKit#430
@albertd
Copy link

albertd commented Nov 22, 2018

@nambirajang is this issue still valid with the wpe-2017 branch, if so can you supply a bit more details so we can reopen if needed.

@albertd albertd closed this as completed Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants