CypherpunkArmory / UserLAnd

Main UserLAnd Repository
Other
3.55k stars 392 forks source link

Bug report - Certain filesystem operation causes permanently undeletable directory #891

Open hsaito opened 5 years ago

hsaito commented 5 years ago

Describe the bug

Certainly file system operation seems to cause undeletable directory be created which only remedy is to delete the filesystem altogether.

Note that use of dotnet tool install -g mlnet is example -- this seems to be caused by some NuGet operations as well. (But I do see 100% reproduction case with the command above.)

Steps below describes the example, exact cause of why this is happening is still unknown. I've used Ubuntu, but this is also observed with Debian as well.

Steps to reproduce the behavior:

  1. Start Ubuntu session
  2. Install libicu60 (sudo apt-get update && sudo apt-get install libicu60)
  3. Download .NET Core SDK (arm64) and untar. Link dotnet to /usr/bin (or anywhere with path)
  4. Type in command dotnet tool install -g mlnet
  5. Verify the tool fail with the error "System.IO.IOException: Directory not empty"
  6. At this time, contents in ~/.dotnet is not deletable, causing Directory not empty. (Even with rm -rf ~/.dotnet -- it is possible to move files but deletion is not possible, only way to recover is to delete the environment.

Screenshots

N/A

Device Information

Device: Pixel XL 2 Android Version: 9 UserLAnd Version 2.5.13
Not rooted Not running LineageOS

hsaito commented 5 years ago

Also observed in beta: 2.5.13-beta-102340.

MatthewTighe commented 5 years ago

What command are you using to link dotnet to /usr/bin?

MatthewTighe commented 5 years ago

It looks like there are some proot hidden files created during the installation process that aren't being handled appropriately. Inspecting the directory structure from outside proot shows that there are some hanging files under .dotnet/tools/.store/mlnet/0.3.0/. We create these files to emulate hardlinks, which aren't supported on Android.

This is definitely a bug, and we'll look into it.

MatthewTighe commented 5 years ago

Proot L2S bug

aplumafreak500 commented 5 years ago

I can confirm this one. For me, a botched git clone caused such an undeletable directory that I had to recover from by exporting the filesystem and then re-importing it again.