Devuan bug report logs - #445
lxc-start and lxc-execute cause segfault started by non-root without libpam-cgfs

version graph

Package: lxc; Maintainer for lxc is (unknown);

Reported by: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>

Date: Sat, 9 May 2020 01:33:02 UTC

Severity: minor

Tags: debian

Found in version 1:3.1.0+really3.0.3-8

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#445; Package lxc. (Sat, 09 May 2020 01:33:02 GMT) (full text, mbox, link).


Acknowledgement sent to Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>:
New bug report received and forwarded. Copy sent to devuan-dev@lists.dyne.org. (Sat, 09 May 2020 01:33:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.devuan.org (full text, mbox, reply):

From: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>
To: Devuan Bug Tracking System <submit@bugs.devuan.org>
Subject: lxc-start and lxc-execute cause segfault started by non-root and completely unusable
Date: Sat, 09 May 2020 10:16:05 +0900 (JST)
[Message part 1 (text/plain, inline)]
Package: lxc
Version: 1:3.1.0+really3.0.3-8
Severity: grave
Justification: renders package unusable

Dear Maintainer,

On a Devuan Beowulf (running on qemu-kvm), as root I can use the lxc package
with no problem. Thank you. As root, "lxc-start -F -n beowulf" works fine
in the below qemu-kvm image.

But when lxc-execute or lxc-start is run by a non-root user, they always give
segmentation fault and are completely unsable (screenshot attached).
One of claimed advantages of lxc is to allow non-root users to use containers,
but Devuan users cannot enjoy it...

The container's rootfs tree was prepared by

mmdebstrap --mode=unshare --components="main contrib non-free" --variant=standard beowulf $HOME/.local/share/lxc/beowulf/rootfs http://deb.devuan.org/merged

The screenshot and the qemu-kvm disk image (qcow file) are placed at

https://drive.google.com/drive/u/0/folders/1wDNYOYjt7XhMAl-ky7EsviGI-bowalc7

Its root password is "root" and the password of user "ryutaroh" is "ryutaroh".
/etc/default/keyboard is set to the Japanese layout, and may need editting.
So you should be able to reproduce this bug in your computer at hand.

Best regards, Ryutaroh Matsumoto



-- System Information:
Distributor ID:	Debian
Description:	Devuan GNU/Linux 3 (beowulf)
Release:	3
Codename:	beowulf
Architecture: x86_64

Kernel: Linux 4.19.0-8-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages lxc depends on:
ii  debconf [debconf-2.0]  1.5.71
ii  libc6                  2.28-10
ii  libcap2                1:2.25-2
ii  libgnutls30            3.6.7-4+deb10u3
ii  liblxc1                1:3.1.0+really3.0.3-8
ii  libseccomp2            2.3.3-4
ii  libselinux1            2.8-1+b1
ii  lsb-base               10.2019051400

Versions of packages lxc recommends:
ii  apparmor                     2.13.2-10
ii  bridge-utils                 1.6-2
pn  debootstrap                  <none>
pn  dirmngr                      <none>
ii  dnsmasq-base [dnsmasq-base]  2.80-1
pn  gnupg                        <none>
ii  iproute2                     4.20.0-2
ii  iptables                     1.8.2-4
pn  libpam-cgfs                  <none>
pn  lxc-templates                <none>
pn  lxcfs                        <none>
ii  openssl                      1.1.1d-0+deb10u3
pn  rsync                        <none>
ii  uidmap                       1:4.5-1.1

Versions of packages lxc suggests:
ii  btrfs-progs  4.20.1-2
pn  lvm2         <none>
pn  python3-lxc  <none>

-- debconf information:
  lxc/auto_update_config:
[ScreenShot-of-LXC-on-Beowulf.png (image/png, inline)]

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#445; Package lxc. (Sat, 09 May 2020 16:33:02 GMT) (full text, mbox, link).


Message #8 received at 445@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>, 445@bugs.devuan.org
Subject: Re: bug#445: lxc-start and lxc-execute cause segfault started by non-root and completely unusable
Date: Sat, 9 May 2020 17:07:25 +0100
On Sat, May 09, 2020 at 10:16:05AM +0900, Ryutaroh Matsumoto wrote:
> Package: lxc
> Version: 1:3.1.0+really3.0.3-8
> Severity: grave
> Justification: renders package unusable

Thanks.
 
> On a Devuan Beowulf (running on qemu-kvm), as root I can use the lxc package
> with no problem. Thank you. As root, "lxc-start -F -n beowulf" works fine
> in the below qemu-kvm image.
> 
> But when lxc-execute or lxc-start is run by a non-root user, they always give
> segmentation fault and are completely unsable (screenshot attached).
> One of claimed advantages of lxc is to allow non-root users to use containers,
> but Devuan users cannot enjoy it...

Is this different behaviour than when running on a Debian host? Devuan doesn't
fork lxc and uses Debian's packages directly.

Does your unprivileged user have write access to cgroups? That appears to be a
common cause of this from a quick internet search.

Mark

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#445; Package lxc. (Sun, 10 May 2020 01:03:07 GMT) (full text, mbox, link).


Acknowledgement sent to Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>:
Extra info received and forwarded to list. Copy sent to devuan-dev@lists.dyne.org. (Sun, 10 May 2020 01:03:09 GMT) (full text, mbox, link).


Message #13 received at 445@bugs.devuan.org (full text, mbox, reply):

From: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>
To: mark@hindley.org.uk
Cc: 445@bugs.devuan.org
Subject: Re: bug#445: lxc-start and lxc-execute cause segfault started by non-root and completely unusable
Date: Sun, 10 May 2020 09:47:04 +0900 (JST)
Control: retitle -1 lxc-start and lxc-execute cause segfault started by non-root without libpam-cgfs
Control: severity -1 minor

Hi Mark, Thanks again for your attention and response.

> Is this different behaviour than when running on a Debian host? Devuan doesn't
> fork lxc and uses Debian's packages directly.

I have never seen this. What I saw on Debian and Ubuntu was
https://github.com/lxc/lxc/issues/3221#issuecomment-600171973
which was unusable but not a segfault.

> Does your unprivileged user have write access to cgroups? That appears to be a
> common cause of this from a quick internet search.

The cause was that I did not install libpam-cgfs package.
You are welcome to close this, though this seems a minor bug to me.
I have no idea if this is an upstream issue.

Best regards, Ryutaroh

Changed bug title to 'lxc-start and lxc-execute cause segfault started by non-root without libpam-cgfs' from 'lxc-start and lxc-execute cause segfault started by non-root and completely unusable'. Request was from Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp> to 445-submit@bugs.devuan.org. (Sun, 10 May 2020 01:03:11 GMT) (full text, mbox, link).


Severity set to 'minor' from 'grave' Request was from Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp> to 445-submit@bugs.devuan.org. (Sun, 10 May 2020 01:03:11 GMT) (full text, mbox, link).


Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#445; Package lxc. (Sun, 10 May 2020 08:33:01 GMT) (full text, mbox, link).


Acknowledgement sent to Mark Hindley <mark@hindley.org.uk>:
Extra info received and forwarded to list. Copy sent to devuan-dev@lists.dyne.org. (Sun, 10 May 2020 08:33:03 GMT) (full text, mbox, link).


Message #22 received at 445@bugs.devuan.org (full text, mbox, reply):

From: Mark Hindley <mark@hindley.org.uk>
To: 445@bugs.devuan.org, Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>
Subject: Re: bug#445: lxc-start and lxc-execute cause segfault started by non-root and completely unusable
Date: Sun, 10 May 2020 09:18:58 +0100
Control: tags -1 debian

On Sun, May 10, 2020 at 09:47:04AM +0900, Ryutaroh Matsumoto wrote:
> > Does your unprivileged user have write access to cgroups? That appears to be a
> > common cause of this from a quick internet search.
> 
> The cause was that I did not install libpam-cgfs package.
> You are welcome to close this, though this seems a minor bug to me.
> I have no idea if this is an upstream issue.

I am glad you found the cause.

libpam-cgfs is a Recommends for lxc. If you feel this should be a Depends then
please report to Debian BTS who package lxc. I agree that if an absent
recommends is not handled gracefully, that is a bug.

Thanks.

Mark

Added tag(s) debian. Request was from Mark Hindley <mark@hindley.org.uk> to 445-submit@bugs.devuan.org. (Sun, 10 May 2020 08:33:05 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Thu Feb 25 11:02:03 2021;