Devuan bug report logs - #442
bash: cannot use job control in an unprivileged LXC container

version graph

Package: bash; Maintainer for bash is (unknown); Source for bash is src:bash.

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

Date: Fri, 8 May 2020 08:33:01 UTC

Severity: minor

Found in version 5.0-4

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#442; Package bash. (Fri, 08 May 2020 08:33:01 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. (Fri, 08 May 2020 08:33:05 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: bash: cannot use job control in an unprivileged LXC container
Date: Fri, 08 May 2020 17:08:10 +0900 (JST)
Package: bash
Version: 5.0-4
Severity: minor

Dear Maintainer,

I made an LXC unprivileged container of Devuan on Debian Bullseye by
mmdebstrap --mode=unshare --components="main contrib non-free" --variant=standard beowulf /home/ryutaroh/.local/share/lxc/devuan/rootfs http://deb.devuan.org/merged

"Unprivileged" means that it is started by a non-root user (on host Linux).

The Devuan container works almost fine, but I experienced a minor problem.
When I login from /dev/console by "lxc-start -F -n devuan",
I got the error message from /bin/bash as

-bash: cannot set terminal process group (709): Inappropriate ioctl for device
-bash: no job control in this shell

I do not see the above problem when Devuan is started in
a privileged LXC container.

I do not see the above problem in recent releases of Debian or Ubuntu running
in LXC containers, neither, so it seems Devuan-specific.

I guess that the above problem may occur in a Devuan container on Devuan host,
so it should be reproducible only in Devuan (without use of Debian or Ubuntu).

Best regards, Ryutaroh Matsumoto


-- System Information:
Architecture: x86_64

Kernel: Linux 5.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages bash depends on:
ii  base-files   10.3+devuan3.4
ii  debianutils  4.8.6.1
ii  libc6        2.28-10
ii  libtinfo6    6.1+20181013-2+deb10u2

Versions of packages bash recommends:
ii  bash-completion  1:2.8-6

Versions of packages bash suggests:
pn  bash-doc  <none>

-- no debconf information

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#442; Package bash. (Fri, 08 May 2020 10:18:01 GMT) (full text, mbox, link).


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

From: Mark Hindley <mark@hindley.org.uk>
To: 442@bugs.devuan.org, Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>
Subject: Re: bash: cannot use job control in an unprivileged LXC container
Date: Fri, 8 May 2020 10:57:11 +0100
Ryutaroh,

Thanks.

On Fri, 08 May 2020 17:08:10 +0900 (JST) Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp> wrote:
> Package: bash
> Version: 5.0-4
> Severity: minor
> 
> Dear Maintainer,
> 
> I made an LXC unprivileged container of Devuan on Debian Bullseye by
> mmdebstrap --mode=unshare --components="main contrib non-free" --variant=standard beowulf /home/ryutaroh/.local/share/lxc/devuan/rootfs http://deb.devuan.org/merged
> 
> "Unprivileged" means that it is started by a non-root user (on host Linux).
> 
> The Devuan container works almost fine, but I experienced a minor problem.
> When I login from /dev/console by "lxc-start -F -n devuan",
> I got the error message from /bin/bash as
> 
> -bash: cannot set terminal process group (709): Inappropriate ioctl for device
> -bash: no job control in this shell

This message is usually seen when there is no tty allocated. Are you logging in
from a text terminal or x terminal?

> I do not see the above problem when Devuan is started in
> a privileged LXC container.
> I do not see the above problem in recent releases of Debian or Ubuntu running
> in LXC containers, neither, so it seems Devuan-specific.

Is that not seen on  Debian running systemd or sysvinit?

Thanks

Mark

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#442; Package bash. (Fri, 08 May 2020 11:03:02 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. (Fri, 08 May 2020 11:03:04 GMT) (full text, mbox, link).


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

From: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>
To: mark@hindley.org.uk
Cc: 442@bugs.devuan.org
Subject: Re: bash: cannot use job control in an unprivileged LXC container
Date: Fri, 08 May 2020 19:43:50 +0900 (JST)
Hi Mark,

> Is that not seen on  Debian running systemd or sysvinit?

I do not see this symptom with

Host Linux = Debian Bullseye (lxc version 4.0.2 in Debian experimental)
Guest Linux = Debian Buster runnning systemd-sysv (bash package version is 5.0-4).

I cannot test sysvinit on Buster, because Debian Buster does not have
the sysvinit-core package!!!!!

