SIGSEGV: segmentation violation on acr purge
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- azure, docker, go
- Lĩnh vực
- authentication, cli, cloud
Hướng nghiên cứu
Bắt đầu bằng cách kiểm tra auth/oras/client.go:32 và đường dẫn đăng nhập trong cmd/acr/login.go:111, sử dụng stack trace được cung cấp và bản tái hiện purge chạy trong thời gian dài. Xác minh lỗi xác thực không thường xuyên và đường dẫn con trỏ nil, sau đó xác nhận rằng acr login và vòng lặp purge tiếp tục mà không xảy ra lỗi vi phạm phân đoạn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Go
- Star
- 71
- Fork
- 52
- Merge trung bình
- 8 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/acr-cli
-
Add Tag Exclusions to ACR PurgeĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Proposal: Add Minimum and Maximum Retention Policies to Acr PurgeCó thể đã có người làm @gildardogmsft đã nhận 8 ngày trước. Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Azure/acr-cli#670 · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Azure/acr-cli#644 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Azure/acr-cli#621 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Azure/acr-cli
Issue tương tự
-
L: github:actions L: php:composer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
dependabot/dependabot-core#16493 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Controller pods on default limits CrashLoopBackOff and constantly reclaim memoryCó thể đã có người làm @brsmnv đã nhận hôm nay. Đang mởbug
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 68/100
ironcore-dev/ironcore-net#560 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
mark3labs/mcp-go#1039 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 8 ngày
-
enhancement
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 78/100
JuliusBrussee/caveman#1214 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
domain/core domain/mail enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày