[缺陷描述]: liburing-test下sqpoll-idle-us用例fail, sqe submit failed: -22 测试日志: # ./sqpoll-idle-us sqe submit failed: -22 test failed: 1 [重现概率]: 必现 [重现环境]: 环境信息:物理机 OS: KERNEL: # uname -r 5.10.134-494.git.97a308195.an8.x86_64 MEMORY: # free -h total used free shared buff/cache available Mem: 62Gi 1.4Gi 59Gi 127Mi 1.1Gi 59Gi Swap: 2.0Gi 24Mi 2.0Gi CPU: # lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 24 On-line CPU(s) list: 0-23 Thread(s) per core: 2 Core(s) per socket: 12 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel BIOS Vendor ID: Intel CPU family: 6 Model: 63 Model name: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz BIOS Model name: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz Stepping: 2 CPU MHz: 2177.958 CPU max MHz: 2500.0000 CPU min MHz: 1200.0000 BogoMIPS: 4988.62 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 30720K NUMA node0 CPU(s): 0-23 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti intel_ppin ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm arat pln pts md_clear flush_l1d # cat /etc/os-release NAME="Anolis OS" VERSION="8.6" ID="anolis" ID_LIKE="rhel fedora centos" VERSION_ID="8.6" PLATFORM_ID="platform:an8" PRETTY_NAME="Anolis OS 8.6" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" [复现步骤]: 1. 下载liburing代码 2. 解压liburing,cd liburing && tar -xvf liburing-0.7.tar.gz 3. 编译前配置:cd liburing-0.7 && ./configure 4. 对源码进行编译:make 5. 执行测试:cd test && ./sqpoll-idle-us [期望结果]: 用例pass [实际结果]: 用例fail [原因分析]: 这个用例在11.29号的nightly中还是pass的,在12.1号的nightly首次fail,之后一直fail fail部分测试代码如下: static int submit_single_nop(struct io_uring *ring, bool submit_on_idle) { struct io_uring_sqe *sqe; int ret; sqe = io_uring_get_sqe(ring); if (!sqe) { fprintf(stderr, "get sqe failed\n"); goto err; } io_uring_prep_nop(sqe); if (submit_on_idle) ret = io_uring_submit_on_idle(ring); else ret = io_uring_submit(ring); if (ret <= 0) { fprintf(stderr, "sqe submit failed: %d\n", ret); --用例在此fail goto err; } return 0; err: return 1; } 从近期提交的PR看,可能跟这个PR相关 https://gitee.com/anolis/cloud-kernel/pulls/924/
补充一下:要使用5.10分支的liburing代码进行测试
(In reply to shanxifanshi from comment #1) > 补充一下:要使用5.10分支的liburing代码进行测试 https://mirrors.openanolis.cn/anolis/8/BaseOS/ 应该从这里直接下载libuirng的rpm来测试,不要直接使用源码
(In reply to ZiyangZhang from comment #2) > (In reply to shanxifanshi from comment #1) > > 补充一下:要使用5.10分支的liburing代码进行测试 > > https://mirrors.openanolis.cn/anolis/8/BaseOS/ > > 应该从这里直接下载libuirng的rpm来测试,不要直接使用源码 --我安装了liburing包,看了下包里面并不包含测试用例 # yum list liburing rLast metadata expiration check: 1:21:30 ago on Tue 06 Dec 2022 12:20:07 PM CST. Installed Packages liburing.x86_64 1.0.7-3.0.1.an8 @BaseOS # rpm -ql liburing /usr/lib/.build-id /usr/lib/.build-id/58 /usr/lib/.build-id/58/988b0938cfe60f9e80f01ee0036f6262a273c2 /usr/lib64/liburing.so.1 /usr/lib64/liburing.so.1.0.7 /usr/share/doc/liburing /usr/share/doc/liburing/COPYING
(In reply to shanxifanshi from comment #3) > (In reply to ZiyangZhang from comment #2) > > (In reply to shanxifanshi from comment #1) > > > 补充一下:要使用5.10分支的liburing代码进行测试 > > > > https://mirrors.openanolis.cn/anolis/8/BaseOS/ > > > > 应该从这里直接下载libuirng的rpm来测试,不要直接使用源码 > > --我安装了liburing包,看了下包里面并不包含测试用例 > > # yum list liburing > rLast metadata expiration check: 1:21:30 ago on Tue 06 Dec 2022 12:20:07 PM > CST. > Installed Packages > liburing.x86_64 1.0.7-3.0.1.an8 > @BaseOS > > # rpm -ql liburing > /usr/lib/.build-id > /usr/lib/.build-id/58 > /usr/lib/.build-id/58/988b0938cfe60f9e80f01ee0036f6262a273c2 > /usr/lib64/liburing.so.1 > /usr/lib64/liburing.so.1.0.7 > /usr/share/doc/liburing > /usr/share/doc/liburing/COPYING 发布给客户使用的liburing不需要包含测试用例吧?
明确一下测试流程 1. 首先从 https://gitee.com/src-anolis-os/liburing/tree/a8/ 下载代码 2. 然后执行: yum-builddep -y liburing.spec || exit 1 rpmbuild -D "_topdir $(pwd)" \ -D "_sourcedir $(pwd)" \ -D "_builddir $(pwd)" \ -bp liburing.spec liburing_dir=$(find . -type f -name liburing-*.tar.gz \ | sed 's/.tar.gz//') if [ ! -d "$liburing_dir/test" ];then echo "liburing-test directory not found!" exit 1 fi cd $liburing_dir || exit 1 ./configure make || return 3. make runtests 来运行测试用例
https://gitee.com/src-anolis-os/liburing/pulls/7 uapi不一致导致该测试失败
[alinux@alinux-host test]$ sudo ./runtests.sh ./sqpoll-idle-us Running test ./sqpoll-idle-us: All tests passed [alinux@alinux-host test]$ uname -r 5.10.134-497.git.9a90d139f.an8.x86_64 在合入PR后,编译liburing,测试PASS
(In reply to ZiyangZhang from comment #5) > 明确一下测试流程 > > 1. 首先从 https://gitee.com/src-anolis-os/liburing/tree/a8/ 下载代码 > > 2. 然后执行: > yum-builddep -y liburing.spec || exit 1 > rpmbuild -D "_topdir $(pwd)" \ > -D "_sourcedir $(pwd)" \ > -D "_builddir $(pwd)" \ > -bp liburing.spec > liburing_dir=$(find . -type f -name liburing-*.tar.gz \ > | sed 's/.tar.gz//') > if [ ! -d "$liburing_dir/test" ];then > echo "liburing-test directory not found!" > exit 1 > fi > > cd $liburing_dir || exit 1 > ./configure > make || return > > 3. make runtests 来运行测试用例 ---使用gitee a8分支代码验证,用例pass,问题解决,bug关闭 # ./runtests.sh ./sqpoll-idle-us Running test ./sqpoll-idle-us: All tests passed # uname -r 5.10.134-498.git.3ca23b194.an8.x86_64
*** Bug 3417 has been marked as a duplicate of this bug. ***