WebPlatformForEmbedded/meta-wpe

Crashing Web Process

Closed this issue · 3 comments

I'm trying to get master working and I've hit a snag where it shows some strange behavior. When I start WPEFramework, the WebProcess crashes:

[Sat, 10 Nov 2018 22:18:04 ]:[WebKitImplementation.cpp:467]:[ServiceMetadata<WPEFramework::Plugin::WebKitImplementation, &Plugin_WebKitBrowser>::ServiceImplementation<WPEFramework::Plugin::WebKitImplementation>] Information: New URL: http://player.screen.cloud/browser/index.html [Sat, 10 Nov 2018 22:18:04 ]:[WebKitBrowser.cpp:217]:[ServiceMetadata<WPEFramework::Plugin::WebKitBrowser, &Plugin_WebKitBrowser>::ServiceImplementation<WPEFramework::Plugin::WebKitBrowser>] Information: StateChange: { "State": 2 } [Sat, 10 Nov 2018 22:18:04 ]:[WebKitBrowser.cpp:203]:[ServiceMetadata<WPEFramework::Plugin::WebKitBrowser, &Plugin_WebKitBrowser>::ServiceImplementation<WPEFramework::Plugin::WebKitBrowser>] Information: URLChanged: { "url": "http://player.screen.cloud/browser/index.html" } [Sat, 10 Nov 2018 22:18:05 ]:[WebKitBrowser.cpp:198]:[ServiceMetadata<WPEFramework::Plugin::WebKitBrowser, &Plugin_WebKitBrowser>::ServiceImplementation<WPEFramework::Plugin::WebKitBrowser>] Information: LoadFinished: { "url": "http://player.screen.cloud/browser/index.html", "loaded":true } ERROR: WebProcess crashed: exiting ...

But then, it gets started back up immediately, successfully, but I get nothing displayed on the screen:

[Sat, 10 Nov 2018 22:18:25 ]:[WebKitImplementation.cpp:467]:[ServiceMetadata<WPEFramework::Plugin::WebKitImplementation, &Plugin_WebKitBrowser>::ServiceImplementation<WPEFramework::Plugin::WebKitImplementation>] Information: New URL: http://player.screen.cloud/browser/index.html [Sat, 10 Nov 2018 22:18:25 ]:[WebKitBrowser.cpp:217]:[ServiceMetadata<WPEFramework::Plugin::WebKitBrowser, &Plugin_WebKitBrowser>::ServiceImplementation<WPEFramework::Plugin::WebKitBrowser>] Information: StateChange: { "State": 1 } [Sat, 10 Nov 2018 22:18:25 ]:[WebKitBrowser.cpp:203]:[ServiceMetadata<WPEFramework::Plugin::WebKitBrowser, &Plugin_WebKitBrowser>::ServiceImplementation<WPEFramework::Plugin::WebKitBrowser>] Information: URLChanged: { "url": "http://player.screen.cloud/browser/index.html" } [Sat, 10 Nov 2018 22:18:25 ]:[WebKitBrowser.cpp:198]:[ServiceMetadata<WPEFramework::Plugin::WebKitBrowser, &Plugin_WebKitBrowser>::ServiceImplementation<WPEFramework::Plugin::WebKitBrowser>] Information: LoadFinished: { "url": "http://player.screen.cloud/browser/index.html", "loaded":true }

I've tried a handful other pages, and they load fine, so there is something about this page that causes it to crash, but I'm not sure what my next debugging step should be. I don't find any core dumps or additional logs that would help me figure it out.

By the way, the docker image I'm using is located at:
bobbybeckmann/resin-wpe:raspberrypi3-ffd0b36-dirty

Okay, fun extra fact. If I attach to the WPEProcess with strace -fp, then it doesn't crash. So, maybe a timing issue/race condition?

okay.. narrowed it down to a crash in WPEProcess that occurs after this commit:

WebPlatformForEmbedded/WPEWebKit@8e3ad2d

Should I close here and report over there? I probably need a way to grab a core dump/stack trace/etc. so any debugging tips would be appreciated.

Yes probably best to get a core and report at the WPEWebKit project.

For the debugging series I enable the following on my local.conf:
IMAGE_FEATURES += "dbg-pkgs"
IMAGE_GEN_DEBUGFS = "1"
IMAGE_FSTYPES_DEBUGFS = "tar.gz"

That gets you a GDB you can run on the client if you want to go the gdb server route. Or what I usually do is just enable core dumps before starting WPEFramework, download the core file off the device. Then unpact the debugfs that gets generated in deploy/images/ and run gdb-multiarch to read it.

If you need more details, let me know.