GNU bug report logs

#22053 'call-with-container' fails when CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Reply or subscribe to this bug. View this bug as an mbox, status mbox, or maintainer mbox

Report forwarded to bug-guix@gnu.org:
bug#22053; Package guix. (Sun, 29 Nov 2015 18:31:01 GMT) (full text, mbox, link).


Acknowledgement sent to Efraim Flashner <efraim@flashner.co.il>:
New bug report received and forwarded. Copy sent to bug-guix@gnu.org. (Sun, 29 Nov 2015 18:31:02 GMT) (full text, mbox, link).


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

From: Efraim Flashner <efraim@flashner.co.il>
To: <bug-guix@gnu.org>
Subject: silent failure on guix environment foo --container
Date: Sun, 29 Nov 2015 20:29:59 +0200
[Message part 1 (text/plain, inline)]
When trying to run `guix environment foo --container` I don't get a container
with a new shell or any useful information, it just thinks about it for a
while and then returns to the command prompt, allowing me to enter another
command.

efraim@debian-netbook:~$ strace -f -o log guix environment vim --container ; echo $?
1

efraim@debian-netbook:~$ uname -a
Linux debian-netbook 4.3-0.dmz.2-liquorix-amd64 #1 ZEN SMP PREEMPT Debian 4.3-2 (2015-11-17) x86_64 GNU/Linux

efraim@debian-netbook:~$ sudo sysctl -w kernel.unprivileged_userns_clone=1
sysctl: cannot stat /proc/sys/kernel/unprivileged_userns_clone: No such file or directory
(this kernel does allow running VMs as user, which makes it nice)

efraim@debian-netbook:~$ guix --version
guix (GNU Guix) 0.9.0

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[log.gz (application/gzip, attachment)]
[Message part 3 (application/pgp-signature, inline)]

Information forwarded to bug-guix@gnu.org:
bug#22053; Package guix. (Sun, 29 Nov 2015 21:22:02 GMT) (full text, mbox, link).


Message #8 received at 22053@debbugs.gnu.org (full text, mbox, reply):

From: ludo@gnu.org (Ludovic Courtès)
To: Efraim Flashner <efraim@flashner.co.il>
Cc: David Thompson <dthompson2@worcester.edu>, 22053@debbugs.gnu.org
Subject: Re: bug#22053: silent failure on guix environment foo --container
Date: Sun, 29 Nov 2015 22:20:33 +0100
Efraim Flashner <efraim@flashner.co.il> skribis:

> When trying to run `guix environment foo --container` I don't get a container
> with a new shell or any useful information, it just thinks about it for a
> while and then returns to the command prompt, allowing me to enter another
> command.
>
> efraim@debian-netbook:~$ strace -f -o log guix environment vim --container ; echo $?
> 1

The failure is:

--8<---------------cut here---------------start------------->8---
21228 mount("none", "/tmp/guix-directory.5sVcGc//dev/pts", "devpts", MS_NOSUID|MS_NOEXEC, "newinstance,ptmxmode=0666,mode=6"...) = -1 EPERM (Operation not permitted)
21228 exit_group(1)                     = ?
--8<---------------cut here---------------end--------------->8---

The problem may be that the kernel does not support
CONFIG_DEVPTS_MULTIPLE_INSTANCES.  Could you check that in
/proc/config.gz or similar?

The other problem is that there’s no error reporting, which doubles user
frustration.  David, could you look into it?  :-)

Ludo’.




Information forwarded to bug-guix@gnu.org:
bug#22053; Package guix. (Mon, 30 Nov 2015 06:52:01 GMT) (full text, mbox, link).


Message #11 received at 22053@debbugs.gnu.org (full text, mbox, reply):

From: Efraim Flashner <efraim@flashner.co.il>
To: ludo@gnu.org (Ludovic Courtès)
Cc: David Thompson <dthompson2@worcester.edu>, 22053@debbugs.gnu.org
Subject: Re: bug#22053: silent failure on guix environment foo --container
Date: Mon, 30 Nov 2015 08:50:32 +0200
[Message part 1 (text/plain, inline)]
On Sun, 29 Nov 2015 22:20:33 +0100
ludo@gnu.org (Ludovic Courtès) wrote:

> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
>  [...]  
> 
> The failure is:
> 
> --8<---------------cut here---------------start------------->8---
> 21228 mount("none", "/tmp/guix-directory.5sVcGc//dev/pts", "devpts", MS_NOSUID|MS_NOEXEC, "newinstance,ptmxmode=0666,mode=6"...) = -1 EPERM (Operation not permitted)
> 21228 exit_group(1)                     = ?
> --8<---------------cut here---------------end--------------->8---
> 
> The problem may be that the kernel does not support
> CONFIG_DEVPTS_MULTIPLE_INSTANCES.  Could you check that in
> /proc/config.gz or similar?

# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set

> 
> The other problem is that there’s no error reporting, which doubles user
> frustration.  David, could you look into it?  :-)
> 
> Ludo’.



-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[config.gz (application/gzip, attachment)]
[Message part 3 (application/pgp-signature, inline)]

Information forwarded to bug-guix@gnu.org:
bug#22053; Package guix. (Mon, 30 Nov 2015 12:23:02 GMT) (full text, mbox, link).


Message #14 received at 22053@debbugs.gnu.org (full text, mbox, reply):

From: ludo@gnu.org (Ludovic Courtès)
To: Efraim Flashner <efraim@flashner.co.il>
Cc: David Thompson <dthompson2@worcester.edu>, 22053@debbugs.gnu.org
Subject: Re: bug#22053: silent failure on guix environment foo --container
Date: Mon, 30 Nov 2015 13:22:34 +0100
Efraim Flashner <efraim@flashner.co.il> skribis:

> On Sun, 29 Nov 2015 22:20:33 +0100
> ludo@gnu.org (Ludovic Courtès) wrote:
>
>> Efraim Flashner <efraim@flashner.co.il> skribis:
>> 
>>  [...]  
>> 
>> The failure is:
>> 
>> --8<---------------cut here---------------start------------->8---
>> 21228 mount("none", "/tmp/guix-directory.5sVcGc//dev/pts", "devpts", MS_NOSUID|MS_NOEXEC, "newinstance,ptmxmode=0666,mode=6"...) = -1 EPERM (Operation not permitted)
>> 21228 exit_group(1)                     = ?
>> --8<---------------cut here---------------end--------------->8---
>> 
>> The problem may be that the kernel does not support
>> CONFIG_DEVPTS_MULTIPLE_INSTANCES.  Could you check that in
>> /proc/config.gz or similar?
>
> # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set

QED.  :-)  However, the daemon needs it too.  Don’t you have problems
with guix-daemon as well, when building things locally on that machine?

Ludo’.




Information forwarded to bug-guix@gnu.org:
bug#22053; Package guix. (Mon, 30 Nov 2015 12:45:02 GMT) (full text, mbox, link).


Message #17 received at 22053@debbugs.gnu.org (full text, mbox, reply):

From: Efraim Flashner <efraim@flashner.co.il>
To: ludo@gnu.org (Ludovic Courtès)
Cc: David Thompson <dthompson2@worcester.edu>, 22053@debbugs.gnu.org
Subject: Re: bug#22053: silent failure on guix environment foo --container
Date: Mon, 30 Nov 2015 14:44:13 +0200
[Message part 1 (text/plain, inline)]
On Mon, 30 Nov 2015 13:22:34 +0100
ludo@gnu.org (Ludovic Courtès) wrote:

> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > On Sun, 29 Nov 2015 22:20:33 +0100
> > ludo@gnu.org (Ludovic Courtès) wrote:
> >  
> >> Efraim Flashner <efraim@flashner.co.il> skribis:
> >> 
> >>  [...]  
> >> 
> >> The failure is:
> >> 
> >> --8<---------------cut here---------------start------------->8---
> >> 21228 mount("none", "/tmp/guix-directory.5sVcGc//dev/pts", "devpts", MS_NOSUID|MS_NOEXEC, "newinstance,ptmxmode=0666,mode=6"...) = -1 EPERM (Operation not permitted)
> >> 21228 exit_group(1)                     = ?
> >> --8<---------------cut here---------------end--------------->8---
> >> 
> >> The problem may be that the kernel does not support
> >> CONFIG_DEVPTS_MULTIPLE_INSTANCES.  Could you check that in
> >> /proc/config.gz or similar?  
> >
> > # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set  
> 
> QED.  :-)  However, the daemon needs it too.  Don’t you have problems
> with guix-daemon as well, when building things locally on that machine?
> 
> Ludo’.

