fix: prevent docker_pull wait error loop - #22
Open
lln556 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
docker_pull()在命令替换中使用无参数wait。脚本同时通过start_push_proc保持一个长期后台任务;在当前镜像的 Bash 5.3.3 中,命令替换子 shell 会尝试等待这个不属于自己的 PID,并陷入高速错误循环:实际故障中,该循环在约 68 分钟内生成了 17.1 GB Docker 日志。
修复
curl时记录本批进程的 PIDwaitFixes #21
验证
bash -n aliyun_clear.shsh -n aliyun_clear.shgit diff --checkdocker_pull(),在 Bash 5.3.3 环境中保留父后台任务并模拟两个并发测速进程: