-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to launch desktop environment with proot (Failed to close file descriptor for child process (Invalid argument)) #357
Comments
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
Main problem with Ubuntu
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..
|
Ubuntu with xfce4 log ..
Not ignorable thing is .
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 strace -o xfce4.log launch
|
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 ... neutrinolabs/xrdp#2818 |
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. |
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 I think something is mashup with newer But don't worry if you want to run games with proot + box you can run easy.. |
yes Linux localhost 5.4.210-qgki-997350-abG9980ZCU5EWH6 #1 SMP PREEMPT Fri Aug 11 17:54:54 KST 2023 aarch64 Android |
Yes, I tried a distro without glibc (Alpine Linux) and desktop environment work prefectly |
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 |
Yes I can say we have issues with glibc & libc.. but dev can ask why we don't have any issue with all device? |
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 |
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 So is it solvable? If no then I will close.. Thank you |
Maybe digging into the implementation of |
I tested inside Windows subsysem for linux with 5.4 kernel. result:
What's the expected result on 5.10? |
Docker was having issues with |
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.. |
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 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
The test program might be incorrect |
Yes you are right |
I saw glib calling the spawning function https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html
|
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.
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 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. |
No, xfce doesn't have errors with this patch but still black screen |
Found possibly useful information
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 checked in my device with Android 12 + 5.4 kernel working fine desktop environment.. not working in a13 + 5.4 kernel.. |
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..
|
Solving it might require changing code from glib2 side or android linux kernel side |
Without this patch in Android proot environment linux desktop GUI unable to run.. always reporting error like `Unable to launch desktop environment with proot (Failed to close file descriptor for child process (Invalid argument))` proot-me/proot#357
Thank you! I've backported close_range from 5.10 and now it finally starts. |
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
The text was updated successfully, but these errors were encountered: