Opened 8 years ago

Last modified 8 years ago

#106 new defect

x11-common fails to install in debirf root

Reported by: jrollins Owned by: jrollins
Priority: major Component: debirf
Keywords: Cc:
Sensitive:

Description

servo:/srv/debirf/xkiosk 0$ strace -f  -o strace debirf enter . "apt-get install -f"
debirf> loading profile 'xkiosk'...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up x11-common (1:7.4+4) ...
open: No such file or directory
dpkg: error processing x11-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 x11-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
servo:/srv/debirf/xkiosk 0$

Looking at the strace output we see this:

31441 getpid()                          = 31441
31441 lstat64("/home/jrollins/tmp/file2j0IFX", 0xbf893bd0) = -1 ENOENT (No such file or directory)
31441 open("/srv/debirf/xkiosk/root/home/jrollins/tmp/file2j0IFX", O_RDWR|O_CREAT|O_EXCL, 0600) = -1 ENOENT (No such file or directory)
31441 dup(2)                            = 4
31441 fcntl64(4, F_GETFL)               = 0x2 (flags O_RDWR)
31441 fstat64(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 26), ...}) = 0
31441 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e32000
31441 _llseek(4, 0, 0xbf895b00, SEEK_CUR) = -1 ESPIPE (Illegal seek)
31441 write(4, "open: No such file or directory\n"..., 32) = 32

Why it's trying find "/home/jrollins/tmp/file2j0IFX" I have no idea, but it's obviously a problem of breaking out of the fakechroot again. Is it reading some env variable?

This problem leaves the xkiosk profile broken.

Change History (3)

comment:1 Changed 8 years ago by jrollins

ah, so it is something from the environment:

servo:/srv/debirf/xkiosk 0$ env - debirf enter . "apt-get install -f"
debirf> loading profile 'xkiosk'...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up x11-common (1:7.4+4) ...
servo:/srv/debirf/xkiosk 0$

that's very annoying. is there a good reason to not just run all the modules in a clean environment?

comment:2 Changed 8 years ago by jrollins

I'm sure it must be the TMPDIR environment variable that it's looking at, since mine is TMPDIR=/home/jrollins/tmp, which is what it was looking for in the root.

Should we explicitly unset TMPDIR? Should we run the modules in a clean environment? Is this a bug in fakechroot? I really don't like how all the environment variables are being passed through to the chroot.

comment:3 Changed 8 years ago by dkg

i'm not convinced that we should unset all environment variables (e.g. it's nice to pass http_proxy through to commands inside the debirf setup, but i see why TMPDIR might be a reasonable thing to unset.

What makes you say you think this might indicate a problem with fakechroot? I'd be interested in exploring that further, if there's a problem there we can resolve.

Note: See TracTickets for help on using tickets.