Not at all, I've been building things all day. Is this the type of thing that
would control if there were multiple concurrent build processes? I've only
ever built things consecutively (not including make -j2). Without changing
settings, should I be building two packages concurrently, or building one and
downloading substitutes at the same time?

efraim@debian-netbook:~$ systemctl status guix-daemon.service
● guix-daemon.service - Guix daemon builds packges, installs them, and runs garbage collection.
   Loaded: loaded (/etc/systemd/system/guix-daemon.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2015-11-28 21:36:22 IST; 1 day 17h ago
 Main PID: 810 (guix-daemon)
   CGroup: /system.slice/guix-daemon.service
           └─810 /root/.guix-profile/bin/guix-daemon --build-users-group=guix-builder

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix@gnu.org:
bug#22053; Package guix. (Mon, 30 Nov 2015 12:52:02 GMT) (full text, mbox, link).


Message #20 received at 22053@debbugs.gnu.org (full text, mbox, reply):

From: ludo@gnu.org (Ludovic Courtès)
To: Efraim Flashner <efraim@flashner.co.il>
Cc: David Thompson <dthompson2@worcester.edu>, 22053@debbugs.gnu.org
Subject: Re: bug#22053: silent failure on guix environment foo --container
Date: Mon, 30 Nov 2015 13:51:12 +0100
Efraim Flashner <efraim@flashner.co.il> skribis:

> On Mon, 30 Nov 2015 13:22:34 +0100
> ludo@gnu.org (Ludovic Courtès) wrote:
>
>> Efraim Flashner <efraim@flashner.co.il> skribis:
>> 
>> > On Sun, 29 Nov 2015 22:20:33 +0100
>> > ludo@gnu.org (Ludovic Courtès) wrote:
>> >  
>> >> Efraim Flashner <efraim@flashner.co.il> skribis:
>> >> 
>> >>  [...]  
>> >> 
>> >> The failure is:
>> >> 
>> >> --8<---------------cut here---------------start------------->8---
>> >> 21228 mount("none", "/tmp/guix-directory.5sVcGc//dev/pts", "devpts", MS_NOSUID|MS_NOEXEC, "newinstance,ptmxmode=0666,mode=6"...) = -1 EPERM (Operation not permitted)
>> >> 21228 exit_group(1)                     = ?
>> >> --8<---------------cut here---------------end--------------->8---
>> >> 
>> >> The problem may be that the kernel does not support
>> >> CONFIG_DEVPTS_MULTIPLE_INSTANCES.  Could you check that in
>> >> /proc/config.gz or similar?  
>> >
>> > # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set  
>> 
>> QED.  :-)  However, the daemon needs it too.  Don’t you have problems
>> with guix-daemon as well, when building things locally on that machine?
>> 
>> Ludo’.
>
> Not at all, I've been building things all day.

I’ve realized that the daemon has a fallback case for this situation, in
libstore/build.cc:

--8<---------------cut here---------------start------------->8---
  /* Mount a new devpts on /dev/pts.  Note that this
     requires the kernel to be compiled with
     CONFIG_DEVPTS_MULTIPLE_INSTANCES=y (which is the case
     if /dev/ptx/ptmx exists). */
  if (pathExists("/dev/pts/ptmx") &&
      !pathExists(chrootRootDir + "/dev/ptmx")
      && dirsInChroot.find("/dev/pts") == dirsInChroot.end())
  {
      if (mount("none", (chrootRootDir + "/dev/pts").c_str(), "devpts", 0, "newinstance,mode=0620") == -1)
          throw SysError("mounting /dev/pts");
      createSymlink("/dev/pts/ptmx", chrootRootDir + "/dev/ptmx");

      /* Make sure /dev/pts/ptmx is world-writable.  With some
         Linux versions, it is created with permissions 0.  */
      chmod_(chrootRootDir + "/dev/pts/ptmx", 0666);
  }
--8<---------------cut here---------------end--------------->8---

David, should we do something similar?

Thanks,
Ludo’.




Changed bug title to ''call-with-container' fails when CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set' from 'silent failure on guix environment foo --container' Request was from ludo@gnu.org (Ludovic Courtès) to control@debbugs.gnu.org. (Sun, 28 Feb 2016 18:01:02 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Sep 8 03:20:23 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.