webbrowser-app does not start in Unity 8 preview session

Bug #1307709 reported by Olli Ries on 2014-04-14
36
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Oxide
High
Chris Coulson
mesa (Ubuntu)
High
Unassigned
unity8-desktop-session (Ubuntu)
Critical
Unassigned

Bug Description

The webbrowser app does not start when invoked from the Dash in Unity8 in the preview session.

Upon clicking the icon the screen quickly flickers and returns to the Dash.

You can get some more information when running the terminal app. You can make this app usable by uncommenting X-Ubuntu-StageHint=SideStage.

From the terminal, run: webbrowser-app --desktop_file_hint=/usr/share/applications/webbrowser-app.desktop

This takes me back to the Dash, return to the terminal to find:
libEGL warning: unsupported platform (null)
libEGL warning: unsupported platform (null)
Segmentation fault (core dumped)

I am attaching one of the crash dumps

Olli Ries (ories) wrote :
affects: unity8-desktop-session → webbrowser-app
Olivier Tilloy (osomon) wrote :

This is the top of the backtrace, retraced:

#0 dri2_initialize_mir (drv=0x7f395c6c5050, disp=0x7f395ce5e560)
    at ../../../../../../src/egl/drivers/dri2/platform_mir.c:378
#1 0x00007f3950c82d9d in _eglMatchAndInitialize (dpy=0x7f395ce5e560) at ../../../../../src/egl/main/egldriver.c:616
#2 0x00007f3950c83104 in _eglMatchDriver (dpy=dpy@entry=0x7f395ce5e560, test_only=test_only@entry=0)
    at ../../../../../src/egl/main/egldriver.c:646
#3 0x00007f3950c7e15a in eglInitialize (dpy=0x7f395ce5e560, major=0x0, minor=0x0)
    at ../../../../../src/egl/main/eglapi.c:318
#4 0x00007f3936358538 in IsUbuntuPhoneOrTablet () at ../../../../shared/browser/oxide_form_factor_linux.cc:58
#5 oxide::GetFormFactorHint () at ../../../../shared/browser/oxide_form_factor_linux.cc:116
#6 0x00007f393634ded7 in GetProcessFlags () at ../../../../qt/core/glue/oxide_qt_web_context_adapter.cc:45
#7 oxide::qt::WebContextAdapter::ensureChromiumStarted ()
    at ../../../../qt/core/glue/oxide_qt_web_context_adapter.cc:194
#8 0x00007f3939aecdbe in OxideQQuickWebContextPrivate::ensureChromiumStarted() ()
   from /usr/lib/x86_64-linux-gnu/qt5/qml/com/canonical/Oxide/libqmloxideplugin.so
#9 0x00007f3939af51a4 in OxideQQuickWebView::OxideQQuickWebView(QQuickItem*) ()
   from /usr/lib/x86_64-linux-gnu/qt5/qml/com/canonical/Oxide/libqmloxideplugin.so

It appears the problem is in oxide, in the code that dynamically loads libEGL.so.1 at startup to try and determine the EGL vendor as a hint of the form factor we’re running on.

Olivier Tilloy (osomon) wrote :

This is the relevant bit of oxide code: http://bazaar.launchpad.net/~oxide-developers/oxide/oxide.trunk/view/head:/shared/browser/oxide_form_factor_linux.cc#L35.

Note that this works fine on touch devices (unity8+Mir) and on a regular 14.04 desktop (unity7+X11).

Can a Mir developer comment on what we’re doing wrong here?

Stephen M. Webb (bregma) wrote :

I notice in that Oxide code that the result of "display = eglGetDisplay(EGL_DEFAULT_DISPLAY)" is not checked for failure and is then used in the call to "eglInitialize(display, NULL, NULL)" which goes on to fail because the display is invalid.

Basic fundamental error checking is missing in that code and it fails catastrophically as a consequence.

The code works on the phone where the "native" default display compiled in to the EGL library is Mir and it works on the desktop using an X11 server because the default display compiled in to the EGL library is X11. In the case of desktop without X11 like the Unity 8 preview session, it just fails. Forcing the default display through the use of environment variables does not seem to have any effect.

Note that this code can be bypassed by setting the environment variable OXIDE_FORCE_FORM_FACTOR=tablet (or phone, or desktop) but subsequent efforts to get an EGL surface also fail.

Changed in oxide:
status: New → Triaged
importance: Undecided → High
Stephen M. Webb (bregma) wrote :

When the app is run with EGL_LOG_LEVEL=debug and OXIDE_FORCE_FORM_FACTOR=table the following output is logged. Note that the sources file "gl_surface_egl.cc" where the problem originates is in the Chromium sources.

libEGL debug: Native platform type: mir (environment overwrite)
libEGL debug: EGL search path is /usr/lib/x86_64-linux-gnu/egl
libEGL debug: added /usr/lib/x86_64-linux-gnu/egl/egl_gallium.so to module array
libEGL debug: added egl_dri2 to module array
libEGL debug: added egl_glx to module array
libEGL debug: dlopen(/usr/lib/x86_64-linux-gnu/egl/egl_gallium.so)
libEGL warning: unsupported platform (null)
libEGL debug: the best driver is DRI2
libEGL debug: EGL user error 0x3006 (EGL_BAD_CONTEXT) in eglSwapInterval

libEGL debug: Native platform type: mir (environment overwrite)
[0415/085136:ERROR:gl_surface_egl.cc(109)] No suitable EGL configs found.
[0415/085136:ERROR:gl_surface_linux.cc(42)] GLSurfaceEGL::InitializeOneOff failed.
[0415/085136:WARNING:oxide_content_main_delegate.cc(141)] Disabling viewport mode and pinch gestures, which do not work correctly without compositing
[0415/085137:WARNING:proxy_service.cc(903)] PAC support disabled because there is no system implementation
[0415/085137:ERROR:command_buffer_proxy_impl.cc(156)] Failed to initialize command buffer service.
[0415/085137:ERROR:webgraphicscontext3d_command_buffer_impl.cc(386)] CommandBufferProxy::Initialize failed.
[0415/085137:ERROR:webgraphicscontext3d_command_buffer_impl.cc(405)] Failed to initialize command buffer.
Loaded 1 UA override(s) from file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Extras/Browser/ua-overrides-mobile.js

Olivier Tilloy (osomon) wrote :

> Basic fundamental error checking is missing in that code and it fails
> catastrophically as a consequence.

This statement is a tad exaggerated. Error checking would be welcome of course, but it wouldn’t prevent oxide from failing to load as it needs to be able to instantiate an EGL surface anyway, so the failure would happen later on in the startup phase.

Anyway, I added error checking for this function (IsUbuntuPhoneOrTablet()), it’s now in oxide trunk (at revision 508).

Olivier Tilloy (osomon) wrote :

Marking invalid as far as webbrowser-app is concerned, as the issue has been determined to be in oxide. Please re-open if webbrowser-app still fails to start in unity8 on desktop after the issue has been addressed in oxide.

Changed in webbrowser-app:
status: New → Invalid
David Barth (dbarth) on 2014-04-15
tags: added: oxide webapps-hotlist
Olli Ries (ories) wrote :

updated to the 516 branch in ppa:ubuntu-security-proposed/ppa

the application still fails to come up, crashes immediately after being started, crash dump attached

Chris Coulson (chrisccoulson) wrote :

Could somebody please run this in gdb with oxideqt-dbg installed, and copy/paste the stack trace when it crashes in to this report? That's probably going to be quicker than me trying to get a usable Unity 8 session that I can debug this in

Chris Coulson (chrisccoulson) wrote :
Download full text (3.8 KiB)

Olli, I retraced your crash dump, but it crashes before running any Oxide code:

#0 0x00007f5b56866f79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  [Error: ../nptl/sysdeps/unix/sysv/linux/raise.c was not found in source tree]
#1 0x00007f5b5686a388 in __GI_abort () at abort.c:89
  [Error: abort.c was not found in source tree]
#2 0x00007f5b58ee0655 in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:979
  [Error: global/qlogging.cpp was not found in source tree]
#3 QMessageLogger::fatal (this=this@entry=0x7fff1b868ce0, msg=msg@entry=0x7f5b4ff08640 "QUbuntu: Could not create application instance") at global/qlogging.cpp:384
  [Error: global/qlogging.cpp was not found in source tree]
#4 0x00007f5b4fef1d70 in QUbuntuIntegration::QUbuntuIntegration (this=0x7f5b5b70f7f0, input_factory=0x7f5b50113f38 <(anonymous namespace)::InputAdaptorFactory::instance()::global_instance>) at ../../../../../src/platforms/ubuntu/ubuntucommon/integration.cc:75
  [Error: ../../../../../src/platforms/ubuntu/ubuntucommon/integration.cc was not found in source tree]
#5 0x00007f5b4fef3bcc in QUbuntuMirIntegration::QUbuntuMirIntegration (this=0x7f5b5b70f7f0) at ../../../../../../src/platforms/ubuntu/ubuntumir/ubuntumircommon/integration.cc:39
  [Error: ../../../../../../src/platforms/ubuntu/ubuntumir/ubuntumircommon/integration.cc was not found in source tree]
#6 0x00007f5b4feeba0a in QUbuntuMirClientIntegrationPlugin::create (this=<optimised out>, system=..., paramList=...) at ../../../../../../src/platforms/ubuntu/ubuntumir/ubuntumirclient/main.cc:41
  [Error: ../../../../../../src/platforms/ubuntu/ubuntumir/ubuntumirclient/main.cc was not found in source tree]
#7 0x00007f5b57b2c3d1 in loadIntegration (argv=0x7fff1b869208, argc=@0x7fff1b8690ac: 5, parameters=..., key=..., loader=0x7f5b580a5dd0 <_ZZN12_GLOBAL__N_112Q_QGS_loader13innerFunctionEvE6holder>) at kernel/qplatformintegrationfactory.cpp:64
  [Error: kernel/qplatformintegrationfactory.cpp was not found in source tree]
#8 QPlatformIntegrationFactory::create (platform=..., paramList=..., argc=@0x7fff1b8690ac: 5, argv=argv@entry=0x7fff1b869208, platformPluginPath=...) at kernel/qplatformintegrationfactory.cpp:81
  [Error: kernel/qplatformintegrationfactory.cpp was not found in source tree]
#9 0x00007f5b57b3573d in init_platform (argv=0x7fff1b869208, argc=@0x7fff1b8690ac: 5, platformThemeName=..., platformPluginPath=..., pluginArgument=...) at kernel/qguiapplication.cpp:897
  [Error: kernel/qguiapplication.cpp was not found in source tree]
#10 QGuiApplicationPrivate::createPlatformIntegration (this=<optimised out>) at kernel/qguiapplication.cpp:1039
  [Error: kernel/qguiapplication.cpp was not found in source tree]
#11 0x00007f5b57b362ed in QGuiApplicationPrivate::createEventDispatcher (this=<optimised out>) at kernel/qguiapplication.cpp:1054
  [Error: kernel/qguiapplication.cpp was not found in source tree]
#12 0x00007f5b590c70d1 in QCoreApplication::init (this=this@entry=0x7fff1b8690b0) at kernel/qcoreapplication.cpp:711
  [Error: kernel/qcoreapplication.cpp was not found in source tree]
#13 0x00007f5b590c7146 in QCoreApplication::QCoreApplication (this=0...

Read more...

Chris Coulson (chrisccoulson) wrote :

Ok, I've tried to do this locally.

I've tried running webbrowser-app in gdb from a terminal within unity8, but when it crashes I can no longer input anything in to the terminal (and I can only switch between apps occasionally as well). I've tried running tmux from within unity8 and then opening the tmux session on a tty to run webbrowser-app in gdb from there, but my machine instantly freezes when I do that, requiring a reboot.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity8-desktop-session (Ubuntu):
status: New → Confirmed
Changed in oxide:
assignee: nobody → Chris Coulson (chrisccoulson)
Changed in unity8-desktop-session (Ubuntu):
status: Confirmed → Invalid
Changed in oxide:
milestone: none → branch-1.1
Chris Coulson (chrisccoulson) wrote :

I think the reason this doesn't work is that the Mir EGL backend doesn't support pbuffer surfaces, and Chromium relies on this (although it doesn't actually draw to them - it creates a 1x1 pbuffer surface in order to bind the context)

Changed in mesa (Ubuntu):
importance: Undecided → High
status: New → Triaged
Chris Coulson (chrisccoulson) wrote :
Changed in oxide:
status: Triaged → Fix Released
Chris Coulson (chrisccoulson) wrote :

Can we use GL_OES_surfaceless_context?

Chris Coulson (chrisccoulson) wrote :

Ok, going to try and work around this in oxide

Changed in oxide:
status: Fix Released → In Progress
Chris Coulson (chrisccoulson) wrote :

Backed out because of a regression in Unity 7 (bug 1327319)

Changed in oxide:
status: Fix Released → Triaged
Changed in oxide:
status: Triaged → Fix Released
Stephen M. Webb (bregma) wrote :

Unmarking this as 'invalid' because it's still the number one critical bug in the Unity 8 desktop.

This bug has been marked as 'Fix Released' for the upstream Oxide project, but the fix has apparently not yet been released in Ubuntu "Utopic Unicorn".

Changed in unity8-desktop-session (Ubuntu):
importance: High → Critical
status: Invalid → New
Olivier Tilloy (osomon) wrote :

If everything goes according to plan, oxide 1.1 will be released to utopic this week.

Changed in webbrowser-app:
status: Invalid → Confirmed
Stephen M. Webb (bregma) wrote :

Confirmed fixed with liboxideqtcore0 1.1.0~bzr640-0ubuntu1 released in Ubuntu "Utopic Unicorn."

Changed in unity8-desktop-session (Ubuntu):
status: New → Fix Released
Olivier Tilloy (osomon) on 2015-06-08
no longer affects: webbrowser-app
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints