Bug 6593 - [Anck 4.19 847][anolis8][x86_64][nightly]kernel-selftests下新增失败用例bpf.test_sockmap,报错send loop error:: Permission denied
Summary: [Anck 4.19 847][anolis8][x86_64][nightly]kernel-selftests下新增失败用例bpf.test_sock...
Status: NEW
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: shuming
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-15 17:40 UTC by zhixin01
Modified: 2023-09-15 17:40 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zhixin01 alibaba_cloud_group 2023-09-15 17:40:02 UTC
[缺陷描述]:
kernel-selftests下新增失败用例bpf.test_sockmap,报错send loop error:: Permission denied

该用例首次失败是在9月13日晚上触发的nightly,之前一直都是成功的
失败用例nightly链接:https://tone.aliyun-inc.com/ws/6yddz4ne/test_result/223923

测试日志:
# ./test_sockmap
libbpf: Error loading ELF section .BTF: -22. Ignored and continue.
[TEST 0]: (1, 1, 1, sendmsg, pass,): PASS
[TEST 1]: (1, 1, 1, sendpage, pass,): PASS
[TEST 2]: (1, 1, 34, sendmsg, pass,): PASS
[TEST 3]: (1, 1, 34, sendpage, pass,): PASS
[TEST 4]: (1, 1, 67, sendmsg, pass,): PASS
====================省略部分=======================================
[TEST 227]: (100, 1, 5, sendpage, redir,apply 4096,cork 4096,): PASS
[TEST 228]: (1, 1, 1, sendmsg, pass,redir,start 1,end 2,pop (1,2),): send loop error:: Permission denied
msg_loop_tx: iov_count 1 iov_buf 1 cnt 1 err 13
tx thread exited with err 1. FAILED
Summary: 228 PASSED 1 FAILED

复现环境:
anck 4.19 x86物理机

复现概率:
必现

内核信息:
# uname -r
4.19.91-847.git.ea3366bc0d.an8.x86_64

操作系统信息:
# cat /etc/os-release
NAME="Anolis OS"
VERSION="8.8"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.8"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.8"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

cpu信息:
# lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              96
On-line CPU(s) list: 0-95
Thread(s) per core:  2
Core(s) per socket:  24
Socket(s):           2
NUMA node(s):        1
Vendor ID:           GenuineIntel
BIOS Vendor ID:      Intel(R) Corporation
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
BIOS Model name:     Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
Stepping:            4
CPU MHz:             1000.735
CPU max MHz:         3100.0000
CPU min MHz:         1000.0000
BogoMIPS:            5000.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            33792K
NUMA node0 CPU(s):   0-95
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 art 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 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke md_clear flush_l1d arch_capabilities

内存信息:
# free -h
              total        used        free      shared  buff/cache   available
Mem:          755Gi       3.6Gi       744Gi        18Mi       6.5Gi       747Gi
Swap:         2.0Gi          0B       2.0Gi

[复现步骤]:
测试用例代码路径:
tools/testing/selftests/bpf/test_sockmap.c

手动执行步骤:
下载当前内核对应的kernel源码包
rpm -ivh xxx.src.rpm  默认安装到/root下
yum-builddep -y rpmbuild/SPECS/kernel.spec   自动安装前置依赖包,需要yum-utils
rpmbuild -bp ./rpmbuild/SPECS/kernel.spec   # 这个步骤会打相关的patch, 解压缩tar包,生成BUILD目录
cd rpmbuild/BUILD/kernel-xxx/linux-xxx/  

接下来就可以编译测试了
cd ./tools/testing/selftests/bpf/
make

执行测试用例
./test_sockmap

[期望结果]:
用例pass

[实际结果]:
用例执行失败,报错send loop error:: Permission denied

[分析]
test_sockmap用例失败疑似和9月13日上午合入的下面PR有关,请开发同学确认下
https://gitee.com/anolis/cloud-kernel/pulls/2120