Bug#569784: debootstrap: cannot build a clean Lenny chroot anymore
2010/2/16 Martin-Éric Racine <q-funk@iki.fi>:
> On Tue, Feb 16, 2010 at 1:16 AM, Frans Pop <elendil@planet.nl> wrote:
>> On Monday 15 February 2010, Martin-Éric Racine wrote:>
>>> I suppose this leaves tracking this with strace as a last resort.
>>> However, I cannot remember if strace is actually capable of tracking
>>> shell scripts?
>>
>> Sure it is. Just make sure you use '-f' so that subprocesses also get
>> traced.
>
> Noted. I'll try that.
The result of using strace proved interesting. Having a third SSH
shell logged in as well.
First, the relevant part of 'sudo ps f' that showed on my third login shell:
4557 pts/0 S+ 15:42 strace -f -o deboostrap_strace.txt
debootstrap lenny lenny/ http://ftp.fi.debian.org/debian
4559 pts/0 T+ 0:00 \_ /bin/sh -ex /usr/sbin/debootstrap lenny
lenny/ http://ftp.fi.debian.org/debian
8251 pts/0 S+ 0:40 \_ /bin/sh -ex /usr/sbin/debootstrap
lenny lenny/ http://ftp.fi.debian.org/debian
8252 pts/0 T+ 0:00 \_ /bin/sh -ex /usr/sbin/debootstrap
lenny lenny/ http://ftp.fi.debian.org/debian
8326 pts/0 D+ 0:00 | \_ dpkg --status-fd 8
--force-depends --unpack
var/cache/apt/archives/libacl1_2.2.47-2_i386.deb
var/cache/apt/archives/li
8253 pts/0 S+ 0:00 \_ /bin/sh -ex /usr/sbin/debootstrap
lenny lenny/ http://ftp.fi.debian.org/debian
This seems to indicate that installation got stuck when unpacking libacl.
The end of the strace log shows:
8325 execve("/bin/sleep", ["sleep", "1"], [/* 30 vars */]) = 0
8325 brk(0) = 0x8b4f000
8325 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
8325 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f86000
8325 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
8325 open("/etc/ld.so.cache", O_RDONLY) = 3
8325 fstat64(3, {st_mode=S_IFREG|0644, st_size=52971, ...}) = 0
8325 mmap2(NULL, 52971, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f79000
8325 close(3) = 0
8325 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
8325 open("/lib/libc.so.6", O_RDONLY) = 3
8325 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260e\1\0004\0\0\0t"...,
512) = 512
8325 fstat64(3, {st_mode=S_IFREG|0755, st_size=1294572, ...}) = 0
8252 rt_sigprocmask(SIG_SETMASK, [], <unfinished ...>
8325 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 <unfinished ...>
8252 <... rt_sigprocmask resumed> NULL, 8) = 0
8325 <... mmap2 resumed> ) = 0xb7f78000
8252 rt_sigprocmask(SIG_BLOCK, [CHLD], <unfinished ...>
8325 mmap2(NULL, 1300080, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0 <unfinished ...>
8252 <... rt_sigprocmask resumed> [], 8) = 0
8325 <... mmap2 resumed> ) = 0xb7e3a000
8252 rt_sigprocmask(SIG_SETMASK, [], <unfinished ...>
8325 mmap2(0xb7f72000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x138 <unfinished ...>
8252 <... rt_sigprocmask resumed> NULL, 8) = 0
8325 <... mmap2 resumed> ) = 0xb7f72000
8252 rt_sigprocmask(SIG_BLOCK, [CHLD], <unfinished ...>
8325 mmap2(0xb7f75000, 9840, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0 <unfinished ...>
8252 <... rt_sigprocmask resumed> [], 8) = 0
8325 <... mmap2 resumed> ) = 0xb7f75000
8252 rt_sigaction(SIGINT, {0x807ef30, [], 0}, <unfinished ...>
8325 close(3 <unfinished ...>
8252 <... rt_sigaction resumed> {0x8091d90, [], 0}, 8) = 0
8325 <... close resumed> ) = 0
8252 waitpid(-1, <unfinished ...>
8325 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e39000
8325 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e396b0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
8325 mprotect(0xb7f72000, 4096, PROT_READ) = 0
8325 munmap(0xb7f79000, 52971) = 0
8325 brk(0) = 0x8b4f000
8325 brk(0x8b70000) = 0x8b70000
8325 nanosleep({1, 0},
That nanosleep statement is where it got stuck. I have no clue of what
caused it, though.
Cheers!
Martin-Éric
Reply to: