已开启
lorax调用脚本概率会卡住 #34
xinsheng3创建于  4月27日
xinsheng3
4月27日 创建

【缺陷描述】:请补充详细的缺陷问题现象描述

lorax调用以下2行脚本后卡住

runcmd bash ${outroot}/make_livecd_bep_entry.sh
runcmd rm ${outroot}/make_livecd_bep.sh

一、缺陷信息

脚本1(make_livecd_bep_entry.sh)内容:
`#!/bin/bash
set -e

cd "$(dirname "$0")"
mkdir -p tmp_fs
mkdir -p old_fs new_fs
mount LiveOS/squashfs.img old_fs
cp old_fs/* new_fs/ -rf
mount new_fs/LiveOS/rootfs.img tmp_fs
cp ./make_livecd_bep.sh ./tmp_fs/
cp ./bep_clean.conf ./tmp_fs/
cp ./bep_remove.conf ./tmp_fs/
chroot tmp_fs /make_livecd_bep.sh
rm -f ./tmp_fs/make_livecd_bep.sh
rm -f ./tmp_fs/bep_clean.conf
rm -f ./tmp_fs/bep_remove.conf
umount tmp_fs
mksquashfs new_fs/ squashfs.img -comp xz
umount old_fs
mv -f squashfs.img LiveOS/squashfs.img
rm -rf old_fs new_fs tmp_fs
`

脚本2(make_livecd_bep.sh)内容:
`#!/bin/bash
set -e
######################

bep_clean_files

Globals: none

Arguments: none

Returns: 0:sucess other:failed

######################
function bep_clean_files()
{
cat bep_clean.conf | while read files;do
[ -n "files" ] && echo > "files"
done
}

######################

bep_remove_files

Globals: none

Arguments: none

Returns: 0:sucess other:failed

######################
function bep_remove_files()
{
set +e
cat bep_remove.conf | while read files;do
wildcard="(echo"(echo "files" | grep "*")"
if [ -n "wildcard"];thentmpfile="wildcard" ];then tmp_file="(echo "files"∣sed′s/∗//g′)"[−n"files" | sed 's/*//g')" [ -n "tmp_file" ] && rm -rf "tmpfile"∗else[−n"tmp_file"* else [ -n "files" ] && rm -rf "$files"
fi
done
set -e
}

bep_remove_files
bep_clean_files
exit 0
`

【缺陷所属的os版本】

openEuler-24.03-LTS-SP1
openEuler-24.03-LTS-SP3

【内核版本】

uname -r 6.6.0-72.0.0.76.oe2403sp1.x86_64

【缺陷所属软件及版本号】

lorax-34.1-8.aarch64.rpm

【环境信息】

硬件信息

  • 提供跟硬件相关的信息,如架构、cpu和内存规格等
  • 虚拟机场景,额外补充宿主机os版本类型

软件信息

  • 跟缺陷所属软件相关的其它软件版本信息(如软件包构建失败由gcc引起,请填写gcc的版本号)

网络信息

  • 如果有特殊组网,请提供网络拓扑信息以及网络数据走向

【问题复现步骤】

【实际结果】

【期望结果】

【其他相关附件信息】

1、验证 rm ${outroot}/make_livecd_bep.sh 改为rm -f 也不行

【缺陷详情及分析指导参考链接】

likedislike
openeuler-ci-botopeneuler-ci-bot成员
4月27日 添加了label:sig/sig-OS-Builder
openeuler-ci-bot
openeuler-ci-bot成员
4月27日 评论:

Welcome To openEuler Community

Hey @xinsheng3 , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: sig-OS-Builder ,
and any of the maintainers: @anonymous_z, @compile_success, @han_hui_hui, @overweight, @shenyangyang, @t_feng, @yanan-rock, @zhangqiumiao, @zhuchunyi ,
and any of the committers: @ouuleilei, @overweight, @shenyangyang, @yue-yuankun, @zhuchunyi .

likedislike
openeuler-ci-botopeneuler-ci-bot成员
4月27日 将 ouuleilei 设为负责人
openeuler-ci-botopeneuler-ci-bot成员
4月27日 修改了issue 的描述
openeuler-ci-bot
openeuler-ci-bot成员
4月27日 评论:

以下的要求不是强制性的, 未按模板评论时对issue无任何影响
issue处理注意事项:
1. 当前issue受影响的分支提交pr时, 须在pr描述中填写当前issue编号进行关联, 否则无法关闭当前issue;
2. 模板内容需要填写完整, 无论是受影响或者不受影响都需要填写完整内容,未引入的分支不需要填写, 否则无法关闭当前issue;
3. 以下为模板中需要填写完整的内容, 请复制到评论区回复, 注: 内容的标题名称(影响性分析说明, 缺陷严重等级, 受影响版本排查(受影响/不受影响), 修复是否涉及abi变化(是/否))不能省略,省略后defect-manager将无法正常解析填写内容.
评论区可能使用到的指令说明:

指令 指令说明 使用权限
/check-issue 触发defect-manager校验 不限
/reason xxx /reason +挂起或取消条件 不限

影响性分析说明:

缺陷严重等级:(Critical/High/Moderate/Low)

缺陷根因说明:

受影响版本排查(受影响/不受影响):

  1. openEuler-20.03-LTS-SP4:
  2. openEuler-22.03-LTS-SP3:
  3. openEuler-22.03-LTS-SP4:
  4. openEuler-24.03-LTS:
  5. openEuler-24.03-LTS-SP1:
  6. openEuler-24.03-LTS-SP2:

abi变化(是/否):

  1. openEuler-20.03-LTS-SP4:
  2. openEuler-22.03-LTS-SP3:
  3. openEuler-22.03-LTS-SP4:
  4. openEuler-24.03-LTS:
  5. openEuler-24.03-LTS-SP1:
  6. openEuler-24.03-LTS-SP2:

缺陷issue处理具体操作请参考:
https://atomgit.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/defect-manager-manual.md
pr关联issue具体操作请参考:
https://docs.atomgit.com/docs/help/home/org_project/pullrequests/pr-related-issue

likedislike
openeuler-ci-botopeneuler-ci-bot成员
4月27日 添加了label:DEFECT/UNFIXED
xinsheng3
4月27日 评论:
Xxinsheng3
4月27日 修改了issue 的描述
nickyang
nickyang
5月6日 评论:

lorax读取提供的配置,调用subprocess执行子进程命令行,rm操作卡住,查看rm操作是在make_livecd_bep_entry.sh之后,且该脚本对文件系统有操作,并卡在执行脚本后,怀疑是脚本导致的,可确认下是否脚本执行导致后续的卡住

likedislike