SRU: Budgie-Welcome to support 2.18 series of webkit2gtk

Bug #1712047 reported by fossfreedom
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
budgie-welcome (Ubuntu)
Fix Released
High
fossfreedom
Zesty
Fix Released
High
fossfreedom
Artful
Fix Released
High
fossfreedom

Bug Description

[Impact]
In discussion with Jeremy Bicha (https://bugs.launchpad.net/ubuntu/+source/budgie-welcome/+bug/1713210), webkit2gtk 2.18 will soon be SRU'd to 16.04 & 17.04.

During artful testing, budgie-welcome segmentation faulted when running with the webkit2gtk 2.18 betas (2.17.*).

An initial workaround fix was applied to artful (LP: #1713210). Later discussions with upstream webkit2gtk indicated that the real reason why the segmentation fault occurred was due to calling GTK+ calls whilst inside a python thread. All GTK+ calls must be performed on the main loop thread.

The impact of this issue is that the initial workaround fix for artful is no longer required and can be rewritten as recommended by upstream.

The additional impact of this issue is that the 17.04 version of budgie-welcome would be similarly affected once new SRU'd version of webkit2gtk enters the archive.

[Test Case]
The code streams have slightly diverged so its not possible to cherry-pick the same patch from artful to zesty.
Thus the debdiffs are subtly different between the two versions of budgie-welcome. The same principles have occurred to make the two debdiff's - searching for direct webkit calls and converting these to equivalent calls but on the main thread.

Artful testcase: As per this bug-report, perform the following actions that are known to end with a segmentation fault.
1. open the recommendation page
2. open the budgie-applets page
3. open the getting started page
4. Install and remove a web-browser from the getting started page
5. Install an application from the recommendation page
6. Install and remove a budgie-applet from the budgie-applets page

Zesty testcase: With the current 2.16 series of webkit2gtk, perform the following actions to ensure they continue to work - i.e. regression tests
1. open the recommendation page
2. open the getting started page
3. Install and remove a web-browser from the getting started page
4. Install an application from the recommendation page

Upgrade Zesty with a backported version of the current artful 2.18 series of webkit2gtk (i.e. the version that would cause segmentation faults).
Repeat the above Zesty test case to ensure that segmentation faults do not occur

[Regression Potential]
It is possible that not all GTK+ based calls from a thread have been converted correctly and thus segmentation faults will still occur.
The mitigation here is that Artful is still in its beta test phase and any further issues can be addressed and analysis of the zesty code-stream can be performed to confirm if the same issue is likely and thus can be fixed before webkit2gtk is SRU'd

[Original Description]
On first login to Ubuntu Budgie, budgie-welcome is run.

This crashes immediately.

This has only started to occur since the new version of webkit2gtk was uploaded on Friday libwebkit2gtk-4.0-37

to reproduce - login to Ubuntu Budgie. Delete the "firstrun" file and then run budgie-welcome

i.e.

dad@dad-VirtualBox:~$ rm ~/.config/budgie-welcome/firstrun
dad@dad-VirtualBox:~$ budgie-welcome
1 0x7fcb99d8a287 /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so.18(WTFCrash+0x17) [0x7fcb99d8a287]
2 0x7fcb9aceccca /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0x63dcca) [0x7fcb9aceccca]
3 0x7fcb9ace182c /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(+0x63282c) [0x7fcb9ace182c]
4 0x7fcb9aeb9463 /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37(webkit_web_view_run_javascript+0xc3) [0x7fcb9aeb9463]
5 0x7fcba93d9e18 /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7fcba93d9e18]
6 0x7fcba93d987a /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x32a) [0x7fcba93d987a]
7 0x7fcba9b6f9cc /usr/lib/python3/dist-packages/gi/_gi.cpython-36m-x86_64-linux-gnu.so(+0x2b9cc) [0x7fcba9b6f9cc]
8 0x7fcba9b714b8 /usr/lib/python3/dist-packages/gi/_gi.cpython-36m-x86_64-linux-gnu.so(+0x2d4b8) [0x7fcba9b714b8]
9 0x7fcba9b65209 /usr/lib/python3/dist-packages/gi/_gi.cpython-36m-x86_64-linux-gnu.so(+0x21209) [0x7fcba9b65209]
10 0x4591b3 /usr/bin/python3(_PyObject_FastCallDict+0xa3) [0x4591b3]
11 0x54e607 /usr/bin/python3() [0x54e607]
12 0x552f9b /usr/bin/python3(_PyEval_EvalFrameDefault+0x36ab) [0x552f9b]
13 0x54e4b1 /usr/bin/python3() [0x54e4b1]
14 0x54e73d /usr/bin/python3() [0x54e73d]
15 0x552f9b /usr/bin/python3(_PyEval_EvalFrameDefault+0x36ab) [0x552f9b]
16 0x54da88 /usr/bin/python3() [0x54da88]
17 0x55772e /usr/bin/python3(_PyFunction_FastCallDict+0x2be) [0x55772e]
18 0x459531 /usr/bin/python3(_PyObject_Call_Prepend+0x231) [0x459531]
19 0x458fbe /usr/bin/python3(PyObject_Call+0x3e) [0x458fbe]
20 0x551497 /usr/bin/python3(_PyEval_EvalFrameDefault+0x1ba7) [0x551497]
21 0x54da88 /usr/bin/python3() [0x54da88]
22 0x54e9e6 /usr/bin/python3() [0x54e9e6]
23 0x552f9b /usr/bin/python3(_PyEval_EvalFrameDefault+0x36ab) [0x552f9b]
24 0x54da88 /usr/bin/python3() [0x54da88]
25 0x54e9e6 /usr/bin/python3() [0x54e9e6]
26 0x552f9b /usr/bin/python3(_PyEval_EvalFrameDefault+0x36ab) [0x552f9b]
27 0x54da88 /usr/bin/python3() [0x54da88]
28 0x55772e /usr/bin/python3(_PyFunction_FastCallDict+0x2be) [0x55772e]
29 0x459531 /usr/bin/python3(_PyObject_Call_Prepend+0x231) [0x459531]
30 0x458fbe /usr/bin/python3(PyObject_Call+0x3e) [0x458fbe]
31 0x58db52 /usr/bin/python3() [0x58db52]
Segmentation fault
dad@dad-VirtualBox:~$ Error sending IPC message: Broken pipe

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: libwebkit2gtk-4.0-37 2.17.91-1ubuntu1
ProcVersionSignature: Ubuntu 4.12.0-11.12-generic 4.12.5
Uname: Linux 4.12.0-11-generic x86_64
ApportVersion: 2.20.6-0ubuntu6
Architecture: amd64
CurrentDesktop: Budgie:GNOME
Date: Mon Aug 21 11:22:08 2017
InstallationDate: Installed on 2017-08-21 (0 days ago)
InstallationMedia: Ubuntu-Budgie 17.10 "Artful Aardvark" - Alpha amd64 (20170820)
SourcePackage: webkit2gtk
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
fossfreedom (fossfreedom) wrote :
Revision history for this message
fossfreedom (fossfreedom) wrote :

