Skip to content

fix: [构建机] 修复windows2022 可能导致临时目录创建失败 #12333

@irwinsun

Description

@irwinsun

What happened:
某些构建机运行在系统

Edition	Windows Server 2022 Datacenter
Version	21H2
Installed on	‎2023/‎6/‎9
OS build	20348.4171

并且开启了win dows defender, 可能会导致有概率出现报错失败

运行Agent需要构建机工作目录的写权限且拥有磁盘写入空间,请检查磁盘是否已满或Agent运行账号相关权限: 
D:/Agent/build_tmp: temporary directory create failed!

What you expected to happen:
在安装构建机权限正常情况下,可以正常稳定的构建不失败

How to reproduce it (as minimally and precisely as possible):

不易复现,原因是可能是因为文件仍处于“延迟删除/占用中”
Windows 上若仍有句柄持有该临时文件(例如杀毒/索引器/备份/安全代理在扫描),delete() 可能返回成功但实际处于 pending delete 状态,直到最后一个句柄关闭前,随后紧接的 mkdir() 会失败。

Anything else we need to know?:

Environment:

  • bk-ci version (use cat VERSION in installed dir): 3.x+
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release): Windows Server 2022 Datacenter Version 21H2
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

Metadata

Metadata

Assignees

Labels

area/ci/agent构建机Agent issuefor testTest environment in tencent has been deploykind/bug程序故障Bug,漏洞tested测试环境通过/test patest passed for test stagetodotodo

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions