Ticket #5448: strace-chroot.txt

File strace-chroot.txt, 3.5 KB (added by amain@…, 9 years ago)

strace of failing chroot

Line 
1root@OpenWrt:/etc/config# strace chroot /mnt/sdc1/
2execve("/usr/sbin/chroot", ["chroot", "/mnt/sdc1/"], [/* 8 vars */]) = 0
3old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaad000
4stat("/etc/ld.so.cache", 0x7fe5ab80)    = -1 ENOENT (No such file or directory)
5open("/lib/libcrypt.so.0", O_RDONLY)    = 3
6fstat(3, {st_mode=S_IFREG|0644, st_size=10114, ...}) = 0
7old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
8read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0p\4\0\0004\0\0\0\0"..., 4096) = 4096
9old_mmap(NULL, 147456, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabe000
10old_mmap(0x2aabe000, 10036, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aabe000
11old_mmap(0x2aad0000, 1922, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x2aad0000
12old_mmap(0x2aad1000, 68192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aad1000
13close(3)                                = 0
14munmap(0x2aaae000, 4096)                = 0
15open("/lib/libm.so.0", O_RDONLY)        = 3
16fstat(3, {st_mode=S_IFREG|0644, st_size=102079, ...}) = 0
17old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
18read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\20\25\0\0004\0\0\0\0"..., 4096) = 4096
19old_mmap(NULL, 167936, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aae2000
20old_mmap(0x2aae2000, 101596, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aae2000
21old_mmap(0x2ab0a000, 3775, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x18000) = 0x2ab0a000
22close(3)                                = 0
23munmap(0x2aaae000, 4096)                = 0
24open("/lib/libc.so.0", O_RDONLY)        = 3
25fstat(3, {st_mode=S_IFREG|0644, st_size=405475, ...}) = 0
26old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
27read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\220\252\0\0004\0\0\0\0"..., 4096) = 4096
28old_mmap(NULL, 491520, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab0b000
29old_mmap(0x2ab0b000, 398080, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab0b000
30old_mmap(0x2ab7c000, 8163, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x61000) = 0x2ab7c000
31old_mmap(0x2ab7e000, 19472, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ab7e000
32close(3)                                = 0
33munmap(0x2aaae000, 4096)                = 0
34open("/lib/libc.so.0", O_RDONLY)        = 3
35fstat(3, {st_mode=S_IFREG|0644, st_size=405475, ...}) = 0
36close(3)                                = 0
37open("/lib/libc.so.0", O_RDONLY)        = 3
38fstat(3, {st_mode=S_IFREG|0644, st_size=405475, ...}) = 0
39close(3)                                = 0
40stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=20702, ...}) = 0
41mprotect(0x2ab7c000, 4096, PROT_READ)   = 0
42mprotect(0x2aabc000, 4096, PROT_READ)   = 0
43ioctl(0, TIOCNXCL, {B115200 opost isig icanon echo ...}) = 0
44ioctl(1, TIOCNXCL, {B115200 opost isig icanon echo ...}) = 0
45getuid()                                = 0
46chroot("/mnt/sdc1/")                    = 0
47chdir("/")                              = 0
48execve("/bin/sh", ["/bin/sh", "-i"], [/* 8 vars */]) = 0
49uname({sys="Linux", node="OpenWrt", ...}) = 0
50brk(0)                                  = 0x52b000
51access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
52old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabf000
53access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
54