[lxc-devel] Segfault while running lxc-start whic

linux developer linuxdeveloper7 at gmail.com
Fri Jan 24 09:34:51 UTC 2014


Hello
I downloaded latest lxc (lxc version: 1.0.0.beta2) for android from
http://qa.linuxcontainers.org/master/current/android-armel/ and copied
files at /data of Nexus 7 Device ( ASOP 4.3 and Kernel 3.1.10). Also
added ubuntu rootfs under /data/lxc/containers

When I started the container (./run-lxc lxc-start -n ubuntu) ,
segfault happened( as shown below).
I am not sure what went wrong. It will be great if you can provide some inputs.


$strace ./run-lxc lxc-start -n ubuntu
execve("./run-lxc", ["./run-lxc", "lxc-start", "-n", "ubuntu"], [/* 23
vars */]) = 0
mprotect(0x40186000, 4096, PROT_READ)   = 0
open("/dev/null", O_RDWR)               = 3
fcntl64(0, F_GETFL)                     = 0x20002 (flags O_RDWR)
fcntl64(1, F_GETFL)                     = 0x20002 (flags O_RDWR)
fcntl64(2, F_GETFL)                     = 0x20002 (flags O_RDWR)
close(3)                                = 0
gettid()                                = 2175
set_tls(0x40187efc, 0x40187efc, 0, 0xffffffbc, 0x40187ffc) = 0
sigaction(SIGILL, {0x40177a41, [], SA_RESTART|SA_SIGINFO}, NULL, 0x41e1d038) = 0
sigaction(SIGABRT, {0x40177a41, [], SA_RESTART|SA_SIGINFO}, NULL,
0x41e1d038) = 0
sigaction(SIGBUS, {0x40177a41, [], SA_RESTART|SA_SIGINFO}, NULL, 0x41e1d038) = 0
sigaction(SIGFPE, {0x40177a41, [], SA_RESTART|SA_SIGINFO}, NULL, 0x41e1d038) = 0
sigaction(SIGSEGV, {0x40177a41, [], SA_RESTART|SA_SIGINFO}, NULL,
0x41e1d038) = 0
sigaction(SIGSTKFLT, {0x40177a41, [], SA_RESTART|SA_SIGINFO}, NULL,
0x41e1d038) = 0
sigaction(SIGPIPE, {0x40177a41, [], SA_RESTART|SA_SIGINFO}, NULL,
0x41e1d038) = 0
mmap2(NULL, 4092, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0,
0) = 0x400ab000
open("/vendor/lib/libc.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/system/lib/libc.so", O_RDONLY)   = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\0\0\0\0004\0\0\0"...,
52) = 52
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40149000
mmap2(NULL, 360448, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4023e000
mmap2(0x4023e000, 282284, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED,
3, 0) = 0x4023e000
mmap2(0x40284000, 12952, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x45) = 0x40284000
mmap2(0x40288000, 57344, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40288000
close(3)                                = 0
munmap(0x40149000, 4096)                = 0
mprotect(0x40284000, 8192, PROT_READ)   = 0
mprotect(0x400a4000, 4096, PROT_READ)   = 0
open("/dev/__properties__", O_RDONLY|O_NOFOLLOW) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=49152, ...}) = 0
mmap2(NULL, 49152, PROT_READ, MAP_SHARED, 3, 0) = 0x400ac000
close(3)                                = 0
futex(0x402873b4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
mprotect(0x400ab000, 4092, PROT_READ|PROT_WRITE) = 0
mprotect(0x400ab000, 4092, PROT_READ|PROT_WRITE) = 0
mprotect(0x400ab000, 4092, PROT_READ|PROT_WRITE) = 0
mprotect(0x400ab000, 4092, PROT_READ|PROT_WRITE) = 0
mprotect(0x400ab000, 4092, PROT_READ|PROT_WRITE) = 0
clock_gettime(CLOCK_MONOTONIC, {1368, 48694362}) = 0
mprotect(0x400ab000, 4092, PROT_READ|PROT_WRITE) = 0
mprotect(0x400ab000, 4092, PROT_READ)   = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x400d2000
mprotect(0x400d2000, 4096, PROT_READ)   = 0
getpid()                                = 2175
geteuid32()                             = 0
getpgid(0)                              = 2174
getppid()                               = 2174
gettimeofday({1390555791, 867632}, NULL) = 0
brk(0)                                  = 0x412b2000
brk(0x412b2000)                         = 0x412b2000
brk(0x412b3000)                         = 0x412b3000
brk(0x412b4000)                         = 0x412b4000
sigaction(SIGINT, {SIG_IGN, , {SIG_DFL, , 0) = 0
sigaction(SIGINT, {0x40090041, [], 0}, NULL, 0x41e1d038) = 0
sigaction(SIGQUIT, {SIG_IGN, , {SIG_DFL, , 0) = 0
sigaction(SIGQUIT, {0x40090041, [], 0}, NULL, 0x41e1d038) = 0
sigaction(SIGTERM, {SIG_IGN, , {SIG_DFL, , 0) = 0
sigaction(SIGTERM, {0x40090041, [], 0}, NULL, 0x41e1d038) = 0
sigaction(SIGHUP, {SIG_IGN, , {SIG_DFL, , 0) = 0
sigaction(SIGHUP, {0x40090041, [], 0}, NULL, 0x41e1d038) = 0
brk(0x412b6000)                         = 0x412b6000
open("/dev/tty", O_RDWR)                = 3
fcntl64(3, F_DUPFD, 10)                 = 11
fcntl64(11, F_SETFD, FD_CLOEXEC)        = 0
close(3)                                = 0
ioctl(11, TIOCGWINSZ, {ws_row=0, ws_col=0, ws_xpixel=0, ws_ypixel=0}) = 0
brk(0x412b7000)                         = 0x412b7000
gettimeofday({1390555791, 878263}, NULL) = 0
gettimeofday({1390555791, 878558}, NULL) = 0
gettimeofday({1390555791, 879237}, NULL) = 0
brk(0x412b8000)                         = 0x412b8000
getcwd("/data/lxc", 4096)               = 10
getuid32()                              = 0
getgid32()                              = 0
getegid32()                             = 0
gettimeofday({1390555791, 882219}, NULL) = 0
open("./run-lxc", O_RDONLY)             = 3
fcntl64(3, F_DUPFD, 10)                 = 12
close(3)                                = 0
fcntl64(12, F_SETFD, FD_CLOEXEC)        = 0
fstat64(0, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
sigprocmask(SIG_SETMASK, [], NULL)      = 0
sigaction(SIGCHLD, {SIG_IGN, , {SIG_DFL, , 0) = 0
sigaction(SIGCHLD, {0x40090041, [], 0}, NULL, 0x41e1d038) = 0
sigaction(SIGWINCH, {SIG_IGN, , {SIG_DFL, , 0) = 0
sigaction(SIGWINCH, {0x40090041, [], 0}, NULL, 0x41e1d038) = 0
sigaction(SIGALRM, {SIG_IGN, , {SIG_DFL, , 0) = 0
sigaction(SIGALRM, {0x40090041, [], 0}, NULL, 0x41e1d038) = 0
brk(0x412b9000)                         = 0x412b9000
read(12, "#!/system/bin/sh\nexport PATH=$PA"..., 512) = 305
brk(0x412ba000)                         = 0x412ba000
chdir("/data/lxc/lxc")                  = 0
stat64("/sbin/sh", 0xbeffd620)          = -1 ENOENT (No such file or directory)
stat64("/vendor/bin/sh", 0xbeffd620)    = -1 ENOENT (No such file or directory)
stat64("/system/sbin/sh", 0xbeffd620)   = -1 ENOENT (No such file or directory)
stat64("/system/bin/sh", {st_mode=S_IFREG|0755, st_size=157488, ...}) = 0
access("/system/bin/sh", X_OK)          = 0
sigprocmask(SIG_BLOCK, [CHLD], [])      = 0
fork()                                  = 2176
sigsuspend([]Segmentation fault
link failed File exists
)                          = ? ERESTARTNOHAND (To be restarted)
--- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2176, si_status=255,
si_utime=0, si_stime=2} (Child exited) ---
getrusage(RUSAGE_CHILDREN, {ru_utime={0, 0}, ru_stime={0, 0}, ...}) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 255}], WNOHANG|WSTOPPED,
NULL) = 2176
getrusage(RUSAGE_CHILDREN, {ru_utime={0, 0}, ru_stime={0, 10000}, ...}) = 0
wait4(-1, 0xbeffd2ac, WNOHANG|WSTOPPED, NULL) = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [])
sigprocmask(SIG_SETMASK, [], NULL)      = 0
read(12, "", 512)                       = 0
close(12)                               = 0
sigprocmask(SIG_BLOCK, [CHLD], [])      = 0
sigprocmask(SIG_SETMASK, [], NULL)      = 0
fcntl64(3, F_GETFD)                     = -1 EBADF (Bad file number)
fcntl64(4, F_GETFD)                     = -1 EBADF (Bad file number)
fcntl64(5, F_GETFD)                     = -1 EBADF (Bad file number)
fcntl64(6, F_GETFD)                     = -1 EBADF (Bad file number)
fcntl64(7, F_GETFD)                     = -1 EBADF (Bad file number)
fcntl64(8, F_GETFD)                     = -1 EBADF (Bad file number)
fcntl64(9, F_GETFD)                     = 0
fcntl64(10, F_GETFD)                    = 0
fcntl64(11, F_GETFD)                    = 0x1 (flags FD_CLOEXEC)
close(11)                               = 0
fcntl64(12, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(13, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(14, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(15, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(16, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(17, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(18, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(19, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(20, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(21, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(22, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(23, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(24, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(25, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(26, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(27, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(28, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(29, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(30, F_GETFD)                    = -1 EBADF (Bad file number)
fcntl64(31, F_GETFD)                    = -1 EBADF (Bad file number)
close(2)                                = 0
close(1)                                = 0
close(0)                                = 0
mprotect(0x400d2000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0x400d2000, 4096, PROT_READ)   = 0
close(0)                                = -1 EBADF (Bad file number)
close(1)                                = -1 EBADF (Bad file number)
close(2)                                = -1 EBADF (Bad file number)
futex(0x40288be8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
munmap(0x400d2000, 4096)                = 0
exit_group(255)                         = ?




FYI,
$cd /data/lxc
$ ls
containers
lxc
root
run-lxc

$ cd containers
$ls
ubuntu

$busybox uname -a
Linux localhost 3.1.10-gfd8d03e-dirty #9 SMP PREEMPT Thu Jan 23
19:32:01 IST 2014 armv7l GNU/Linux


More information about the lxc-devel mailing list