Closed Saikatsaha1996 closed 12 months ago
Have you tried getting support from Termux?
We are upstream to them. However, you could also try testing the latest release, https://github.com/proot-me/proot/releases/tag/v5.4.0
Have you tried getting support from Termux?
We are upstream to them. However, you could also try testing the latest release, https://github.com/proot-me/proot/releases/tag/v5.4.0
Seriously i already asked help from termux.. but meybe i am unable to explain them..
In my device debian 11
& ubuntu 18
working perfectly.. but unable to run Ubuntu 22.0 & up , Debian 12 or any newer distro
with debian 11 gnome, lxqt, xfce4 all are working
with Ubuntu nothing works.. all unable to launch
Main problem with Ubuntu
Failed to close file descriptor for child process (Invalid argument)
Even i asked to termux for upstream.. but from termux general team say it already in upstream with patches applied for termux android..
If you just guide me i will compile myself and i will try to build & install..
I successfully compiled without loader-m32
but unable to test..
~/proot $ make -C test
make: Entering directory '/data/data/com.termux/files/home/proot/test'
cp: cannot stat '/data/data/com.termux/files/home/proot/test//rootfs/bin/exec': No such file or directory
make: *** [GNUmakefile:136: /data/data/com.termux/files/home/proot/test//rootfs/bin/exec-suid] Error 1
make: Leaving directory '/data/data/com.termux/files/home/proot/test'
~/proot $
Ubuntu with xfce4 log ..
Wed Jun 7 12:10:09 2023
vncext: VNC extension running!
vncext: Listening for VNC connections on local interface(s), port 5901
vncext: created VNC server for screen 0
3NI3X0 New Xtigervnc server 'localhost:1 (root)' on port 5901 for display :1.
3NI3X0 Use xtigervncviewer -SecurityTypes VncAuth -passwd /root/.vnc/passwd :1 to connect to the VNC server.
[mi] mieq: warning: overriding existing handler (nil) with 0x3000152ca0 for event 2
[mi] mieq: warning: overriding existing handler (nil) with 0x3000152ca0 for event 3
dbus[8173]: Unable to set up transient service directory: XDG_RUNTIME_DIR "/tmp" can be written by others (mode 040770)
/usr/bin/iceauth: creating new authority file /tmp/ICEauthority
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.461: Failed to spawn ssh-agent: Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.470: failed to call dbus-update-activation-environment. Output was (null), error was Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.492: Failed to spawn gpg-agent: Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.548: Unable to launch "xfwm4": Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.564: Unable to launch "xfsettingsd": Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.580: Unable to launch "xfce4-panel": Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.596: Unable to launch "Thunar": Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.611: Unable to launch "xfdesktop": Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.654: Unable to launch "/usr/bin/snap userd --autostart" (specified by autostart/snap-userd-autostart.desktop): Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.679: Unable to launch "xdg-user-dirs-update" (specified by autostart/xdg-user-dirs.desktop): Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.706: Unable to launch "/usr/lib/aarch64-linux-gnu/xfce4/notifyd/xfce4-notifyd" (specified by autostart/xfce4-notifyd.desktop): Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.721: Unable to launch "xfce4-screensaver" (specified by autostart/xfce4-screensaver.desktop): Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.737: Unable to launch "xfsettingsd" (specified by autostart/xfsettingsd.desktop): Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.751: Unable to launch "start-pulseaudio-x11" (specified by autostart/pulseaudio.desktop): Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.768: Unable to launch "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1" (specified by autostart/polkit-gnome-authentication-agent-1.desktop): Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.781: Unable to launch "/usr/libexec/ayatana-indicator-application/ayatana-indicator-application-service" (specified by autostart/ayatana-indicator-application.desktop): Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.796: Unable to launch "xiccd" (specified by autostart/xiccd.desktop): Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.806: Unable to launch "xfce4-power-manager" (specified by autostart/xfce4-power-manager.desktop): Failed to close file descriptor for child process (Invalid argument)
(xfce4-session:8169): xfce4-session-WARNING **: 12:10:11.817: Unable to launch "xfce4-volumed" (specified by autostart/xfce4-volumed.desktop): Failed to close file descriptor for child process (Invalid argument)
Not ignorable thing is .
Unable to launch
"xfsettingsd" (specified by autostart/xfsettingsd.desktop): Failed to close file descriptor for child process (Invalid argument)
But surprisingly Ubuntu 18 also working.. only problem with Ubuntu jammy & updated version..
I found something.. looking like same type error.. + solution..
I attached full strace log
Please ignore last line i used control+ C for exit
execve("/bin/launch", ["launch"], 0x7fc8945380 /* 14 vars */) = 0
brk(NULL) = 0x3000034000
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=40197, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 40197, PROT_READ, MAP_PRIVATE, 3, 0) = 0x788c200000
close(3) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0\267\0\1\0\0\0\260o\2\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=1657752, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x788c1fe000
mmap(NULL, 1826944, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x788c03f000
mmap(0x788c040000, 1761408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x788c040000
munmap(0x788c03f000, 4096) = 0
munmap(0x788c1ef000, 57472) = 0
mprotect(0x788c1cb000, 73728, PROT_NONE) = 0
mmap(0x788c1dd000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18d000) = 0x788c1dd000
mmap(0x788c1e2000, 49280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x788c1e2000
close(3) = 0
set_tid_address(0x788c1fe8f0) = 15828
set_robust_list(0x788c1fe900, 24) = 517746977024
rseq(0x788c1fef40, 0x20, 0, 0xd428bc00) = 517746978624
mprotect(0x788c1dd000, 12288, PROT_READ) = 0
mprotect(0x300002e000, 8192, PROT_READ) = 0
mprotect(0x3f0003e000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x788c200000, 40197) = 0
getuid() = 0
getgid() = 0
getpid() = 15828
rt_sigaction(SIGCHLD, {sa_handler=0x30000127c0, sa_mask=~[RTMIN RT_1], sa_flags=0}, NULL, 8) = 0
geteuid() = 0
getrandom("\x75\xa2\x5f\x83\x31\xb2\x87\x52", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x3000034000
brk(0x3000055000) = 0x3000055000
getppid() = 15825
newfstatat(AT_FDCWD, "/root", {st_mode=S_IFDIR|0700, st_size=3452, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0700, st_size=3452, ...}, 0) = 0
openat(AT_FDCWD, "/bin/launch", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl(10, F_SETFD, FD_CLOEXEC) = 0
geteuid() = 0
getegid() = 0
rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0x30000127c0, sa_mask=~[RTMIN RT_1], sa_flags=0}, 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=0}, 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=0}, NULL, 8) = 0
read(10, "#!/bin/sh\nexport DISPLAY=:0\nsudo"..., 8192) = 63
newfstatat(AT_FDCWD, "/usr/local/sbin/sudo", 0x7fdc45af98, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/local/bin/sudo", 0x7fdc45af98, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/bin/sudo", {st_mode=S_IFREG|S_ISUID|0755, st_size=269320, ...}, 0) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], NULL, 8) = 0
clone(child_stack=0x7fdc45af40, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 15829
rt_sigprocmask(SIG_SETMASK, [], ~[KILL STOP RTMIN RT_1], 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 15829
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15829, si_uid=10316, si_status=0, si_utime=0, si_stime=11 /* 0.11 s */} ---
rt_sigreturn({mask=[]}) = 15829
wait4(-1, 0x7fdc45aee4, WNOHANG, NULL) = -1 ECHILD (No child processes)
newfstatat(AT_FDCWD, "/usr/local/sbin/startxfce4", 0x7fdc45af98, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/local/bin/startxfce4", 0x7fdc45af98, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/bin/startxfce4", {st_mode=S_IFREG|0755, st_size=3304, ...}, 0) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], NULL, 8) = 0
clone(child_stack=0x7fdc45af40, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 15841
rt_sigprocmask(SIG_SETMASK, [], ~[KILL STOP RTMIN RT_1], 8) = 0
wait4(-1, 0x7fdc45aee4, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(-1, 0x7fdc45aee4, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(-1, 0x7fdc45aee4, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(-1, 0x7fdc45aee4, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(-1, 0x7fdc45aee4, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(-1, 0x7fdc45aee4, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(-1, 0x7fdc45aee4, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} ---
rt_sigreturn({mask=[]}) = -1 EINTR (Interrupted system call)
wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGINT}], 0, NULL) = 15841
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=15841, si_uid=10316, si_status=SIGINT, si_utime=21 /* 0.21 s */, si_stime=55 /* 0.55 s */} ---
rt_sigreturn({mask=[]}) = 15841
wait4(-1, 0x7fdc45aee4, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigprocmask(SIG_SETMASK, [], [], 8) = 0
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[INT], sa_flags=SA_RESTART}, {sa_handler=0x30000127c0, sa_mask=~[KILL STOP RTMIN RT_1], sa_flags=0}, 8) = 0
gettid() = 15828
getpid() = 15828
tgkill(15828, 15828, SIGINT) = 0
--- SIGINT {si_signo=SIGINT, si_code=SI_TKILL, si_pid=15828, si_uid=10316} ---
+++ killed by SIGINT +++
Ahhh. You posted issue wrong place. Termux uses a custom proot version: https://github.com/termux/proot
Ahhh. You posted issue wrong place. Termux uses a custom proot version: https://github.com/termux/proot
Already posted in termux also..
I am having the exact same issue with chroot ... https://github.com/neutrinolabs/xrdp/issues/2818
I found something.. looking like same type error.. + solution..
But there is no security-opt for proot/chroot
What device are you using? It doesn't work on my Galaxy S21 with Android 13 but a similar setup works on another Android 13 phone.
What device are you using? It doesn't work on my Galaxy S21 with Android 13 but a similar setup works on another Android 13 phone.
I believe your kernel version 5.4 or 5.10 which is gki kernel.. and I think we have something disabled by default.. for this reason we can't use proot.. newer Android just shttt... And I don't have much debug knowledge so I can't anything..
also it can be actually glibc
issues because in my device oldest Ubuntu & Debian working fine..
I think something is mashup with newer Android (libc library)
and Linux (glibc)
But don't worry if you want to run games with proot + box you can run easy..
I believe your kernel version 5.4 or 5.10 which is gki kernel.. and I think we have something disabled by default.. for this reason we can't use proot.. newer Android just shttt... And I don't have much debug knowledge so I can't anything..
yes
Linux localhost 5.4.210-qgki-997350-abG9980ZCU5EWH6 #1 SMP PREEMPT Fri Aug 11 17:54:54 KST 2023 aarch64 Android
I think something is mashup with newer
Android (libc library)
andLinux (glibc)
Yes, I tried a distro without glibc (Alpine Linux) and desktop environment work prefectly
What device are you using? It doesn't work on my Galaxy S21 with Android 13 but a similar setup works on another Android 13 phone.
I believe your kernel version 5.4 or 5.10 which is gki kernel.. and I think we have something disabled by default.. for this reason we can't use proot.. newer Android just shttt... And I don't have much debug knowledge so I can't anything..
also it can be actually
glibc
issues because in my device oldest Ubuntu & Debian working fine..I think something is mashup with newer
Android (libc library)
andLinux (glibc)
But don't worry if you want to run games with proot + box you can run easy..
I think it is glibc >= 2.34. https://gist.github.com/nathabonfim59/b088db8752673e1e7acace8806390242
We could maybe patch glibc to workaround this. Android might have a similiar securtiy restriction with Docker. https://launchpad.net/~pascallj/+archive/ubuntu/docker.io-clone3
We could maybe patch glibc to workaround this. Android might have a similiar securtiy restriction with Docker. https://launchpad.net/~pascallj/+archive/ubuntu/docker.io-clone3
Yes I can say we have issues with glibc & libc.. but dev can ask why we don't have any issue with all device?
I believe your kernel version 5.4 or 5.10 which is gki kernel.. and I think we have something disabled by default.. for this reason we can't use proot.. newer Android just shttt... And I don't have much debug knowledge so I can't anything..
yes
Linux localhost 5.4.210-qgki-997350-abG9980ZCU5EWH6 #1 SMP PREEMPT Fri Aug 11 17:54:54 KST 2023 aarch64 Android
Just check.. my have 2 device with 5.4 gki kernel & one device with 5.10 gki device.. and proot not working with only 5.4 gki.. working fine on 5.10 gki
So in 5.4 kernel have issues.. which not working with newer glibc.. ..
I believe your kernel version 5.4 or 5.10 which is gki kernel.. and I think we have something disabled by default.. for this reason we can't use proot.. newer Android just shttt... And I don't have much debug knowledge so I can't anything..
yes Linux localhost 5.4.210-qgki-997350-abG9980ZCU5EWH6 #1 SMP PREEMPT Fri Aug 11 17:54:54 KST 2023 aarch64 Android
Just check.. my have 2 device with 5.4 gki kernel & one device with 5.10 gki device.. and proot not working with only 5.4 gki.. working fine on 5.10 gki
So in 5.4 kernel have issues.. which not working with newer glibc.. ..
I also have one device with 5.10 (non-gki maybe) kernel without this issue. The device having this issue of me is exactly 5.4 gki!
I believe your kernel version 5.4 or 5.10 which is gki kernel.. and I think we have something disabled by default.. for this reason we can't use proot.. newer Android just shttt... And I don't have much debug knowledge so I can't anything..
yes Linux localhost 5.4.210-qgki-997350-abG9980ZCU5EWH6 #1 SMP PREEMPT Fri Aug 11 17:54:54 KST 2023 aarch64 Android
Just check.. my have 2 device with 5.4 gki kernel & one device with 5.10 gki device.. and proot not working with only 5.4 gki.. working fine on 5.10 gki So in 5.4 kernel have issues.. which not working with newer glibc.. ..
I also have one device with 5.10 (non-gki maybe) kernel without this issue. The device having this issue of me is exactly 5.4 gki!
No 5.10 kernel also gki .. but in 5.10 don't have this issue..
I am sure Only this exist on all devices with 5.4 kernel
Have you tried getting support from Termux?
We are upstream to them. However, you could also try testing the latest release, https://github.com/proot-me/proot/releases/tag/v5.4.0
No support from termux.. I just close issue from proot-distro because they even not reply anything, mey be they don't care about it because they not used device with 5.4 kernel.. and I am sure everyone have same issue with 5.4 kernel version..
Is it solvable? Or i should close? I know it is critical problem.. I don't have much debug knowledge.. I also tested with root access + chroot I have same issue.. even I checked kernel configuration not find any unusual kernel configuration.. most probably inside kernel file-system driver related issue or kernel security
..
So is it solvable? If no then I will close..
Thank you Regards Saikat Saha
I don't have much debug knowledge..
Maybe digging into the implementation of close()
in glibc could help
I test inside termux proot & received result
Parent process: Waiting for the child to complete. Child process: File descriptor opened successfully. Child process: File descriptor closed successfully. Child process: Failed to close file descriptor (invalid argument). Parent process: Child process completed.
I tested inside Windows subsysem for linux with 5.4 kernel. result:
./a.out
Parent process: Waiting for the child to complete.
Child process: File descriptor opened successfully.
Child process: File descriptor closed successfully.
Child process: Failed to close file descriptor (invalid argument).
Parent process: Child process completed.
What's the expected result on 5.10?
Docker was having issues with clone3
system call causing Failed to close file descriptor (invalid argument)
. I looked up glibc package source code of my distro and it already disabled clone3. Maybe 5.4 gki kernel has a different failure syscall.
Docker was having issues with
clone3
system call causingFailed to close file descriptor (invalid argument)
. I looked up glibc package source code of my distro and it already disabled clone3. Maybe 5.4 gki kernel has a different failure syscall.
Yes .. 5.10 should work fine.. I have one device with 5.10 .. and others 2 device with 5.4 .. I only have issues with 5.4 device..
I test inside termux proot & received result
Parent process: Waiting for the child to complete. Child process: File descriptor opened successfully. Child process: File descriptor closed successfully. Child process: Failed to close file descriptor (invalid argument). Parent process: Child process completed.
I tested inside Windows subsysem for linux with 5.4 kernel. result:
./a.out Parent process: Waiting for the child to complete. Child process: File descriptor opened successfully. Child process: File descriptor closed successfully. Child process: Failed to close file descriptor (invalid argument). Parent process: Child process completed.
What's the expected result on 5.10?
This is not actually currect result.. because windows subsystem is different architecture and everything is different.. like windows subsystem used hypervisor.. but we are using proot..
GKI kernel mean Generic Kernel Image
.. it is only for newer Android device.. so windows subsystem don't have this issue..
https://source.android.com/docs/core/architecture/kernel/generic-kernel-image
Even you can check in your 5.4 device.. you can run old Debian 11, old Ubuntu 18.. only you can't run newer linux in your 5.4 device..
I got the same result on the 5.10 phone
./a.out
Parent process: Waiting for the child to complete.
Child process: File descriptor opened successfully.
Child process: File descriptor closed successfully.
Child process: Failed to close file descriptor (invalid argument).
Parent process: Child process completed.
user@localhost ~> uname -a
Linux localhost 5.10.136-android12-9-00021-g821df8f5bd36-ab9585204 #1 SMP PREEMPT Thu Feb 9 13:08:46 UTC 2023 aarch64 GNU/Linux
The test program might be incorrect
I got the same result on the 5.10 phone
./a.out Parent process: Waiting for the child to complete. Child process: File descriptor opened successfully. Child process: File descriptor closed successfully. Child process: Failed to close file descriptor (invalid argument). Parent process: Child process completed. user@localhost ~> uname -a Linux localhost 5.10.136-android12-9-00021-g821df8f5bd36-ab9585204 #1 SMP PREEMPT Thu Feb 9 13:08:46 UTC 2023 aarch64 GNU/Linux
The test program might be incorrect
Yes you are right
I saw glib calling the spawning function g_spawn_async
and found a related change in glibc 2.34. I am trying to revert this change to see if anything changes.
https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html
* The function _Fork has been added as an async-signal-safe fork replacement
since Austin Group issue 62 droped the async-signal-safe requirement for
fork (and it will be included in the future POSIX standard). The new _Fork
function does not run any atfork function neither resets any internal state
or lock (such as the malloc one), and only sets up a minimal state required
to call async-signal-safe functions (such as raise or execve). This function
is currently a GNU extension.
[4737] libc: fork is not async-signal-safe
Yes you are right
We might construct a test program invoking glib's api which is used by lxde and xfce.
I built glibc 2.35 on archlinux arm and following are failed tests on 5.4 kernel.
XFAIL: conform/UNIX98/ndbm.h/conform
XFAIL: conform/UNIX98/varargs.h/conform
XFAIL: conform/UNIX98/varargs.h/linknamespace
XFAIL: conform/XOPEN2K/ndbm.h/conform
XFAIL: conform/XOPEN2K8/ndbm.h/conform
XFAIL: conform/XPG4/varargs.h/conform
XFAIL: conform/XPG4/varargs.h/linknamespace
XFAIL: conform/XPG42/ndbm.h/conform
XFAIL: conform/XPG42/varargs.h/conform
XFAIL: conform/XPG42/varargs.h/linknamespace
FAIL: dlfcn/tst-dlinfo-phdr
FAIL: elf/check-localplt
FAIL: io/tst-close_range
XFAIL: localedata/tst-langinfo-newlocale-static
FAIL: misc/tst-sysvmsg-linux
FAIL: misc/tst-sysvsem-linux
FAIL: misc/tst-sysvshm-linux
FAIL: nptl/tst-mutex10
FAIL: nptl/tst-thread-affinity-pthread
FAIL: nptl/tst-thread-affinity-pthread2
FAIL: nptl/tst-thread-affinity-sched
XFAIL: posix/annexc
FAIL: resolv/tst-resolv-basic
I will compare what fail on 5.10 kernel. glibc's test program might be a prefect test program.
I built glibc 2.35 on archlinux arm and following are failed tests on 5.4 kernel.
XFAIL: conform/UNIX98/ndbm.h/conform XFAIL: conform/UNIX98/varargs.h/conform XFAIL: conform/UNIX98/varargs.h/linknamespace XFAIL: conform/XOPEN2K/ndbm.h/conform XFAIL: conform/XOPEN2K8/ndbm.h/conform XFAIL: conform/XPG4/varargs.h/conform XFAIL: conform/XPG4/varargs.h/linknamespace XFAIL: conform/XPG42/ndbm.h/conform XFAIL: conform/XPG42/varargs.h/conform XFAIL: conform/XPG42/varargs.h/linknamespace FAIL: dlfcn/tst-dlinfo-phdr FAIL: elf/check-localplt FAIL: io/tst-close_range XFAIL: localedata/tst-langinfo-newlocale-static FAIL: misc/tst-sysvmsg-linux FAIL: misc/tst-sysvsem-linux FAIL: misc/tst-sysvshm-linux FAIL: nptl/tst-mutex10 FAIL: nptl/tst-thread-affinity-pthread FAIL: nptl/tst-thread-affinity-pthread2 FAIL: nptl/tst-thread-affinity-sched XFAIL: posix/annexc FAIL: resolv/tst-resolv-basic
I will compare what fail on 5.10 kernel. glibc's test program might be a prefect test program.
I think we have issues with kernel features.. because same glibc working on 5.10 .. but unable to work on 5.4.. and I saw all people have exactly same issue with 5.4.. if you have upstream kernel source.. then try to use upstream one.. you can rebase if you have option for 5.10.. but yes 🫠 system call 👎
I saw glib calling the spawning function g_spawn_async and found a related change in glibc 2.34. I am trying to revert this change to see if anything changes.
I concluded from my test that it is not about fork() and clone3 on android 5.4 which was the case of docker.
A dirty workaround is patching glib to ignore file descriptor close errors.
A dirty workaround is patching glib to ignore file descriptor close errors.
No, xfce doesn't have errors with this patch but still black screen
Found possibly useful information
Right, so it looks like the call to close_range fails. This is a 5.4 kernel which doesn;t have close_range - so this is understandable.
For a quick fix, I set have_close_range to false - see the patch attached. It seemed to work well.
https://www.spinics.net/lists/systemd-devel/msg07038.html
close_range is used in glib here: https://github.com/GNOME/glib/blob/ca57acd71b6bf2bb634c5c72a128035cab307103/glib/gspawn.c#L1592
Yes, this issue is about close_range. I disabled close_range on glib and my xfce started successfully.
Patch and package for archlinux arm: https://github.com/mio-19/aur-patches-aarch64/blob/3049fa6c9ecfe008aa58cbdf5dce69389088b69b/_kernel5_4/glib2-no-close-range/no.patch
I think we might close this issue now and reopen it on glib and/or glibc
I think we might close this issue now and reopen it on glib and/or glibc
I checked in my device with Android 12 + 5.4 kernel working fine desktop environment.. not working in a13 + 5.4 kernel..
Have you tried getting support from Termux?
We are upstream to them. However, you could also try testing the latest release, https://github.com/proot-me/proot/releases/tag/v5.4.0
Anyway to solve? Tried to run desktop environment from long time but unable to run.. now tried to run kds plasma but still black screen with this output..
QObject: Cannot create children for a parent that is in a different thread.
(Parent is SplashApp(0x7fcc3e4388), parent's thread is QThread(0x300003ca40), current thread is QThread(0x30004487e0)
QObject::installEventFilter(): Cannot filter events for objects in a different thread
Have you tried getting support from Termux? We are upstream to them. However, you could also try testing the latest release, https://github.com/proot-me/proot/releases/tag/v5.4.0
Anyway to solve? Tried to run desktop environment from long time but unable to run.. now tried to run kds plasma but still black screen with this output..
QObject: Cannot create children for a parent that is in a different thread. (Parent is SplashApp(0x7fcc3e4388), parent's thread is QThread(0x300003ca40), current thread is QThread(0x30004487e0) QObject::installEventFilter(): Cannot filter events for objects in a different thread
Solving it might require changing code from glib2 side or android linux kernel side
Yes, this issue is about close_range. I disabled close_range on glib and my xfce started successfully.
Thank you! I've backported close_range from 5.10 and now it finally starts. I was almost desparate and thought I was doing something wrong and then, fortunately, I found this issue.
Actual Behavior
Every time i am trying to start desktop environment with proot but i am unable to launch because continue getting error with every session. All error looks like unable to launch..
Steps to Reproduce the Problem
I installed Ubuntu jammy in my android device then installed Ubuntu jammy+ desktop environment xfce4, lxqt, gnome all is same..
Specifications
Command Output
Help wanted please Thank you Regards Saikat