termux / proot

An chroot-like implementation using ptrace.
https://wiki.termux.com/wiki/PRoot
Other
751 stars 161 forks source link

Fakeroot-sysv won't working #134

Closed ZhymabekRoman closed 3 years ago

ZhymabekRoman commented 3 years ago

I am running fakeroot (sysv version) in Ubuntu 20.04.1 distribution, using proot-distro. But fakeroot doesn't want to work, I enter fakeroot but nothing happens, after pressing Ctrl + c I get this :

root@localhost:~# fakeroot
^Csemop(1): encountered an error: Resource temporarily unavailable
root@localhost:~#

Nothing interesting, so I decided to run it via strace :

root@localhost:~# strace fakeroot
proot warning: ptrace request 'PTRACE_???' not supported yet
execve("/usr/bin/fakeroot", ["fakeroot"], 0xff9684c0 /* 26 vars */) = 0
brk(NULL)                               = 0xf027000
uname({sysname="Linux", nodename="localhost", ...}) = 0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=34234, ...}) = 0
mmap2(NULL, 34234, PROT_READ, MAP_PRIVATE, 3, 0) = 0xea024000
close(3)                                = 0
openat(AT_FDCWD, "/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\331\252\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0775, st_size=972500, ...}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xea022000
mmap2(NULL, 1038540, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xe9f24000
mprotect(0xea00d000, 61440, PROT_NONE)  = 0
mmap2(0xea01c000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe8000) = 0xea01c000
mmap2(0xea020000, 6348, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xea020000
close(3)                                = 0
set_tls(0xea022c20)                     = 0
mprotect(0xea01c000, 8192, PROT_READ)   = 0
mprotect(0xf022000, 4096, PROT_READ)    = 0
mprotect(0x1f029000, 4096, PROT_READ)   = 0
munmap(0xea024000, 34234)               = 0
getuid32()                              = 0
getgid32()                              = 0
getpid()                                = 15147
rt_sigaction(SIGCHLD, {sa_handler=0xf00d65d, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0xe9f4e821}, NULL, 8) = 0
geteuid32()                             = 0
brk(NULL)                               = 0xf027000
brk(0xf048000)                          = 0xf048000
getppid()                               = 15143
stat64("/root", {st_mode=S_IFDIR|0775, st_size=3488, ...}) = 0
stat64(".", {st_mode=S_IFDIR|0775, st_size=3488, ...}) = 0
openat(AT_FDCWD, "/usr/bin/fakeroot", O_RDONLY|O_LARGEFILE) = 3
fcntl64(3, F_DUPFD, 10)                 = 10
close(3)                                = 0
fcntl64(10, F_SETFD, FD_CLOEXEC)        = 0
geteuid32()                             = 0
getegid32()                             = 0
rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0xf00d65d, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0xe9f4e821}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0xe9f4e821}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0xe9f4e821}, NULL, 8) = 0
read(10, "#!/bin/sh\n\n# This script first s"..., 8192) = 3854
pipe([3, 4])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xea0227c8) = 15148
close(4)                                = 0
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15148, si_uid=10307, si_status=4, si_utime=0, si_stime=1} ---
sigreturn({mask=[]})                    = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 4}], 0, NULL) = 15148
pipe([3, 4])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xea0227c8) = 15149
close(4)                                = 0
read(3, " --\n", 128)                   = 4
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15149, si_uid=10307, si_status=0, si_utime=0, si_stime=0} ---
sigreturn({mask=[]})                    = 4
read(3, "", 128)                        = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 15149
pipe([3, 4])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xea0227c8) = 15150
close(4)                                = 0
read(3, "/usr/lib/arm-linux-gnueabihf/lib"..., 128) = 87
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15150, si_uid=10307, si_status=0, si_utime=0, si_stime=0} ---
sigreturn({mask=[]})                    = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 15150
faccessat(AT_FDCWD, "/usr/lib/arm-linux-gnueabihf/libfakeroot/libfakeroot-sysv.so", R_OK) = 0
faccessat(AT_FDCWD, "/usr/lib64/libfakeroot/libfakeroot-sysv.so", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib32/libfakeroot/libfakeroot-sysv.so", R_OK) = -1 ENOENT (No such file or directory)
pipe([3, 4])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xea0227c8) = 15153
close(4)                                = 0
read(3, "1511543156:15155\n", 128)      = 17
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15153, si_uid=10307, si_status=0, si_utime=0, si_stime=0} ---
sigreturn({mask=[]})                    = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 15153
pipe([3, 4])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xea0227c8) = 15156
close(4)                                = 0
read(3, "1511543156\n", 128)            = 11
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15156, si_uid=10307, si_status=0, si_utime=0, si_stime=0} ---
sigreturn({mask=[]})                    = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 15156
pipe([3, 4])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xea0227c8) = 15160
close(4)                                = 0
read(3, "15155\n", 128)                 = 6
read(3, "", 128)                        = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15160, si_uid=10307, si_status=0, si_utime=0, si_stime=0} ---
sigreturn({mask=[]})                    = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 15160
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xea0227c8) = 15163
wait4(-1, 0xffd50e84, 0, NULL)          = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
semop(1): encountered an error: Resource temporarily unavailable
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL, si_value={int=-1166097169, ptr=0xba7ec4ef}} ---
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15163, si_uid=10307, si_status=1, si_utime=0, si_stime=2} ---
sigreturn({mask=[]})                    = -1 EINTR (Interrupted system call)
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 15163
kill(15155, SIGTERM)                    = 0
exit_group(1)                           = ?
+++ exited with 1 +++
root@localhost:~#

What other data can I provide to help you solve the problem ?

michalbednarski commented 3 years ago

32bit arm incompatibility is now fixed and updated version is now available in Termux apt repo

ZhymabekRoman commented 3 years ago

32bit arm incompatibility is now fixed and updated version is now available in Termux apt repo

Thanks! Now everything works fine