On Sun, 27 Nov 2011 19:29:44 -0500, Daniel Kahn Gillmor 
<[email protected]> wrote:
> trying to do a minimal operation within the chroot for debugging, i get:
> 
> 0 consoleuser@stylus:~/fakechroot$ fakechroot /usr/sbin/chroot $(pwd)/stable 
> /bin/true
> Segmentation fault
> 139 consoleuser@stylus:~/fakechroot$ 

This appears to be related to an interaction between ld-linux.so.2 from
sid's libc6 (2.13-21) and libc.so.6 from squeeze's libc6 (2.11.2-10).
Here we see that libc works fine against the old ld-linux, but segfaults
with the new ld-linux:

0 root@stylus:/tmp# find x \! -type d -ls 
862137   16 -rwxr-xr-x   1 root     root        16060 Nov 27 20:32 x/bin/true
862136 1296 -rwxr-xr-x   1 root     root      1319176 Nov 27 20:31 
x/lib/libc-2.11.2.so
862142 1292 -rwxr-xr-x   1 root     root      1314952 Nov 27 21:40 
x/lib/libc-2.13.so
862140  116 -rwxr-xr-x   1 root     root       113964 Nov 27 21:10 
x/lib/ld-2.11.2.so
862141  120 -rwxr-xr-x   1 root     root       117960 Nov 27 21:10 
x/lib/ld-2.13.so
862138    0 lrwxrwxrwx   1 root     root           14 Nov 27 20:32 
x/lib/libc.so.6 -> libc-2.11.2.so
862139    0 lrwxrwxrwx   1 root     root           12 Nov 27 21:14 
x/lib/ld-linux.so.2 -> ld-2.11.2.so
0 root@stylus:/tmp# chroot x /bin/true
0 root@stylus:/tmp# ln -sf ld-2.13.so x/lib/ld-linux.so.2
0 root@stylus:/tmp# chroot x /bin/true
Segmentation fault
139 root@stylus:/tmp# 

Since fakechroot can't intercept the loading of ld-linux.so (the
LD_PRELOAD hack is actually implemented by ld-linux.so itself), the
resulting process of a fakechroot invocation from sid to squeeze is
using sid's ld-linux to load squeeze's libc6, which causes the
segmentation fault seen above.

Should we be able to expect to run squeeze's libc against sid's
ld-linux.so?  I don't know.

I do note that we can use squeeze's ld-linux against sid's libc, though:

0 root@stylus:/tmp# ls -l x/lib
total 2824
-rwxr-xr-x 1 root root  113964 Nov 27 21:10 ld-2.11.2.so
-rwxr-xr-x 1 root root  117960 Nov 27 21:10 ld-2.13.so
lrwxrwxrwx 1 root root      12 Nov 27 21:41 ld-linux.so.2 -> ld-2.11.2.so
-rwxr-xr-x 1 root root 1319176 Nov 27 20:31 libc-2.11.2.so
-rwxr-xr-x 1 root root 1314952 Nov 27 21:40 libc-2.13.so
lrwxrwxrwx 1 root root      12 Nov 27 21:40 libc.so.6 -> libc-2.13.so
0 root@stylus:/tmp# chroot x /bin/true
0 root@stylus:/tmp# 

I'm sorry i don't know how to solve this problem, but i'd be happy to
see it re-assigned to a different package (eglibc?) if you think that
would help move it toward a resolution.

If you want more debugging info, just let me know.

Regards,

      --dkg

Attachment: pgpNyWDo0f3Te.pgp
Description: PGP signature

Reply via email to