Unity FTBFS in Bionic

Bug #1749957 reported by Jeremy Bicha on 2018-02-16
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libglvnd (Ubuntu)
Undecided
Unassigned
unity (Ubuntu)
High
Unassigned

Bug Description

Unity fails to build from source in bionic.

On Monday, I was able to build Unity fine in my test PPA against gnome-desktop3 3.27.90.

https://launchpad.net/~jbicha/+archive/ubuntu/tempgnomedesktop/+packages

By Thursday, Unity no longer builds from source.
https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3156/+packages

So what's changed this week?
Well, there's a new mesa and a new glib2.0.

Related branches

Doug McMahon (mc3man) wrote :

Local build here breaks on the new glib (tests only

Changed in unity (Ubuntu):
status: New → Confirmed
Khurshid Alam (khurshid-alam) wrote :

Yes, it compiles with gnome-desktop3 3.27.90 but not with glib2.0 2.55.2-1ubuntu1 from bionic proposed.

Khurshid Alam (khurshid-alam) wrote :

@Jeremy

I tried Marco's branch. It is compiling for me with glib2.0 2.55.2-1ubuntu1.

https://code.launchpad.net/~3v1n0/unity/track-more-objects

Jeremy Bicha (jbicha) wrote :

Khurshid, I just rebuilt Marco's branch and it FTBFS, but at a different spot I believe.

See the PPA linked to from https://bileto.ubuntu.com/#/ticket/3138

Khurshid Alam (khurshid-alam) wrote :

From log:

CMake Error at plugins/unityshell/CMakeLists.txt:1 (find_package):
  By not providing "FindCompiz.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Compiz", but
  CMake did not find one.

  Could not find a package configuration file provided by "Compiz" with any
  of the following names:

    CompizConfig.cmake
    compiz-config.cmake

  Add the installation prefix of "Compiz" to CMAKE_PREFIX_PATH or set
  "Compiz_DIR" to a directory containing one of the above files. If "Compiz"
  provides a separate development package or SDK, be sure it has been
  installed.

To fix that issue you only need to recompile compiz too. And that's enough.

However, then the tests fail because of a crash inside libglvnd at exit:

#0 0x00007ffff3e0c11b in malloc_consolidate (av=av@entry=0x7ffff415dc20 <main_arena>) at malloc.c:4492
#1 0x00007ffff3e0de08 in _int_free (av=0x7ffff415dc20 <main_arena>, p=<optimized out>, have_lock=0) at malloc.c:4398
#2 0x00007ffff3e1244e in __GI___libc_free (mem=<optimized out>) at malloc.c:3145
#3 0x00007fffed5102dd in __glDispatchDestroyTable (dispatch=0x5555558d63c0) at GLdispatch.c:321
#4 0x00007fffed5df10f in CleanupVendorNameEntry (unused=0x0, pEntry=0x555555944210) at libglxmapping.c:311
#5 0x00007fffed5e8866 in __glXMappingTeardown (doReset=0) at libglxmapping.c:1061
#6 0x00007fffed5dec80 in __glXFini () at libglx.c:2099
#7 0x00007ffff7de621a in _dl_fini () at dl-fini.c:235
#8 0x00007ffff3dbeec0 in __run_exit_handlers (status=0, listp=0x7ffff415d6f8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:83
#9 0x00007ffff3dbef1a in __GI_exit (status=<optimized out>) at exit.c:105
#10 0x00007ffff3da41c8 in __libc_start_main (main=
    0x5555556b9d45 <main(int, char**)>, argc=1, argv=0x7fffffffd128, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd118) at ../csu/libc-start.c:342
#11 0x000055555568908a in _start ()
(gdb) f 3
#3 0x00007fffed5102dd in __glDispatchDestroyTable (dispatch=0x5555558d63c0) at GLdispatch.c:321
321 free(dispatch->table);
(gdb)

In fact when the nux windowthread is closed, and its graphic display is free'd we do a call to glXDestroyContext which leads to this crash because for some reason the dispatch->table is already free'd by something else (the driver?).

Getting rid of that line fixes the issue, but indeed isn't correct.

There's a comment on __glDispatchDestroyTable saying
    /*
     * XXX: Technically, dispatch->currentThreads should be 0 if we're calling
     * into this function, but buggy apps may unload libGLX without losing
     * current, in which case this won't be true when the dispatch table
     * is destroyed.
     */

Not sure if this is the case though, as it's quite cryptic to me.

Ok, actually it's something else... Bug this was caused by memory corruption as I was guessing.

See https://code.launchpad.net/~3v1n0/compiz/static-compregion-memory-curruption-fix/+merge/338342 and bug #1750619

Jeremy Bicha (jbicha) wrote :
Changed in unity (Ubuntu):
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 7.5.0+18.04.20180221.1-0ubuntu1

---------------
unity (7.5.0+18.04.20180221.1-0ubuntu1) bionic; urgency=medium

  * Unity use track_obj to safely connect to UScreen and Settings
    signals (LP: #1748330) (LP: #1748330)
  * CairoBaseWindow: don't try to compute the blur of an invalid texture
    (LP: #1290056)
  * Unity: use new definition of infinite CompRegion's (LP: #1749957)

 -- Marco Trevisan (Treviño) <mail@3v1n0.net> Wed, 21 Feb 2018 15:27:45 +0000

Changed in unity (Ubuntu):
status: Fix Committed → Fix Released
Timo Aaltonen (tjaalton) on 2018-06-29
Changed in libglvnd (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers