-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
vm/adb: a more reliable way to delete broken symlinks #4372
base: master
Are you sure you want to change the base?
Conversation
When fuzzing Android, the executor sometimes leaves broken symlinks that point to non-existent directories. The command that adb.go was using to delete the leftover symlinks: `find /data/syzkaller* -type l -exec unlink {} \;` actually choked on such files and led to syzkaller rebooting the device indefinitely. Parse the output of `find /data/syzkaller*` to obtain the list of broken symlinks and pass them to `unlink` one by one. Fixes #2831.
There seems to be a special https://www.gnu.org/software/findutils/manual/html_mono/find.html#index-_002dxtype Did you try something like |
Android's |
I still think we should use executor's remove_dir as part of setup procedure to delete these files. |
We cannot completely prevent all these problems in |
We can do it after booting the machine roughly at the same time the current removal hack runs. Executor setup already runs after booting the machine, and the cleanup looks like a reasonable part of setup. |
@dvyukov right now Are you suggesting that |
"syz-executor setup" is run in the same dir where all fuzzing syz-executor processes are started. The temp dir for syz-executor is ".", so implicitly it knows it. |
When fuzzing Android, the executor sometimes leaves broken symlinks that
point to non-existent directories. The command that adb.go was using to
delete the leftover symlinks:
find /data/syzkaller* -type l -exec unlink {} \;
actually choked on such files and led to syzkaller rebooting the device
indefinitely.
Parse the output of
find /data/syzkaller*
to obtain the list of brokensymlinks and pass them to
unlink
one by one.Fixes #2831.
Before sending a pull request, please review Contribution Guidelines:
https://github.com/google/syzkaller/blob/master/docs/contributing.md