Also seen when subsequently run budgie-welcome and click the getting-started button i.e. this is the wizard that would normally be seen on first logon.

Revision history for this message
fossfreedom (fossfreedom) wrote :

it seems to be crashing because of a javascript call to update a non-existent element.

in javascript terms this is valid - javascript should always return a truthy value.

Some-sort of bug in the javascript core layer which is why the "WTFCrash+0x17" is seen in the trace.

Revision history for this message
fossfreedom (fossfreedom) wrote :
no longer affects: webkit2gtk (Ubuntu)
Changed in budgie-welcome (Ubuntu):
status: New → In Progress
assignee: nobody → fossfreedom (fossfreedom)
summary: - Segmentation fault when logging in for the first time
+ SRU: Budgie-Welcome to support 2.7 series of webkit2gtk
Revision history for this message
fossfreedom (fossfreedom) wrote : Re: SRU: Budgie-Welcome to support 2.7 series of webkit2gtk

SRU:

[Impact]
In discussion with Jeremy Bicha (https://bugs.launchpad.net/ubuntu/+source/budgie-welcome/+bug/1713210), the 2.7 or latest version of webkit2gtk is due to be SRU'd to 16.04 & 17.04.

During artful testing, budgie-welcome segmentation faulted when running with the 2.7 series of webkit2gtk.

An initial workaround fix was applied to artful (LP: #1713210). Later discussions with upstream webkit2gtk indicated that the real reason why the segmentation fault occurred was due to calling GTK+ calls whilst inside a python thread. All GTK+ calls must be performed on the main loop thread.

The impact of this issue is that the initial workaround fix for artful is no longer required and can be rewritten as recommended by upstream.

The additional impact of this issue is that the 17.04 version of budgie-welcome would be similarly affected once new SRU'd version of webkit2gtk enters the archive.

[Test Case]
The code streams have slightly diverged so its not possible to cherry-pick the same patch from artful to zesty.
Thus the debdiffs are subtly different between the two versions of budgie-welcome. The same principles have occurred to make the two debdiff's - searching for direct webkit calls and converting these to equivalent calls but on the main thread.

Artful testcase: As per this bug-report, perform the following actions that are known to end with a segmentation fault.
1. open the recommendation page
2. open the budgie-applets page
3. open the getting started page
4. Install and remove a web-browser from the getting started page
5. Install an application from the recommendation page
6. Install and remove a budgie-applet from the budgie-applets page

Zesty testcase: With the current 2.6 series of webkit2gtk, perform the following actions to ensure they continue to work - i.e. regression tests
1. open the recommendation page
2. open the getting started page
3. Install and remove a web-browser from the getting started page
4. Install an application from the recommendation page

Upgrade Zesty with a backported version of the current artful 2.7 series of webkit2gtk (i.e. the version that would cause segmentation faults).
Repeat the above Zesty test case to ensure that segmentation faults do not occur

[Regression Potential]
It is possible that not all GTK+ based calls from a thread have been converted correctly and thus segmentation faults will still occur.
The mitigation here is that Artful is still in its beta test phase and any further issues can be addressed and analysis of the zesty code-stream can be performed to confirm if the same issue is likely and thus can be fixed before webkit2gtk is SRU'd

Revision history for this message
fossfreedom (fossfreedom) wrote :
Revision history for this message
fossfreedom (fossfreedom) wrote :
Revision history for this message
fossfreedom (fossfreedom) wrote :

hmm - I don't seem to have the rights to add artful and zesty as the affected series. Please can someone add these?

Enc are two debdiff patches - one for artful, one for zesty.

I've built and tested these via my PPA here https://launchpad.net/~ubuntubudgie-dev/+archive/ubuntu/testwebkit2gtk/+packages

description: updated
Jeremy Bícha (jbicha)
description: updated
Changed in budgie-welcome (Ubuntu Zesty):
status: New → Triaged
importance: Undecided → High
Changed in budgie-welcome (Ubuntu):
importance: Undecided → High
summary: - SRU: Budgie-Welcome to support 2.7 series of webkit2gtk
+ SRU: Budgie-Welcome to support 2.18 series of webkit2gtk
Simon Quigley (tsimonq2)
Changed in budgie-welcome (Ubuntu Zesty):
assignee: nobody → fossfreedom (fossfreedom)
Simon Quigley (tsimonq2)
Changed in budgie-welcome (Ubuntu Artful):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package budgie-welcome - 0.5.3

---------------
budgie-welcome (0.5.3) artful; urgency=medium

  * bug-fix release (LP: #1712047)
    - rework to ensure GTK+ calls are made on the main thread
      to avoid segmentation faults when webkit2gtk version
      >= 2.17.90

 -- David Mohammed <email address hidden> Thu, 07 Sep 2017 16:39:29 -0500

Changed in budgie-welcome (Ubuntu Artful):
status: Fix Committed → Fix Released
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Afaict Zesty is waiting on webkit2gtk to be backported, unsubscribing ~ubuntu-sponsors for now.

Jeremy Bícha (jbicha)
Changed in budgie-welcome (Ubuntu Zesty):
status: Triaged → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello fossfreedom, or anyone else affected,

Accepted budgie-welcome into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/budgie-welcome/0.4.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in budgie-welcome (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-zesty
Revision history for this message
fossfreedom (fossfreedom) wrote :

Confirmed the test case after the install of 0.4.6 on a clean zesty install.

Subsequently upgraded webkit2gtk via my ppa https://launchpad.net/~ubuntubudgie-dev/+archive/ubuntu/artful-proposed

Reran the test cases again.

tags: added: verification-done-zesty
removed: verification-needed-zesty
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package budgie-welcome - 0.4.6

---------------
budgie-welcome (0.4.6) zesty; urgency=medium

  * bug-fix release (LP: #1712047)
    - rework to ensure GTK+ calls are made on the main thread
      to avoid segmentation faults when webkit2gtk version
      >= 2.17.90

 -- David Mohammed <email address hidden> Tue, 05 Sep 2017 22:00:13 +0100

Changed in budgie-welcome (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for budgie-welcome has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.