remote-android / redroid-doc

redroid (Remote-Android) is a multi-arch, GPU enabled, Android in Cloud solution. Track issues / docs here
4.2k stars 299 forks source link

12_64only container running by a serval time will ruin the kernel? #541

Closed OnlyZuri closed 9 months ago

OnlyZuri commented 9 months ago

I'm running a 12_64only-latest redroid at my ARM machine with only 64 bit cpu, And I found something interesting.

It seems nothing wrong when I start the images, And I can connect to the device by adb also scrcpy.

But next day, I can't connect to this devices, and dmesg -T or logcat print iptables restore can't not init filter or something like netd/wificond service failed.

Worse, even I restart the image and restart binder/ashmem module, it keep disconnect from adb. It seems something wrong with the kernel, And if I reboot the system, I can't connect to the cloud server again!

I had found someone occur the same situation, and I don't know Is there anyway to know redroid will change some kernel module about the host machine? 图片

https://hostloc.com/thread-1067531-1-1.html

BTW, ARM cloud machine with two amd gpu using original amdgpu driver, only 64bit cpu.

OnlyZuri commented 9 months ago

It is worked when I run redroid at my local machine with param androidboot.redroid_gpu_mode=host. But my local machine is x86_64 architecture with intel gpu or nvidia gpu (nouveau driver), and I have never seen my ubuntu kernel has broken.

zhouziyang commented 9 months ago

redroid should not damage your kernel. changes in redroid primary be restricted inside namespaces (well, some kernel system configurations might be changed, pid_max etc.). Be caution, should not expose adb port on public cloud; Otherwise, your host might be compromised (for example, mount host disks inside redroid, then corrupt your host files!).

OnlyZuri commented 9 months ago

tmp.yecUhVrcAp.zip

Here are some log files created by running the debug.sh at the offline docker container.

We are using the private cloud server and only running redroid at the same time.

So did these logs helps?

20231219073308 20231219073301

20231219073252
zhouziyang commented 9 months ago

How about software rendering (docker run ... androidboot.redroid_gpu_mode=guest)? Please collect full debug logs (debug.sh <container-name>)

OnlyZuri commented 9 months ago

I try 13_64only + AMD GPU hardware render which works. It won't ruin my kernel or anything else. So I want to know the difference between 12_64only and 1364only? ^^

zhouziyang commented 9 months ago

Never encounter this issue; And redroid container won't damage your host kernel (all changes like iptables are namespaced).

OnlyZuri commented 9 months ago

Thanks for your reply~ Maybe that is my server has something wrong at the time I running redroid.