Bug 8985 - [Anolis23.1 GA][Beta][23.1核心软件包-util-linux]chrt --all-tasks --pid 查询一个不存在的pid时,输出有变化
Summary: [Anolis23.1 GA][Beta][23.1核心软件包-util-linux]chrt --all-tasks --pid 查询一个不存在的pid...
Status: NEW
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: 23.1
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: gaochang
QA Contact: bolong_tbl
URL:
Whiteboard:
Keywords: Function
Depends on:
Blocks:
 
Reported: 2024-05-10 11:17 UTC by zhf668260
Modified: 2024-05-10 14:18 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 zhf668260 alibaba_cloud_group 2024-05-10 11:17:31 UTC
[问题描述]:
Anolis23环境,ECS机器,执行chrt --all-tasks --pid 查询一个不存在的pid时,返回为空,并且$?=0,和之前版本行为不一致,并且和an8不一致

[环境信息]:
机器类型:ECS

[内核信息]:
[root@qibo-anolis23-nightly-func-arm-1 ~]# uname -r
5.10.134-15.an23.x86_64

[操作系统信息]:
[root@iZbp1gvq0cxdashepsrbqdZ libgcrypt]# cat /etc/os-release
NAME="Anolis OS"
VERSION="23"
ID="anolis"
VERSION_ID="23"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"


[重现步骤]:
an23执行结果:
[root@iZbp175juabkzgxnbfv788Z ~]# uname -r
5.10.134-15.an23.x86_64
[root@iZbp175juabkzgxnbfv788Z ~]# chrt --all-tasks --pid 1020766
[root@iZbp175juabkzgxnbfv788Z ~]# echo $?
0


an8执行结果:
[root@iZbp1bsrjt1pwpbo208uovZ ~]# uname -r
5.10.134-16.1.an8.aarch64
[root@iZbp1bsrjt1pwpbo208uovZ ~]# chrt --all-tasks --pid 621515
chrt: cannot obtain the list of tasks: No such file or directory
[root@iZbp1bsrjt1pwpbo208uovZ ~]# echo $?
1




[问题发生概率]:必现
Comment 1 zhf668260 alibaba_cloud_group 2024-05-10 11:29:31 UTC
[root@iZbp1bsrjt1pwpbo208uovZ ~]# rpm -qa | grep util-linux
util-linux-2.32.1-42.0.1.an8.aarch64
util-linux-user-2.32.1-42.0.1.an8.aarch64


[root@iZbp175juabkzgxnbfv788Z ~]# rpm -qa | grep util-linux
util-linux-core-2.38.1-1.an23.x86_64
util-linux-2.38.1-1.an23.x86_64