SIGSEGV: segmentation violation on acr purge
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- azure, docker, go
- 领域
- authentication, cli, cloud
调研方向
首先检查 auth/oras/client.go:32 和 cmd/acr/login.go:111 中的登录路径,使用提供的堆栈跟踪和长时间运行 purge 的复现过程。验证偶发的身份验证失败和空指针路径,然后确认 acr login 和 purge 循环能够继续运行且不会发生段错误。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Use a workload-identity to create a 24h valid token
- Login via
acr login registryname.azurecr.io -u 00000000-0000-0000-0000-000000000000 --password-stdin < /acr/docker-token.txt - Continuously call
acr -r registryname purge --filter "${repo}:^(?i)(feature|renovate|task|fix|hotfix|update|local-SNAPSHOT|development|)" --ago 30d --untaggedin a while loop for a few hours...
Expected behavior
The purge command successfully continues to purge until all repos in the list it loops over are processed
Screenshots
Initially I just got the following error repeatedly, which got me into investigating the authentication part... introduced a token refresh and such kind of things... but no change
Error: error resolving authentication: acr.BaseClient#GetAcrAccessToken: Failure responding to request: StatusCode=401 -- Original Error: autorest/azure: error response cannot be parsed: {"" '\x00' '\x00'} error: EOF
So in the end I took the plunge and added a retry mechanism to my script and added the -d debug switch on the retry. Then I came with a proper stack trace where it goes belly up... seems to be coming from the underlying azure-cli client being used.
acr login registryname.azurecr.io -u 00000000-0000-0000-0000-000000000000 --password-stdin < /acr/docker-token.txt -d
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7e2d11]
goroutine 1 [running]:
github.com/Azure/acr-cli/auth/oras.NewClient({{{0x7ffd16e92a6b, 0x24}, {0xc000294000, 0x42f}, {0x0, 0x0}, {0x0, 0x0}}, 0x0, 0x1})
/go/src/github.com/Azure/acr-cli/auth/oras/client.go:32 +0x2b1
main.runLogin({{0x7ffd16e92a49, 0x1e}, {0x7ffd16e92a6b, 0x24}, {0xc000294000, 0x42f}, {0x0, 0x0, 0x0}, 0x1, ...})
/go/src/github.com/Azure/acr-cli/cmd/acr/login.go:111 +0x3f8
main.newLoginCmd.func1(0xc000184600?, {0xc000156aa0?, 0x4?, 0x975bce?})
/go/src/github.com/Azure/acr-cli/cmd/acr/login.go:56 +0x5d
github.com/spf13/cobra.(*Command).execute(0xc0001d6f08, {0xc000156a50, 0x5, 0x5})
/go/src/github.com/Azure/acr-cli/vendor/github.com/spf13/cobra/command.go:985 +0xaca
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001d6608)
/go/src/github.com/Azure/acr-cli/vendor/github.com/spf13/cobra/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/go/src/github.com/Azure/acr-cli/vendor/github.com/spf13/cobra/command.go:1041
main.main()
/go/src/github.com/Azure/acr-cli/cmd/acr/main.go:12 +0x4a
Any relevant environment information
- OS: mcr.microsoft.com/acr/acr-cli Docker image
- Version 0.13 / 0.14
Additional context
The error happens sporadically... sometimes after 2h sometimes after 6h. We're looping over an ACR with ~4TB of data.
- 主要语言
- Go
- 星标
- 71
- 派生
- 52
- 平均合并
- 8 天 10 小时
- 30 天内合并 PR
- 4
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/acr-cli 的其他 Issue
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
Proposal: Add Minimum and Maximum Retention Policies to Acr Purge可能已有人在做 @gildardogmsft 于 9 天前认领。 未关闭enhancement
难度 5/5 一周以上 新手友好度 35/100
Azure/acr-cli#670 · 2 个 reaction ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 55/100
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 52/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 4 天内回复
-
bug needs-acceptance
难度 2/5 1-3 小时 新手友好度 86/100
vllm-project/semantic-router#4744 ·
维护者通常 1 天内回复
-
ScalingModifiers formula fails with "formula returned non-float result" when expression evaluates to an integer可能已有人在做 @Sarthak-Pandey 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
bug from-studio
难度 2/5 1-3 小时 新手友好度 63/100
esengine/DeepSeek-Reasonix#12355 ·
维护者通常 1 天内回复
-
[Bug]: Gemini provider replaces a client-supplied `extra_content.google.thought_signature` with `skip_thought_signature_validator`, and writes the sentinel on every replayed function call (old turns, all models)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复