an iommufd selftest issue with 6.4-rc1
Hi Jason,
I compiled a 6.4-rc1 kernel and ran the iommufd selftest. The test hung, and I had to break it with Ctrl+C. Is this a known issue, or there is something wrong with my test setup?
Best regards,
baolu
PS: the test log:
TAP version 13
1..1
# selftests: iommu: iommufd
# TAP version 13
# 1..129
# # Starting 129 tests from 11 test cases.
# # RUN iommufd.simple_close ...
# # OK iommufd.simple_close
# ok 1 iommufd.simple_close # # RUN iommufd.cmd_fail ... # # OK iommufd.cmd_fail # ok 2 iommufd.cmd_fail # # RUN iommufd.cmd_length ... # # OK iommufd.cmd_length # ok 3 iommufd.cmd_length # # RUN iommufd.cmd_ex_fail ... # # OK iommufd.cmd_ex_fail # ok 4 iommufd.cmd_ex_fail # # RUN iommufd.global_options ... # # OK iommufd.global_options # ok 5 iommufd.global_options # # RUN iommufd.simple_ioctls ... # # OK iommufd.simple_ioctls # ok 6 iommufd.simple_ioctls # # RUN iommufd.unmap_cmd ... # # OK iommufd.unmap_cmd # ok 7 iommufd.unmap_cmd # # RUN iommufd.map_cmd ... # # OK iommufd.map_cmd # ok 8 iommufd.map_cmd # # RUN iommufd.info_cmd ... # # OK iommufd.info_cmd # ok 9 iommufd.info_cmd # # RUN iommufd.set_iommu_cmd ... # # OK iommufd.set_iommu_cmd # ok 10 iommufd.set_iommu_cmd # # RUN iommufd.vfio_ioas ... # # OK iommufd.vfio_ioas # ok 11 iommufd.vfio_ioas # # RUN iommufd_ioas.no_domain.ioas_auto_destroy ... # # OK iommufd_ioas.no_domain.ioas_auto_destroy # ok 12 iommufd_ioas.no_domain.ioas_auto_destroy # # RUN iommufd_ioas.no_domain.ioas_destroy ... # # OK iommufd_ioas.no_domain.ioas_destroy # ok 13 iommufd_ioas.no_domain.ioas_destroy # # RUN iommufd_ioas.no_domain.hwpt_attach ... # # hwpt_attach: Test terminated unexpectedly by signal 9 # # FAIL iommufd_ioas.no_domain.hwpt_attach # not ok 14 iommufd_ioas.no_domain.hwpt_attach # # RUN iommufd_ioas.no_domain.ioas_area_destroy ... # # OK iommufd_ioas.no_domain.ioas_area_destroy # ok 15 iommufd_ioas.no_domain.ioas_area_destroy # # RUN iommufd_ioas.no_domain.ioas_area_auto_destroy ... # # OK iommufd_ioas.no_domain.ioas_area_auto_destroy # ok 16 iommufd_ioas.no_domain.ioas_area_auto_destroy # # RUN iommufd_ioas.no_domain.area ... # # OK iommufd_ioas.no_domain.area # ok 17 iommufd_ioas.no_domain.area # # RUN iommufd_ioas.no_domain.unmap_fully_contained_areas ... # # OK iommufd_ioas.no_domain.unmap_fully_contained_areas # ok 18 iommufd_ioas.no_domain.unmap_fully_contained_areas # # RUN iommufd_ioas.no_domain.area_auto_iova ... # # OK iommufd_ioas.no_domain.area_auto_iova # ok 19 iommufd_ioas.no_domain.area_auto_iova # # RUN iommufd_ioas.no_domain.area_allowed ... # # OK iommufd_ioas.no_domain.area_allowed # ok 20 iommufd_ioas.no_domain.area_allowed # # RUN iommufd_ioas.no_domain.copy_area ... # # OK iommufd_ioas.no_domain.copy_area # ok 21 iommufd_ioas.no_domain.copy_area # # RUN iommufd_ioas.no_domain.iova_ranges ... # # OK iommufd_ioas.no_domain.iova_ranges # ok 22 iommufd_ioas.no_domain.iova_ranges # # RUN iommufd_ioas.no_domain.access_domain_destory ... # # iommufd.c:611:access_domain_destory:Expected MAP_FAILED (18446744073709551615) != buf (18446744073709551615)
Quoted 5 lines · Baolu Lu
Hi Jason,
I compiled a 6.4-rc1 kernel and ran the iommufd selftest. The test hung, and I had to break it with Ctrl+C. Is this a known issue, or there is something wrong with my test setup?
There is an annoying bug in the test harness and it infinite loops for some failure cases. That explains the hang
Quoted 5 lines
# # RUN iommufd_ioas.no_domain.ioas_destroy ...
# # OK iommufd_ioas.no_domain.ioas_destroy# ok 13 iommufd_ioas.no_domain.ioas_destroy # # RUN iommufd_ioas.no_domain.hwpt_attach ... # # hwpt_attach: Test terminated unexpectedly by signal 9
That seems bad
Quoted 21 lines
# # FAIL iommufd_ioas.no_domain.hwpt_attach
# not ok 14 iommufd_ioas.no_domain.hwpt_attach # # RUN iommufd_ioas.no_domain.ioas_area_destroy ... # # OK iommufd_ioas.no_domain.ioas_area_destroy # ok 15 iommufd_ioas.no_domain.ioas_area_destroy # # RUN iommufd_ioas.no_domain.ioas_area_auto_destroy ... # # OK iommufd_ioas.no_domain.ioas_area_auto_destroy # ok 16 iommufd_ioas.no_domain.ioas_area_auto_destroy # # RUN iommufd_ioas.no_domain.area ... # # OK iommufd_ioas.no_domain.area # ok 17 iommufd_ioas.no_domain.area # # RUN iommufd_ioas.no_domain.unmap_fully_contained_areas ... # # OK iommufd_ioas.no_domain.unmap_fully_contained_areas # ok 18 iommufd_ioas.no_domain.unmap_fully_contained_areas # # RUN iommufd_ioas.no_domain.area_auto_iova ... # # OK iommufd_ioas.no_domain.area_auto_iova # ok 19 iommufd_ioas.no_domain.area_auto_iova # # RUN iommufd_ioas.no_domain.area_allowed ... # # OK iommufd_ioas.no_domain.area_allowed # ok 20 iommufd_ioas.no_domain.area_allowed # # RUN iommufd_ioas.no_domain.copy_area ...
Quoted 8 lines
# # OK iommufd_ioas.no_domain.copy_area # ok 21 iommufd_ioas.no_domain.copy_area # # RUN iommufd_ioas.no_domain.iova_ranges ... # # OK iommufd_ioas.no_domain.iova_ranges # ok 22 iommufd_ioas.no_domain.iova_ranges # # RUN iommufd_ioas.no_domain.access_domain_destory ... # # iommufd.c:611:access_domain_destory:Expected MAP_FAILED (18446744073709551615) != buf (18446744073709551615)
And you had a failed mmp, so probably missing THPs or something
I don't see any failures when I run it..
Jason
Quoted 9 lines · Jason Gunthorpe
Quoted 5 lines · Baolu Lu
Hi Jason,
I compiled a 6.4-rc1 kernel and ran the iommufd selftest. The test hung, and I had to break it with Ctrl+C. Is this a known issue, or there is something wrong with my test setup?
There is an annoying bug in the test harness and it infinite loops for some failure cases. That explains the hang
Get it, thank you!
Quoted 8 lines
Quoted 6 lines
# # RUN iommufd_ioas.no_domain.ioas_destroy ...
# # OK iommufd_ioas.no_domain.ioas_destroy# ok 13 iommufd_ioas.no_domain.ioas_destroy # # RUN iommufd_ioas.no_domain.hwpt_attach ... # # hwpt_attach: Test terminated unexpectedly by signal 9That seems bad
I don't know yet, need some investigation.
Quoted 31 lines
Quoted 22 lines
# # FAIL iommufd_ioas.no_domain.hwpt_attach
# not ok 14 iommufd_ioas.no_domain.hwpt_attach # # RUN iommufd_ioas.no_domain.ioas_area_destroy ... # # OK iommufd_ioas.no_domain.ioas_area_destroy # ok 15 iommufd_ioas.no_domain.ioas_area_destroy # # RUN iommufd_ioas.no_domain.ioas_area_auto_destroy ... # # OK iommufd_ioas.no_domain.ioas_area_auto_destroy # ok 16 iommufd_ioas.no_domain.ioas_area_auto_destroy # # RUN iommufd_ioas.no_domain.area ... # # OK iommufd_ioas.no_domain.area # ok 17 iommufd_ioas.no_domain.area # # RUN iommufd_ioas.no_domain.unmap_fully_contained_areas ... # # OK iommufd_ioas.no_domain.unmap_fully_contained_areas # ok 18 iommufd_ioas.no_domain.unmap_fully_contained_areas # # RUN iommufd_ioas.no_domain.area_auto_iova ... # # OK iommufd_ioas.no_domain.area_auto_iova # ok 19 iommufd_ioas.no_domain.area_auto_iova # # RUN iommufd_ioas.no_domain.area_allowed ... # # OK iommufd_ioas.no_domain.area_allowed # ok 20 iommufd_ioas.no_domain.area_allowed # # RUN iommufd_ioas.no_domain.copy_area ...Quoted 8 lines
# # OK iommufd_ioas.no_domain.copy_area # ok 21 iommufd_ioas.no_domain.copy_area # # RUN iommufd_ioas.no_domain.iova_ranges ... # # OK iommufd_ioas.no_domain.iova_ranges # ok 22 iommufd_ioas.no_domain.iova_ranges # # RUN iommufd_ioas.no_domain.access_domain_destory ... # # iommufd.c:611:access_domain_destory:Expected MAP_FAILED (18446744073709551615) != buf (18446744073709551615)
Quoted 1 line
And you had a failed mmp, so probably missing THPs or something
Seems to look good.
# grep THP .config CONFIG_ARCH_ENABLE_THP_MIGRATION=y CONFIG_ARCH_WANTS_THP_SWAP=y CONFIG_THP_SWAP=y # CONFIG_READ_ONLY_THP_FOR_FS is not set
# cat /sys/kernel/mm/transparent_hugepage/enabled [always] madvise never
Quoted 1 line
I don't see any failures when I run it..
Okay, that's fine.
Best regards,
baolu