【问题描述】 使用ltp进行内核功能测试系统调用,执行命令:sudo ./runltp -f syscalls 未能全都Pass 【测试环境】 # cat /etc/os-release NAME="Anolis OS" VERSION="8.4" ID="anolis" ID_LIKE="rhel fedora centos" VERSION_ID="8.4" PLATFORM_ID="platform:an8" PRETTY_NAME="Anolis OS 8.4" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" # lscpu 架构: loongarch64 字节序: Little Endian CPU: 4 在线 CPU 列表: 0-3 每个核的线程数: 1 每个座的核数: 4 座: 1 NUMA 节点: 1 CPU 系列: Loongson-64bit 型号名称: Loongson-3A5000 BogoMIPS: 5000.00 L1d 缓存: 64K L1i 缓存: 64K L2 缓存: 256K L3 缓存: 16384K NUMA 节点0 CPU: 0-3 标记: cpucfg lam ual fpu lsx lasx complex crypto lvz lbt_x86 lbt_arm lbt_mips # free -h total used free shared buff/cache available Mem: 7.8Gi 1.3Gi 5.7Gi 16Mi 867Mi 5.5Gi Swap: 7.9Gi 9.0Mi 7.9Gi 【测试日志】 <<<test_start>>> tag=semctl09 stime=1639585114 cmdline="semctl09" contacts="" analysis=exit <<<test_output>>> tst_test.c:1263: TINFO: Timeout per run is 0h 05m 00s semctl09.c:71: TINFO: Test SYS_semctl syscall semctl09.c:136: TINFO: Test SEM_STAT_ANY with nobody user semctl09.c:159: TPASS: SEM_INFO returned valid index 0 to semid 1049886720 semctl09.c:168: TPASS: Counted used = 1 semctl09.c:116: TPASS: semset_cnt = 1 semctl09.c:123: TPASS: sen_cnt = 2 semctl09.c:136: TINFO: Test SEM_STAT_ANY with root user semctl09.c:159: TPASS: SEM_INFO returned valid index 0 to semid 1049886720 semctl09.c:168: TPASS: Counted used = 1 semctl09.c:116: TPASS: semset_cnt = 1 semctl09.c:123: TPASS: sen_cnt = 2 tst_test.c:1263: TINFO: Timeout per run is 0h 05m 00s semctl09.c:74: TINFO: Test libc semctl() semctl09.c:136: TINFO: Test SEM_STAT_ANY with nobody user semctl09.c:153: TFAIL: SEM_STAT_ANY doesn't pass the buffer specified by the caller to kernel semctl09.c:136: TINFO: Test SEM_STAT_ANY with root user semctl09.c:153: TFAIL: SEM_STAT_ANY doesn't pass the buffer specified by the caller to kernel Summary: passed 8 failed 2 broken 0 skipped 0 warnings 0 <<<execution_status>>> initiation_status="ok" duration=0 termination_type=exited termination_id=1 corefile=no cutime=1 cstime=0 <<<test_end>>> 【预期结果】 Pass 【初步分析】 The `semctl` system call wrapper in `glibc` now treats `SEM_STAT_ANY` like `SEM_STAT` 上游问题 https://bugzilla.redhat.com/show_bug.cgi?id=1912670 解决 https://access.redhat.com/errata/RHSA-2021:4358
在龙芯3A5000LL机器上测试存在同样问题 测试日志: <<<test_start>>> tag=semctl09 stime=1639986052 cmdline="semctl09" contacts="" analysis=exit <<<test_output>>> incrementing stop tst_test.c:1411: TINFO: Timeout per run is 0h 05m 00s semctl09.c:76: TINFO: Test SYS_semctl syscall semctl09.c:141: TINFO: Test SEM_STAT_ANY with nobody user semctl09.c:164: TPASS: SEM_INFO returned valid index 0 to semid 360448 semctl09.c:173: TPASS: Counted used = 1 semctl09.c:121: TPASS: semset_cnt = 1 semctl09.c:128: TPASS: sen_cnt = 2 semctl09.c:141: TINFO: Test SEM_STAT_ANY with root user semctl09.c:164: TPASS: SEM_INFO returned valid index 0 to semid 360448 semctl09.c:173: TPASS: Counted used = 1 semctl09.c:121: TPASS: semset_cnt = 1 semctl09.c:128: TPASS: sen_cnt = 2 tst_test.c:1411: TINFO: Timeout per run is 0h 05m 00s semctl09.c:79: TINFO: Test libc semctl() semctl09.c:201: TFAIL: SEM_STAT_ANY doesn't pass the buffer specified by the caller to kernel HINT: You _MAY_ be missing glibc fixes, see: https://sourceware.org/git/?p=glibc.git;a=commit;h=574500a108be Summary: passed 8 failed 1 broken 0 skipped 0 warnings 0 <<<execution_status>>> initiation_status="ok" duration=0 termination_type=exited termination_id=1 corefile=no cutime=0 cstime=0 <<<test_end>>> cpu信息: # lscpu Architecture: loongarch64 Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 NUMA node(s): 1 CPU family: Loongson-64bit Model name: Loongson-3A5000LL BogoMIPS: 4600.00 L1d cache: 64K L1i cache: 64K L2 cache: 256K L3 cache: 16384K NUMA node0 CPU(s): 0-3 Flags: cpucfg lam ual fpu lsx lasx complex crypto lvz lbt_x86 lbt_arm lbt_mips glibc信息: # ldd --version ldd (GNU libc) 2.28 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper. 系统镜像: http://8.131.87.1/kojifiles/output/an-8-loongarch64-RC1/compose/BaseOS/loongarch64/iso/ 复现环境: 龙芯物理机 复现概率: 必现 内核信息: # uname -r 4.19.190-3.an8.loongarch64 操作系统信息: # cat /etc/anolis-release Anolis OS release 8.4 [root@localhost ~]# cat /etc/os-release NAME="Anolis OS" VERSION="8.4" ID="anolis" ID_LIKE="rhel fedora centos" VERSION_ID="8.4" PLATFORM_ID="platform:an8" PRETTY_NAME="Anolis OS 8.4" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" [期望结果]: semctl09用例pass [实际结果]: semctl09用例fail [初步分析]: 上游问题: https://sourceware.org/git/?p=glibc.git;a=commit;h=574500a108be https://sourceware.org/bugzilla/show_bug.cgi?id=26637 龙芯当前配套的glibc是2.28,看上游的描述是在glibc2.32解决的,可能需要更新下配套的glibc版本
龙芯3A5000台式机LTP使用ltp进行内核功能测试系统调用,为同样问题 [root@localhost ltp]# lscpu 架构: loongarch64 字节序: Little Endian CPU: 4 在线 CPU 列表: 0-3 每个核的线程数: 1 每个座的核数: 4 座: 1 NUMA 节点: 1 CPU 系列: Loongson-64bit 型号名称: Loongson-3A5000 BogoMIPS: 5000.00 L1d 缓存: 64K L1i 缓存: 64K L2 缓存: 256K L3 缓存: 16384K NUMA 节点0 CPU: 0-3 标记: cpucfg lam ual fpu lsx lasx complex crypto lvz lbt_x86 lbt_arm lbt_mips 系统镜像: http://8.131.87.1/kojifiles/output/an-8-loongarch64-RC1/compose/BaseOS/loongarch64/iso/ 内核: [root@localhost ~]# uname -r 4.19.190-3.an8.loongarch64 硬件设备: Loongson-3A5000台式机
在X86上复现,也出现此问题 【测试日志】 <<<test_start>>> tag=semctl09 stime=1642143313 cmdline="semctl09" contacts="" analysis=exit <<<test_output>>> incrementing stop tst_test.c:1428: TINFO: Timeout per run is 0h 05m 00s semctl09.c:76: TINFO: Test SYS_semctl syscall semctl09.c:141: TINFO: Test SEM_STAT_ANY with nobody user semctl09.c:164: TPASS: SEM_INFO returned valid index 0 to semid 0 semctl09.c:173: TPASS: Counted used = 1 semctl09.c:121: TPASS: semset_cnt = 1 semctl09.c:128: TPASS: sen_cnt = 2 semctl09.c:141: TINFO: Test SEM_STAT_ANY with root user semctl09.c:164: TPASS: SEM_INFO returned valid index 0 to semid 0 semctl09.c:173: TPASS: Counted used = 1 semctl09.c:121: TPASS: semset_cnt = 1 semctl09.c:128: TPASS: sen_cnt = 2 tst_test.c:1428: TINFO: Timeout per run is 0h 05m 00s semctl09.c:79: TINFO: Test libc semctl() semctl09.c:201: TFAIL: SEM_STAT_ANY doesn't pass the buffer specified by the caller to kernel HINT: You _MAY_ be missing glibc fixes, see: https://sourceware.org/git/?p=glibc.git;a=commit;h=574500a108be Summary: passed 8 failed 1 broken 0 skipped 0 warnings 0 <<<execution_status>>> initiation_status="ok" duration=0 termination_type=exited termination_id=1 corefile=no cutime=0 cstime=0 <<<test_end>>> 【测试环境】 # cat /etc/os-release NAME="CentOS Linux" VERSION="8" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Linux 8" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="https://centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-8" CENTOS_MANTISBT_PROJECT_VERSION="8" #lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 8 NUMA node(s): 1 Vendor ID: GenuineIntel BIOS Vendor ID: Red Hat CPU family: 6 Model: 85 Model name: Intel Xeon Processor (Skylake, IBRS) BIOS Model name: RHEL-8.2.0 PC (Q35 + ICH9, 2009) Stepping: 4 CPU MHz: 2194.838 BogoMIPS: 4389.67 Virtualization: VT-x Hypervisor vendor: KVM Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 4096K L3 cache: 16384K NUMA node0 CPU(s): 0-7 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat umip pku ospke md_clear arch_capabilities #free -h [root@houfangdong ltp]# free -h total used free shared buff/cache available Mem: 15Gi 900Mi 14Gi 116Mi 541Mi 14Gi Swap: 0B 0B 0B 【内核信息】 # uname -r 4.18.0-305.25.1.el8_4.x86_64 【期望结果】: semctl09用例pass 【实际结果】: semctl09用例fail
问题已经修正