Bug 6023 - [Anolis8][x86_64][nightly]kernel-selftests:执行netfilter目录下nft_nat.sh用例概率fail,socat[338403] E connect(5, AF=2 10.0.1.99:2000, 16): Connection refused
Summary: [Anolis8][x86_64][nightly]kernel-selftests:执行netfilter目录下nft_nat.sh用例概率fail,s...
Status: NEW
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: x86_64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: shuancue
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-27 17:32 UTC by shanxifanshi
Modified: 2023-07-27 17:32 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shanxifanshi alibaba_cloud_group 2023-07-27 17:32:20 UTC
[缺陷描述]:
kernel-selftests:执行netfilter目录下nft_nat.sh用例概率fail,socat[338403] E connect(5, AF=2 10.0.1.99:2000, 16): Connection refused

测试日志:
PASS: netns routing/connectivity: ns0-0KutG4Cb can reach ns1-0KutG4Cb and ns2-0KutG4Cb
PASS: ping to ns1-0KutG4Cb was ip NATted to ns2-0KutG4Cb
PASS: ping to ns1-0KutG4Cb OK after ip nat output chain flush
PASS: ipv6 ping to ns1-0KutG4Cb was ip6 NATted to ns2-0KutG4Cb
2023/07/27 15:26:14 socat[338403] E connect(5, AF=2 10.0.1.99:2000, 16): Connection refused
ERROR: inet port rewrite
PASS: ping to ns1-0KutG4Cb was inet NATted to ns2-0KutG4Cb
PASS: ping to ns1-0KutG4Cb OK after inet nat output chain flush
PASS: ipv6 ping to ns1-0KutG4Cb was inet NATted to ns2-0KutG4Cb
PASS: ip IP masquerade  for ns2-0KutG4Cb
PASS: ip6 IPv6 masquerade  for ns2-0KutG4Cb
PASS: inet IP masquerade  for ns2-0KutG4Cb
PASS: inet IPv6 masquerade  for ns2-0KutG4Cb
PASS: ip IP masquerade fully-random for ns2-0KutG4Cb
PASS: ip6 IPv6 masquerade fully-random for ns2-0KutG4Cb
PASS: inet IP masquerade fully-random for ns2-0KutG4Cb
PASS: inet IPv6 masquerade fully-random for ns2-0KutG4Cb
PASS: ip IP redirection for ns2-0KutG4Cb
PASS: ip6 IPv6 redirection for ns2-0KutG4Cb
PASS: inet IP redirection for ns2-0KutG4Cb
PASS: inet IPv6 redirection for ns2-0KutG4Cb
FAIL: nftables v0.9.3 (Topsy)

[环境信息]:
复现环境:
anck 5.10 x86 物理机

复现概率:概率不等,1/30-1/2

内核信息:
# uname -r
5.10.134-57.git.d398846bd.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):              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:             2292.150
CPU max MHz:         2500.0000
CPU min MHz:         1200.0000
BogoMIPS:            4988.74
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

内存信息:
# free -h
              total        used        free      shared  buff/cache   available
Mem:           62Gi       2.3Gi        57Gi       186Mi       3.4Gi        59Gi
Swap:         2.0Gi        88Mi       1.9Gi

[复现步骤]:
下载当前内核对应的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/netfilter
make

执行测试用例
./nft_nat.sh

[期望结果]:
用例pass

[实际结果]:
用例fail

[原因分析]:
应该是用例问题,上游有修复patch
https://lkml.kernel.org/netdev/20230227093646.1066666-1-liuhangbin@gmail.com/T/#m5779de55c3a6788d5974509e08ee8a24ff95670d