Issues when activating a large number of applications at the same time

Bug #1635194 reported by Dave Morley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snap-confine
Invalid
Critical
Unassigned
snap-confine (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

STORY:
Wanted to see if there were a limit to the number of apps you could install and run at once.

STEPS:
1. Flash latest core
2. snap download hello-world
3. sudo unsquashfs hello-world_27.snap
4. sudo chown -R <user:user> sqaushfs-root/
5. (set -e; for i in {1..258}; do sed -i -e "s/^name: hello-world.*$/name: hello-world-$i/" squashfs-root/meta/snap.yaml; mksquashfs squashfs-root/ hello-world-$i.snap -noappend -comp xz -all-root -no-xattrs; done )
6. for i in `find . -name \*.snap`;do sudo snap install --dangerous $i; done
7. for i in {1..258}; do hello-world-$i.sh & done

EXPECTED:
I expect all that snaps to be runable

ACTUAL:
Part way through the mounts nolonger mount and run exiting the mount.

EXAMPLE_ERROR:
Launching a shell inside the default app confinement. Navigate to your
app-specific directories with:

  $ cd $SNAP
  $ cd $SNAP_DATA
  $ cd $SNAP_USER_DATA

cannot acquire exclusive lock for namespace group directorycannot acquire exclusive lock for namespace group directorycannot acquire exclusive lock for namespace group directorycannot acquire exclusive lock for namespace group directorycannot acquire exclusive lock for namespace group directorycannot acquire exclusive lock for namespace group directorycannot acquire exclusive lock for namespace group directorycannot acquire exclusive lock for namespace group directorycannot acquire exclusive lock for namespace group directorycannot acquire exclusive lock for namespace group directorycannot acquire exclusive lock for namespace group directory. errmsg: Interrupted system call
. errmsg: Interrupted system call
. errmsg: Interrupted system call
. errmsg: Interrupted system call
. errmsg: Interrupted system call
. errmsg: Interrupted system call
. errmsg: Interrupted system call
. errmsg: Interrupted system call
. errmsg: Interrupted system call
. errmsg: Interrupted system call
. errmsg: Interrupted system call
Launching a shell inside the default app confinement. Navigate to your

Dave Morley (davmor2)
description: updated
Zygmunt Krynicki (zyga)
Changed in snap-confine:
status: New → In Progress
assignee: nobody → Zygmunt Krynicki (zyga)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

It seems this bug affects core systems only (this is just a theory) and the solution is to make a few more things unbindable. I'm investigating the cause right now.

Changed in snap-confine:
importance: Undecided → Critical
milestone: none → 1.0.45
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This is a pastebin from a system with a few snaps and three active mount namespaces: http://paste.ubuntu.com/23353845/

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Once upon a time the Linux kernel defaulted to only 16 loopback mounts at a time; is that still the case? Or is it a coincidence that your paste shows 16 loopbacks in use?

Thanks

Revision history for this message
John Lenton (chipaca) wrote :

Coincidence; there were over 200 loopbacks active in the system.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This was traced to running out of memory and addressed via kernel bug https://bugs.launchpad.net/snappy/+bug/1636847

There may be an issue left to investigate that affects core systems and /writable. I will add a spread test and either close this issue (via duplicate link) or work on a remedy for /writable.

Zygmunt Krynicki (zyga)
Changed in snap-confine:
milestone: 2.19 → none
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I've closed this bug. The root cause was a kernel configuration option that used excessive memory for each mounted squashfs file. This has been fixed long ago now.

Changed in snap-confine:
status: In Progress → Invalid
Changed in snap-confine (Ubuntu):
status: New → Invalid
Changed in snap-confine:
assignee: Zygmunt Krynicki (zyga) → nobody
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.