linux-test-project / ltp

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)
https://linux-test-project.readthedocs.io/
GNU General Public License v2.0
2.28k stars 999 forks source link

Syscall:Failed to acquire device #1025

Closed Bad916 closed 1 year ago

Bad916 commented 1 year ago

When testing syscall, there is a low probability of “Failed to acquire device”occurring. image

xuyang0410 commented 1 year ago

Which system do you use? Can you attach the "ls /dev/loop" and "ls /dev/block/loop" output?

Bad916 commented 1 year ago

Which system do you use? Can you attach the "ls /dev/loop" and "ls /dev/block/loop" output?

1.We're using Android 13,linux kernel 5.10 2.ls: /dev/loop: /dev/loop-control 3. image

Bad916 commented 1 year ago

image But this is not a matter of stable recurrence,it’s occasionality matter

xuyang0410 commented 1 year ago

From the above log, /dev/block/loop40 exists and I guess it is not a symbolic link. It looks strange. Edward Liaw is planning to change ltp tst_device logic for loop device on android. He may know this failure's reason. @edliaw

pevik commented 1 year ago

There is a patchset trying to fix it: https://patchwork.ozlabs.org/project/ltp/list/?series=347760&state=*

Also, for AOSP it's better to use their fork https://android.googlesource.com/platform/external/ltp/ (noted at https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions#14-supported-libc).

Bad916 commented 1 year ago

There is a patchset trying to fix it: https://patchwork.ozlabs.org/project/ltp/list/?series=347760&state=*

Also, for AOSP it's better to use their fork https://android.googlesource.com/platform/external/ltp/ (noted at https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions#14-supported-libc).

Thanks,and could you tell me when will this patchset be merged into the master?

edliaw commented 1 year ago

I've observed a delay between loop-control returning and the loop device being available on Android. I haven't been able to pinpoint exactly what is causing it yet, but I have a patch in AOSP to add a retry loop for now. https://android.googlesource.com/platform/external/ltp/+/89a1f80ca145145d37bae2372e63b9b8c646b6cb

I'm not sure if I should merge it upstream until I determine whether this is expected behavior or not.

edliaw commented 1 year ago

There is a patchset trying to fix it: https://patchwork.ozlabs.org/project/ltp/list/?series=347760&state=* Also, for AOSP it's better to use their fork https://android.googlesource.com/platform/external/ltp/ (noted at https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions#14-supported-libc).

Thanks,and could you tell me when will this patchset be merged into the master?

Likely within the next week or two.

pevik commented 1 year ago

Merged 42ce90d8c5d80f0e629388204bbd54b108d423f2 (and 3 patches before), closing. If the problem persists, feel free to open, but beware only @edliaw will be able to do anything about it.