unity-scope-tool tries to use the Mir plugin on X11

Bug #1306343 reported by James Henstridge
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
unity-mir (Ubuntu)
Invalid
Undecided
Unassigned
unity8 (Ubuntu)
Fix Released
Undecided
Michał Sawicz

Bug Description

When I run unity-scope-tool (version 7.85+14.04.20140410.1-0ubuntu1), it segfaults after printing the following error:

    ...
    Need to use QMirServerApplication
    file:///usr/share/unity8/Dash/DashApps.qml:20:1: plugin cannot be loaded for module "Unity.Application": Cannot load library /usr/lib/x86_64-linux-gnu/unity8/qml/Unity/Application/libunityapplicationplugin.so: (dlopen: cannot load any more object with static TLS)
    Segmentation fault (core dumped)

I did a quick web search for similar errors, which turned up this:

    http://stackoverflow.com/questions/14892101/cannot-load-any-more-object-with-static-tls

It seems that only a certain number of libraries compiled with -ftls-model=initial-exec can be loaded, after which this error occurs. It also says that initial-exec mode is default for non-PIC code, if that helps.

libunityapplicationplugin.so comes from libunity-mir1, which has version 0.3+14.04.20140401.1-0ubuntu1.

I'll attach a full log of stdout/stderr.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: unity-scope-tool 7.85+14.04.20140410.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-12.32-generic 3.13.4
Uname: Linux 3.13.0-12-generic x86_64
ApportVersion: 2.14.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Apr 11 10:46:50 2014
InstallationDate: Installed on 2013-10-29 (163 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
SourcePackage: unity8
UpgradeStatus: Upgraded to trusty on 2013-11-28 (133 days ago)

Revision history for this message
James Henstridge (jamesh) wrote :
Revision history for this message
James Henstridge (jamesh) wrote :

And here's the full stdout/stderr log.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity8 (Ubuntu):
status: New → Confirmed
Revision history for this message
James Henstridge (jamesh) wrote :

After digging a bit further, libraries that can trigger this have the DF_STATIC_TLS flag set in the DT_FLAGS entry of the dynamic section. This can be checked for with:

    readelf --dynamic library.so | grep FLAGS

libunityapplicationplugin.so is not to blame here, but a number of its dependencies might have triggered it:

/lib/x86_64-linux-gnu/libm.so.6
 0x000000000000001e (FLAGS) STATIC_TLS
/lib/x86_64-linux-gnu/libc.so.6
 0x000000000000001e (FLAGS) STATIC_TLS
/lib/x86_64-linux-gnu/libpthread.so.0
 0x000000000000001e (FLAGS) STATIC_TLS
/lib/x86_64-linux-gnu/librt.so.1
 0x000000000000001e (FLAGS) STATIC_TLS
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
 0x000000000000001e (FLAGS) STATIC_TLS
/usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so.1
 0x000000000000001e (FLAGS) STATIC_TLS
/usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so.2
 0x000000000000001e (FLAGS) STATIC_TLS
/usr/lib/x86_64-linux-gnu/libglapi.so.0
 0x000000000000001e (FLAGS) STATIC_TLS
/lib/x86_64-linux-gnu/libresolv.so.2
 0x000000000000001e (FLAGS) STATIC_TLS

Revision history for this message
Michał Sawicz (saviq) wrote : Re: [Bug 1306343] [NEW] unity-scope-tool segfaults with message "(dlopen: cannot load any more object with static TLS"

On 11.04.2014 03:59, James Henstridge wrote:
> When I run unity-scope-tool (version 7.85+14.04.20140410.1-0ubuntu1), it
> segfaults after printing the following error:

The error basically means it's trying to use the Mir backend for
applications instead of the fake one. Something must've gone wrong with
dependencies.

Can you please check out:

apt-cache policy unity8 unity8-private unity8-fake-env

Changed in unity8 (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Michał Sawicz (saviq)
Revision history for this message
James Henstridge (jamesh) wrote : Re: unity-scope-tool segfaults with message "(dlopen: cannot load any more object with static TLS"

unity8:
  Installed: 7.85+14.04.20140410.1-0ubuntu1
  Candidate: 7.85+14.04.20140410.1-0ubuntu1
  Version table:
 *** 7.85+14.04.20140410.1-0ubuntu1 0
        500 http://ftp.iinet.net.au/pub/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
     7.84+14.04.20140116-0ubuntu1 0
        400 http://ppa.launchpad.net/ubuntu-unity/daily-build/ubuntu/ trusty/main amd64 Packages
unity8-private:
  Installed: 7.85+14.04.20140410.1-0ubuntu1
  Candidate: 7.85+14.04.20140410.1-0ubuntu1
  Version table:
 *** 7.85+14.04.20140410.1-0ubuntu1 0
        500 http://ftp.iinet.net.au/pub/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
     7.84+14.04.20140116-0ubuntu1 0
        400 http://ppa.launchpad.net/ubuntu-unity/daily-build/ubuntu/ trusty/main amd64 Packages
unity8-fake-env:
  Installed: (none)
  Candidate: 7.85+14.04.20140410.1-0ubuntu1
  Version table:
     7.85+14.04.20140410.1-0ubuntu1 0
        500 http://ftp.iinet.net.au/pub/ubuntu/ trusty/universe amd64 Packages
     7.84+14.04.20140116-0ubuntu1 0
        400 http://ppa.launchpad.net/ubuntu-unity/daily-build/ubuntu/ trusty/main amd64 Packages

Revision history for this message
James Henstridge (jamesh) wrote :

Installing unity8-fake-env seems to have made unity-scope-tool load correctly again. The dlopen error still sounds like a potential problem though.

Revision history for this message
Michał Sawicz (saviq) wrote :

Yeah, we'll have to rejig our deps, then... Feels like the tool should always depend on -fake-env... Fortunately it won't need it at all soon.

Adding a unity-mir task to see about the dlopen.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity-mir (Ubuntu):
status: New → Confirmed
Michał Sawicz (saviq)
summary: - unity-scope-tool segfaults with message "(dlopen: cannot load any more
- object with static TLS"
+ unity-scope-tool tries to use the Mir plugin on X11
Changed in unity8 (Ubuntu):
status: In Progress → Confirmed
Changed in unity-mir (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
kevin gunn (kgunn72) wrote :

surely this isn't a bug anymore ?

Revision history for this message
Michał Sawicz (saviq) wrote :

Right, it's not, because we don't have DashApps any more.

Changed in unity8 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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