applications close instantly when launched from the launcher or dash

Bug #1535058 reported by dinamic
182
This bug affects 35 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Alejandro J. Cura
cgmanager (Ubuntu)
Incomplete
Undecided
Unassigned
qtmir (Ubuntu)
Invalid
Undecided
Unassigned
ubuntu-app-launch (Ubuntu)
Fix Released
High
Ted Gould
unity8 (Ubuntu)
Invalid
Undecided
Unassigned
unity8-desktop-session (Ubuntu)
Invalid
Undecided
Unassigned
upstart (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

xenial
applications close instantly when launched from the launcher or dash
but... if i launch the apps from a VT (for ex firefox using Xmir or gedit native --), the app loads ok.

what close instantly means.. it opens the window and then it closes instantly in ~0.3s

-----------------------------------

This has been traced to two causes:
pam was not installed, it is now a dependency of ubuntu-app-launch or can be installed directly
$ sudo apt-get install libpam-cgfs

and cgmanager is not enabled by default on systems that were upgraded and not clean installs. To enable it

$ sudo systemctl enable cgmanager

Related branches

Revision history for this message
dinamic (dinamic6661) wrote :
Revision history for this message
dinamic (dinamic6661) wrote :

qtmir.applications: ApplicationManager::focusApplication - appId= "com.ubuntu.terminal"
qtmir.applications: Application::setFocused - appId= "unity8-dash" focused= false
qtmir.applications: ApplicationManager::onAppDataChanged: Received "focused" update "unity8-dash"
qtmir.applications: Application::setFocused - appId= "com.ubuntu.terminal" focused= true
qtmir.applications: ApplicationManager::onAppDataChanged: Received "focused" update "com.ubuntu.terminal"
qtmir.applications: ApplicationManager::move - from= 1 to= 0
qtmir.applications: ApplicationManager::move after "com.ubuntu.terminal,unity8-dash"
qtmir.surfaces: MirSurface[0x12b4e70,"unity8-dash"]::setFocus(false)
qtmir.applications: ApplicationManager::focusApplication - appId= "com.ubuntu.terminal"
qtmir.applications: Application::setFocused - appId= "com.ubuntu.terminal" focused= false
qtmir.applications: ApplicationManager::onAppDataChanged: Received "focused" update "com.ubuntu.terminal"
qtmir.applications: Application::setFocused - appId= "com.ubuntu.terminal" focused= true
qtmir.applications: ApplicationManager::onAppDataChanged: Received "focused" update "com.ubuntu.terminal"
qtmir.applications: ApplicationManager::move - from= 0 to= 0
qtmir.applications: ApplicationManager::onProcessFailed - appId= "com.ubuntu.terminal" duringStartup= true
qtmir.applications: Application::setInternalState - appId= "com.ubuntu.terminal" state= Stopped
qtmir.applications: ApplicationManager::remove - appId= "com.ubuntu.terminal"
qtmir.applications: ApplicationManager::unfocusCurrentApplication
qtmir.applications: ApplicationManager::focusApplication - appId= "unity8-dash"

what does move do? qtmir.applications: ApplicationManager::move - from= 1 to= 0

dinamic (dinamic6661)
description: updated
Revision history for this message
dinamic (dinamic6661) wrote :
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
Andrea Bernabei (faenil) wrote :

same here, on a fresh setup
(xenial 17Jan daily iso + unity8-desktop-session-mir package installed)

Revision history for this message
dinamic (dinamic6661) wrote :

another log, i also see "()
QXcbConnection: Could not connect to display
()"

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

ApplicationManager::onProcessFailed - appId= "com.ubuntu.terminal"

This suggests the app crashes on startup. Can ypu please check if you get a crash file in /var/crash for it?

Changed in qtmir (Ubuntu):
status: New → Incomplete
Changed in unity8 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
dinamic (dinamic6661) wrote :

there are no .crash files in /var/crash

so.. the apps sort of load to a point, i can see the window with controls, the spinning circle animation and in some cases part of the UI, for ex the settings. if i launch the terminal i see the window opened but it closes before soon after.

Revision history for this message
Andrea Bernabei (faenil) wrote :

this is the log for unity8 when I try to run system-settings
http://pastebin.ubuntu.com/14581497/

nothing interesting in unity8-dash.log

no .crash files generated.

Revision history for this message
Andrea Bernabei (faenil) wrote :

and there are no application logs generated, i.e. no log for the app I'm trying to start

Revision history for this message
dinamic (dinamic6661) wrote :

same here, no logs in ~/.cache/upstart

Revision history for this message
Andrea Bernabei (faenil) wrote :

debug log with
initctl set-env —global QT_LOGGING_RULES="qtmir.*.debug=true"
added to unity8.conf file

http://pastebin.ubuntu.com/14590994/

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

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

Changed in ubuntu-app-launch (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Zanetti (mzanetti) wrote :

This must be an issue in ubuntu-app-launch (or something that is depending on). When this issue happens, qtmir just gets a "processFailed" event by u-a-l. Also, bypassing ubuntu-app-launch allows to run applications fine.

affects: ubuntu-app-launch → ubuntu-app-launch (Ubuntu)
Changed in ubuntu-app-launch (Ubuntu):
status: New → Confirmed
Changed in qtmir (Ubuntu):
status: Incomplete → Invalid
Changed in unity8 (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Ted Gould (ted) wrote :

It looks like Upstart isn't able to create cgroups on Xenial. We've started up the cgmanager before the starting of Upstart, but jobs that have the "cgroup" entry in their Upstart job configuration immediately go to failed without running their exec. We are using the "freezer" cgroup which seems to be allowed by the user and configured. I think this bug is with the upstart configuration on Xenial.

Changed in ubuntu-app-launch (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@ted,

could you restart cgmanager with --debug, then show the debug output?

(Assuming you're on systemd, add --debug to the cmdline in /lib/systemd/system/cgmanager.service, restart it, start an app, then show output of journalctl -u cgmanager)

I suspect libpam-cgm will need to create the cgroup with same path that systemd used for the name=systemd cgroup.

That, or (if this is the exact problem) upstart needs to not assume that all cgroups are the same path.

Revision history for this message
Andrea Bernabei (faenil) wrote :

@Serge: here's the log you requested

http://pastebin.ubuntu.com/14598836/

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1535058] Re: applications close instantly when launched from the launcher or dash

Thanks, that shows

Jan 22 17:02:36 usertesting-Vostro-3550 cgmanager[588]: cgmanager:do_create_main: pid 2486 (uid 1000 gid 1000) may not create under /run/cgmanager/fs/freezer

So the next two questions would be: what is pid 2486 (and its parent)? What is its cgroup?

and, in the case where it works, what cgroup does the equivalent task try to create?

Revision history for this message
Andrea Bernabei (faenil) wrote :

When I run it from cmdline there are no new lines added to the log

Revision history for this message
Ted Gould (ted) wrote :

On Fri, 2016-01-22 at 17:36 +0000, Serge Hallyn wrote:
> So the next two questions would be: what is pid 2486 (and its
> parent)?
> What is its cgroup?
The PID who is creating the group should be Upstart itself, or a
helper. We are telling Upstart to do it using the "cgroup" field in the
job file. Specifically the job config file has "cgroup freezer".
> and, in the case where it works, what cgroup does the equivalent task
> try to create?
>

It should be creating "upstart/$job-$instance" so for a legacy instance
of Inkscape the cgroup would be "upstart/application-legacy-inkscape
-23452345", the last number is a timestamp.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Tried to reproduce this in a xenial vm, but in legacy unity things work fine, and 'apt-get install unity8' didn't give me a unity8 option at login.

Revision history for this message
Andrea Bernabei (faenil) wrote :

you need unity8-desktop-session-mir

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hm, maybe this is related. But login is hanging with:

upstart: upstart-event-bridge main process (2252) terminated with status 1
upstart: upstart-event-bridge main process ended, respawning
upstart: update-notifier-crash (/var/crash/_usr_bin_unity8-dash.1000.crash) main process (2300) terminated with status 1
upstart: click-user-hooks main process (2238) terminated with status 1
upstart: ubuntu-push-client main process (2522) terminated with status 1

after which the last two lines repeat endlessly (in .xsession-errors, with
increasing pids of course).

Revision history for this message
Andrea Bernabei (faenil) wrote :

what do you mean?

 I can login to unity8 without issues, on a fresh xenial install + unity8-desktop-session-mir package.

Is there anything else I can provide to help fix this bug?

Revision history for this message
Andrea Bernabei (faenil) wrote :

Updates:

Serge suggested to

1. Edit /etc/pam.d/common-session to change the pam_cgm.so line to just
session optional pam_cgm.so

But I couldn't find that line in my common-session file.
After a brief research, I found out that file is supposed to come from libpam-cgm, which was not installed on my system!

I installed libpam-cgm and boom! I can run apps on Unity8!

So, somehow libpam-cgm is not being pulled in, how do we proceed?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

What file or dbus call is used to start the upstart job? Why
is upstart requiring cgroups? Is it something you want/need,
or is it being done inadvertently?

If it's something you need, then unity8 or one of its pieces must
depend on libpam-cgm (soon libpam-cgfs). If not, then we should
figure out where the dependency is coming from, as it would be
better to not require the extra package if unneeded, obviously.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

And thanks for testing that!

Revision history for this message
Andrea Bernabei (faenil) wrote :

Honestly, I don't know.

I'm not familiar with how we use cgroups, I just installed Xenial and the unity8-desktop-session-mir package, which is currently the recommended method to use Unity8 on a laptop...

So, I can't answer your question :(

Revision history for this message
Ted Gould (ted) wrote :

On Tue, 2016-01-26 at 18:09 +0000, Serge Hallyn wrote:
> What file or dbus call is used to start the upstart job? Why
> is upstart requiring cgroups? Is it something you want/need,
> or is it being done inadvertently?
We use the cgroups to track the pids inside a confined application.
This way they can't fork bomb their way out of the application
lifecycle. We do need cgroups.

Ted Gould (ted)
Changed in upstart (Ubuntu):
status: New → Invalid
Changed in cgmanager (Ubuntu):
status: New → Invalid
Changed in ubuntu-app-launch (Ubuntu):
status: Invalid → In Progress
assignee: nobody → Ted Gould (ted)
importance: Undecided → High
Revision history for this message
David Planella (dpm) wrote :

Is there any additional step required to get apps to start?

In my case, the libpam-cgs package was already installed on my desktop, and it didn't make any difference (apps still close after a split second). I also tried to edit /etc/pam.d/common-session as instructed on comment #25, but that didn't make a difference either.

Revision history for this message
Andrea Bernabei (faenil) wrote :

@David: I think you need to install libpam-cgm

the plan is to move to libpam-cgfs, but I'm not sure that has landed yet.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I have no idea, unfortunately i've not been able to get far enough with
unity8 to reproduce this. Could you please restart cgmanager with the
--debug command line option, reproduce, then send me the debug log?

Also show the /proc/self/cgroup output for the task (upstart?) that
does the failed firing off of apps. Thanks!

Revision history for this message
Andrea Bernabei (faenil) wrote :

I think he just needs libpam-cgm, since he installed libpam-cgfs :)

but yeah, let's see what he reports :)

Revision history for this message
Ted Gould (ted) wrote :

I think that some issues that people may be having is it seems that on some systems the cgmanager doesn't start before the login. I *think* but haven't verified that the difference is whether the system has LXD installed, as LXD starts it.

Revision history for this message
David Planella (dpm) wrote :

@Andrea, in fact, I tried installing first libpam-cgm (no luck) and then libpam-cgfs (no luck either).

I've no idea how to restart cmanager, so any guidance in there, would be great, thanks!

Revision history for this message
Andrea Bernabei (faenil) wrote :

@David: I see...once you added --debug to the .service file one way to be absolutely sure that cgmanager is restarted is to reboot your system :D never fails :)

Revision history for this message
Ted Gould (ted) wrote :

On Wed, 2016-02-03 at 14:55 +0000, David Planella wrote:
> I've no idea how to restart cmanager, so any guidance in there, would
> be
> great, thanks!
You can use the service tool to control the service. Note you'll need
to start it before logging in.
$ sudo service cgmanager start

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi,

reading back over this bug; @dpm said he did not have cgmanager installed. Upstart uses cgmanager to create cgroups. So without cgmanager this would certainly fail.

Would it be possible for someone to get a VM exporting unity8 over spice or vnc and give me credentials? (since i've failed to set something up that works) Or actually i don't even need gui access, if i can just ssh in and strace things while asking someone to click go on the app a few times, that would be very helpful.

tags: added: unity8-desktop
Revision history for this message
kevin gunn (kgunn72) wrote :

@serge a couple of things that could be preventing your login of unity8

1) Upgrade your system. Verify you have Mir 0.19.0 installed and then remove some broken packages that _will_ make Unity8 crash:
  $ sudo apt-get remove mir-client-platform-mesa3 mir-client-platform-mesa2 mir-client-platform-mesa1
you should be on mir-client-platform-mesa4

2) Exercise your arm. We presently block for up to 30 seconds waiting for the kernel entropy pool to get populated (which may not happen). After 30 seconds, if it hasn't then Mir will give up and crash. Presently this is considered a "security feature" but we're improving on it. The workaround is to move your mouse around furiously both before and during the login process.
(https://bugs.launchpad.net/mir/+bug/1536662)

3) unity8 is supposed to be on vt8, but double check vt9 and see if unity8 is there, for some reason, i see it on vt9 not vt8 - i discovered on accident in frustration flipping between vts

4) this bug may also get you https://bugs.launchpad.net/ubuntu/+source/clutter-gst-3.0/+bug/1525285 causes a deadlock

lastly, how to find unity8 login (which i've always found hard to explain in words) for those that may want to try
http://www.youtube.com/watch?v=W4Ijz8QSMJM

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Is this a duplicate of bug 1513266 or vice versa?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Workaround - works for me:

1. sudo apt-get install libpam-cgfs
2. Log out of Unity8 and log in again.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Comment #42 fixes System Settings fully. It also allows the Browser to start for a second or two, but then Browser crashes for apparently new reasons -> bug 1545969

Revision history for this message
MV (mvidal) wrote :

with unity 16.04 (proposed packages) no lxc.

I don't know if it works when launching with a terminal because I can't launch terminal app ... but the problem is not solved with comment #42 solution.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

MV: If that's not helping you, you need to log a new bug (or find another one that better describes the problems you see).

Revision history for this message
MV (mvidal) wrote :

Here is the log when trying to open the terminal the browser than the settings panel from the dash and/or the panel

Revision history for this message
David Planella (dpm) wrote :

I'm not sure if that helps, but in my case comment 42 did not make a difference, and I've noticed that at least from the regular Unity 7 session cgmanager hadn't been started automatically:

$ sudo service cgmanager status
[sudo] password for dpm:
● cgmanager.service - Cgroup management daemon
   Loaded: loaded (/lib/systemd/system/cgmanager.service; disabled; vendor prese
   Active: inactive (dead)

dpm@el-far:~$ apt-cache policy cgmanager
cgmanager:
  Instaŀlat: 0.39-2ubuntu5
  Candidat: 0.39-2ubuntu5
  Taula de versió:
 *** 0.39-2ubuntu5 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

$ apt-cache policy libpam-cgfs libpam-cgm
libpam-cgfs:
  Instaŀlat: 2.0.0~rc3-0ubuntu1
  Candidat: 2.0.0~rc3-0ubuntu1
  Taula de versió:
 *** 2.0.0~rc3-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
libpam-cgm:
  Instaŀlat: (cap)
  Candidat: 0.39-2ubuntu5
  Taula de versió:
     0.39-2ubuntu5 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Revision history for this message
Stephen M. Webb (bregma) wrote :

If you think the problem is related to cgroups (there really is no application log in ~/.cache/upstart and no clues in ~/.xession-errors), try watching the systemd output (use 'journalctl -f | tee ~/jc.log') for messages related to cgroups or alternatively, apparmor.

Revision history for this message
MV (mvidal) wrote :

I'm in same situation than described in comment 47. (got RC4 packages instead of RC3 now)

Revision history for this message
David Planella (dpm) wrote :

I had another go at it, without success. After checking the status of the cgmanager service on tty1 (not started), I manually started the service.

I then logged into the Unity 8 session, but apps were still crashing. Here is some output showing cgmanager errors:

http://pastebin.ubuntu.com/15400866

Revision history for this message
MV (mvidal) wrote :

I believe there is a confusion about the two ways to install unity8 (with lxc or with ubuntu-desktop-session-mir) In my case I do not use lxc anymore. and I have to logout login on tty7.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

fwiw i occasionally log into unity8 on my amd64 xenial laptop. The terminal app starts up just fine for me.

Revision history for this message
David Planella (dpm) wrote :

@MV, this is about using the ubuntu-desktop-session-mir

@Serge, I eventually got it working, but every time I want to log into the Unity 8 session, I need to go to tty1 first and do a 'sudo service cgmanager start'.

Also, I think unrelated to this, with the workaround apps do start, except for the browser, which crashes after a few seconds of having started.

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

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

Changed in unity8-desktop-session (Ubuntu):
status: New → Confirmed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@David,

please look at /etc/pam.d/common-session. Do you by chance have
libpam-cgm rather than libpam-cgfs there? libpam-cgfs does
not require cgmanager running

On the other hand if unity8 itself requires it, then that's that.

And yeah, i guess I do have cgmanager running on my laptop, so I've
not tested it without.

Revision history for this message
David Planella (dpm) wrote :

Sorry, I had somehow missed the last replies and moved on to other things, subscribing to bug mail now.

Here's the output of my /etc/pam.d/common-session file, which I think from the comments contains the correct stance.
http://pastebin.ubuntu.com/15635909/

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@dpm

yeah that looks good. Are you still having this problem? apps don't start with cgmanager not running? If so, I'll try it out that way tonight.

Revision history for this message
Mark Morris (n-mark-y) wrote :

Want to mention my struggle to get Unity8 working up up until now. I still cant install apps but i got a lot of issues:

First Issues,

Login Screen - as soon as i hit enter to login the login box disappeared and nothing else was happening, after 48 hours of research i realised i was using nVidia Binary driver, Mir doesnt like it at all, switched to Xorg open source driver and now i had a desktop.

Second Issue,

No matter what i clicked on it would close instantly, apps etc, to fix this i did the follow "sudo apt-get install libpam-cgfs" now i could open system settings, however the browser still crashes on load, but now actually opens for a few seconds.

I cant install/downloads anything from the app store, i have no terminal etc any suggestions for this?

This is what i have so far, im a big noob when in comes to linux so im not sure if this helps anyone.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Mark, thanks for giving it a go.

Seems like a large proportion of people are using the Nvidia binary driver (which I knew already having maintained Compiz), and are keeping it installed when they try to test Unity8/Mir.

The bad news is we expect this to fail. And possibly should publicize that better (maybe??).

The good news is that we have a developer working on adding support for the latest Nvidia binary driver to Mir right now. We expect full support will be completed within months.

Revision history for this message
Mark Morris (n-mark-y) wrote :

Yeah i agree, there needs to be better documentation on the requirements before installation of Unity8.

Great to to see the nvidia drivers are coming soon.

I will keep updating if i find something new.

Revision history for this message
kevin gunn (kgunn72) wrote :

So I am still having this problem - just tried on a clean box with Xenial lastest.

Revision history for this message
kevin gunn (kgunn72) wrote :

btw, i checked if cgmanager is running on vt1 and it is.
cgmanager here is 0.39-2ubuntu5

let me know if other information is needed.

Revision history for this message
kevin gunn (kgunn72) wrote :

unity8.log from this experience

Revision history for this message
kevin gunn (kgunn72) wrote :

is there anything else that would be useful?

Revision history for this message
kevin gunn (kgunn72) wrote :

ok, tried journalctl as bregma recommended above - flipped back, tried to launch an app...
says
kg-Studio-1737 cgmanager[723]: cgmanger:do_create_main: pid 3903 (uid 1000 gid 1000) may not create under /run/cgmanager/fs/freezer

it will repeat this for every time...altho the number "3903" increases every time.
note: systemctl status cgmanager still says loaded and running. I also tried a systemctl restart, result is the same.

Changed in canonical-devices-system-image:
importance: Undecided → High
assignee: nobody → Alejandro J. Cura (alecu)
Revision history for this message
kevin gunn (kgunn72) wrote :

OK, thanks to Ted to confirm, this is actually what his branch fixes.
i needed to install
libpam-cgfs

his branch makes u-a-l dep on libpam-cgfs

Changed in canonical-devices-system-image:
status: New → In Progress
Revision history for this message
Evan R (emanguy1) wrote :

Adding onto this bug, I'm running Xenial and Unity8 applications are working under the normal unity7 session, but not in unity8. I don't know if this helps.

Revision history for this message
David Planella (dpm) wrote :

I'm somehow confused. While the attached branch adds a missing dependency, it seems from some of the comments this is not actually fixing the bug.

In my particular case:

- I had manually installed libpam-cgfs
- Modified /etc/pam.d/common-session as suggested [1] (although the branch does not seem to address that?)
- cgmanager does not start automatically

After manually starting cgmanager at some point I got apps running. However, having tried it again today, apps still close instantly even after manually starting the cgmanager service.

Are there any particular logs I could send to help debug the issue?

[1] http://pastebin.ubuntu.com/15635909

Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
milestone: none → 11
Revision history for this message
Ted Gould (ted) wrote :

So we fixed the fact that pam wasn't installed, but it seems for some systems cgmanager is still not running by default. For my machine it seems that, somehow, cgmanager got disabled. I was able to renable it using:

$ sudo systemctl enable cgmanager

Then upon rebooting it starts and everything is fine. I'm not sure how when it is installed it is determined whether or not cgmanager is enabled or disabled. Since my machines started it's life as a 12.04 box, I'm curious if in my case it is an upgrade error.

So for those who are still having this, and have a UAL version in the 0.9 range, could you please comment if your machine is an upgrade or clean install and then the output of:

$ sudo systemctl status cgmanager

To see whether it is enabled or disabled.

Revision history for this message
Ted Gould (ted) wrote :

Reopening the cgmanager task as it seems that it might be ending up disabled in some cases.

Changed in cgmanager (Ubuntu):
status: Invalid → New
Changed in ubuntu-app-launch (Ubuntu):
status: In Progress → Fix Released
status: Fix Released → Fix Committed
Changed in unity8-desktop-session (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Given this bug has a lot of subscribers, and more people complaining about the issue outside of Launchpad, it might be time to wipe your dev machine and start again clean.

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

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

Changed in cgmanager (Ubuntu):
status: New → Confirmed
Revision history for this message
Levi Bard (taktaktaktaktaktaktaktaktaktak) wrote :

Also affects me on a clean 16.04 installation.
Neither cgmanager nor libpam-cfgs were installed, let alone running.
The workaround from comment #42 works here.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@ted,

regarding comment #69, if "cgmanager somehow got disabled" that is different from "cgmanager was installed but not enabled by default." The latter shouldn't happen and would be a bug, the former would be an invalid bug.

Regarding later comments, indeed cgmanager and libpam-cgfs are not installed by default, they are pulled in as requirements when needed. Does unity-app-launch or unity8-desktop-session need to depend on those?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Please provide precise reproduction steps to get cgmanager installed but not enabled.

Changed in cgmanager (Ubuntu):
status: Confirmed → Incomplete
Changed in canonical-devices-system-image:
status: Fix Committed → Confirmed
milestone: 11 → xenial
Revision history for this message
Ted Gould (ted) wrote :

So I've taken a clean install from Desktop ISO and installed everything and cgmanager ends up enabled correctly and starts by default. So I believe that on my system, and others, there was an upgrade issue (perhaps a release or more ago). I don't know of anything that I did on my system that disabled cgmanager, but it was installed and disabled, I believe incorrectly. I'm not sure how we could reproduce that though.

My advice would be to leave the cgmanager portion as Incomplete until someone can come up with repo steps, but unfortunately I don't have those. Just some ideas.

I have shown that a clean install doesn't have this issue. (with the appropriate versions with the fixes attached)

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

> My advice would be to leave the cgmanager portion as Incomplete until
> someone can come up with repo steps, but unfortunately I don't have
> those. Just some ideas.

Yup let's do that - thanks.

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

This bug was fixed in the package ubuntu-app-launch - 0.9+16.04.20160510.2-0ubuntu1

---------------
ubuntu-app-launch (0.9+16.04.20160510.2-0ubuntu1) xenial; urgency=medium

  * Allow invalid desktop files for OTA11 quick fix (LP: #1580092)

 -- Ted Gould <email address hidden> Tue, 10 May 2016 19:11:21 +0000

Changed in ubuntu-app-launch (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Christopher Townsend (townsend) wrote :

I was just bitten by the fact that cgmanager is disabled during distro upgrades. I work on this stuff all of the time and took me a while to remember/figure out what the issue is. I can imagine users less experienced than me to want to throw their machine out of the window:) Oddly, the only clue I could find was in ~/.xsession-errors and this is not even an X session!

Is there anything we can possible do to ensure cgmanager is enabled and started after distro upgrades? Ideally, we would figure out why it's being disabled in the first place, but maybe as a workaround, we can add some check in a postinst script somewhere (ubuntu-app-launch? unity8-desktop-session?) that would enable and start cgmanager.

We really need to address this! Comments?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Why is it being *dis*abled? it's not needed, but it's also not in the way.

Revision history for this message
Christopher Townsend (townsend) wrote :

To be fair, I had a rather old distro on a partition and did a bunch of do-release-upgrade's to get to Yakkety. I may have hit the bug in some package in one of those upgrades that has since been EOL'd.

Others report recent upgrades to Yakkety are working fine, so I may be a one off.

Revision history for this message
David Planella (dpm) wrote :

In my case it's disabled, but even after enabling it manually, I'm getting the same errors that I had a few months back:

"cgmanager:do_create_main: pid 2118 (uid 1000 gid 1000) may not create under /run/cgmanager/fs/freezer"

http://pastebin.ubuntu.com/15635909

I'm not sure if this is a red herring, but in any case, even when the service is running, this bug is still reproducible and apps won't start. I.e. ever since I got hit by this bug, I've not been able to dogfood the Unity 8 session.

Revision history for this message
Christopher Townsend (townsend) wrote :

@Serge,

cgmanager is definitely needed to be running to launch apps in a Unity 8 desktop session. I have no idea what it disabling it and why.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Quoting David Planella (<email address hidden>):
> In my case it's disabled, but even after enabling it manually, I'm
> getting the same errors that I had a few months back:
>
> "cgmanager:do_create_main: pid 2118 (uid 1000 gid 1000) may not create
> under /run/cgmanager/fs/freezer"

This suggests that libpam-cgm is not installed or configured. Indeed,
cgmanager should not allow you to create a cgroup in that directory,
as that is the root freezer cgroup.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I'm sorry, I'm as context-swapped as you are... can you remind me why
it is needed, versus simply having libpam-cgfs setup to give you cgroups
upon login?

Revision history for this message
Ted Gould (ted) wrote :

On Thu, 2016-07-14 at 16:51 +0000, Serge Hallyn wrote:
> I'm sorry, I'm as context-swapped as you are...  can you remind me
> why
> it is needed, versus simply having libpam-cgfs setup to give you
> cgroups
> upon login?
We put applications in cgroups to ensure that their PIDs don't escape
and we can kill them all when the app shuts down. The Upstart cgroup
stanza uses cgmanager.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Per previous comments I needed to explicitly enable and start cgmanager. My system is one that was upgraded for at least two releases.

kevin gunn (kgunn72)
Changed in canonical-devices-system-image:
status: Confirmed → Fix Released
status: Fix Released → Confirmed
description: updated
Revision history for this message
Vincent Gerris (vgerris) wrote :

I am running 16.10 with budgie installed. Installing unity8 gave me the crashing apps issue.
Tried to :
sudo systemctl enable cgmanager
(it was already running)
sudo apt-get install libpam-cgfs
it was already installed
and
sudo apt-get install libpam-cgm
that was not installed.

I still have the problem with apps crashing, except for libertine

Revision history for this message
Mateus Fernandes Martins (mateus-martins20) wrote :

Same problem here. Ubuntu 16.04 + Stable Phone Overlay PPA. libpam-cgfs is installed, cgmanager is running but the apps open and close quickly. Only system-settings works in Unity 8.

Revision history for this message
fcole90 (fcole90) wrote :

I have the same problem, when I launch an app it immediately closes. I don't think it to be related, but this is happening since I added the budgie desktop ppa and installed the related packages. Also, can someone tell me how to launch apps from vt in Mir? Using ual always fails..

kevin gunn (kgunn72)
Changed in canonical-devices-system-image:
status: Confirmed → Fix Released
Revision history for this message
Antoine Monmayrant (bozubuntu) wrote :

I face exactly this bug under Bionic (18.04.1): some applications run fine when launched from the terminal but fails (ie opens that closes immediatly) when launched from a *.desktop file.
Should this bug be reopened or should I open a new one?

Revision history for this message
Antoine Monmayrant (bozubuntu) wrote :

Here is an example of a launcher that fails:

sudo apt install scilab
/usr/share/applications/scilab.desktop
exo-open /usr/share/applications/scilab.desktop
# scilab opens and closes immediatly

Mitigation:
sudo vim /usr/share/applications/scilab.desktop
-Exec=scilab -f %f
+Exec=xterm -e scilab -f %f
exo-open /usr/share/applications/scilab.desktop
# both xterm and scilab open and scilab works as expected

Revision history for this message
Gerry Boland (gerboland) wrote :

@bozubuntu
hey, thanks for the report, but this bug is for the discontinued unity8 desktop. I suggest you log a bug against ubuntu-desktop with as much information as you can supply:
https://bugs.launchpad.net/~ubuntu-desktop

exo-open is new to me, have you tried xdg-open?

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.