> This message is usually seen when there is no tty allocated. Are you logging in
> from a text terminal or x terminal?

"lxc-start -F -n devuan" was started from tty3 (text).
I did not test GUI terminal, as I don't have it on Debian Bullseye.

Best regards, Ryutaroh

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#442; Package bash. (Fri, 08 May 2020 11:03:07 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. (Fri, 08 May 2020 11:03:09 GMT) (full text, mbox, link).


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

From: Mark Hindley <mark@hindley.org.uk>
To: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>
Cc: 442@bugs.devuan.org
Subject: Re: bash: cannot use job control in an unprivileged LXC container
Date: Fri, 8 May 2020 11:51:31 +0100
On Fri, May 08, 2020 at 07:43:50PM +0900, Ryutaroh Matsumoto wrote:
> Hi Mark,
> 
> > Is that not seen on  Debian running systemd or sysvinit?
> 
> I do not see this symptom with
> 
> Host Linux = Debian Bullseye (lxc version 4.0.2 in Debian experimental)
> Guest Linux = Debian Buster runnning systemd-sysv (bash package version is 5.0-4).
> 
> I cannot test sysvinit on Buster, because Debian Buster does not have
> the sysvinit-core package!!!!!

I think it does:

sysvinit-core | 2.88dsf-59    | oldoldstable | amd64, armel, armhf, i386
sysvinit-core | 2.88dsf-59.9  | oldstable    | amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
sysvinit-core | 2.93-8        | stable       | amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x
sysvinit-core | 2.96-3        | testing      | amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
sysvinit-core | 2.96-3        | unstable     | amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x

But no matter, I was just trying to narrow down possibilities.

> 
> > This message is usually seen when there is no tty allocated. Are you logging in
> > from a text terminal or x terminal?
> 
> "lxc-start -F -n devuan" was started from tty3 (text).

The usual quoted workaround for this sysmptom is using setsid(1) so that
the  process is a session leader. However, I don't have any experience with lxc
to know if that is possible or relevant in this case.

Best wishes

Mark

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#442; Package bash. (Fri, 08 May 2020 11:03:11 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. (Fri, 08 May 2020 11:03:13 GMT) (full text, mbox, link).


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

From: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>
To: mark@hindley.org.uk
Cc: 442@bugs.devuan.org
Subject: Re: bash: cannot use job control in an unprivileged LXC container
Date: Fri, 08 May 2020 19:54:29 +0900 (JST)
Hi Mark,

>> I cannot test sysvinit on Buster, because Debian Buster does not have
>> the sysvinit-core package!!!!!
> I think it does:
(deleted)
> But no matter, I was just trying to narrow down possibilities.

Sorry, you are right and I was wrong.
Actually, apt-get install sysvinit-core reproduces the same symptom
with Debian Buster with sysvinit-core.

Best regards, Ryutaroh

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#442; Package bash. (Fri, 08 May 2020 11:18:04 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. (Fri, 08 May 2020 11:18:07 GMT) (full text, mbox, link).


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

From: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>
To: mark@hindley.org.uk
Cc: 442@bugs.devuan.org
Subject: Re: bash: cannot use job control in an unprivileged LXC container
Date: Fri, 08 May 2020 20:00:00 +0900 (JST)
> The usual quoted workaround for this sysmptom is using setsid(1) so that
> the  process is a session leader. However, I don't have any experience with lxc
> to know if that is possible or relevant in this case.

"setsid bash" did not work around this symptom...
On the other hand, logging in by "lxc-attach -n devuan" as root
does not cause this symptom, so it is another workaround...

Best regards, Ryutaroh

Information forwarded to devuan-bugs@lists.dyne.org, devuan-dev@lists.dyne.org:
bug#442; Package bash. (Sun, 10 May 2020 01:03:01 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:04 GMT) (full text, mbox, link).


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

From: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>
To: mark@hindley.org.uk
Cc: 442@bugs.devuan.org
Subject: Re: bash: cannot use job control in an unprivileged LXC container
Date: Sun, 10 May 2020 09:52:31 +0900 (JST)
I verified that #442 bash: cannot use job control in an unprivileged LXC container
is reproducible when
Host Linux = Devuan Beowulf
Guest Linux = Devuan Beowulf
(after addressing #445).

On the other hand, I have never seen this issue when a container guest is not Devuan...
Ryutaroh

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: Tue Apr 23 10:04:23 2024;