Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

"go test ./..." fails when llvm-symbolizer is not available (even if llvm-symbolizer-14 is there)

Đang mở
#906 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
testing-qa

Hướng nghiên cứu

Chạy go test ./... và bắt đầu với binutils_test.go, đặc biệt là TestObjFile và assertion bị lỗi ở dòng 379. Theo dõi cách các bài kiểm thử tìm llvm-symbolizer; hoàn tất khi bộ kiểm thử mặc định vẫn đạt khi nó không tồn tại hoặc chỉ có bản kèm số phiên bản, trong khi CI vẫn có thể buộc kiểm thử các dòng bắt đầu hàm.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

#891 added support for populating function start lines using llvm-symbolizer data. One caveat is that if llvm-symbolizer is not available, the default go test ./... run fails with the error below. In fact, even if llvm-symbolizer is available in its versioned form, such as llvm-symbolizer-14, the test run still fails with the same error.

The workaround right now is to install llvm-symbolizer and then run a command like sudo update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-14 100. This command makes the symbolizer available as llvm-symbolizer, which enables pprof to locate it.

Maybe we should make the test skipped if llvm-symbolizer is not available, but also have an option (a flag or environment variable) to disable that skippage so that we set that option in our CI to ensure we forcefully test the start function numbers.

$ go test ./...
?   	github.com/google/pprof	[no test files]
?   	github.com/google/pprof/driver	[no test files]
ok  	github.com/google/pprof/fuzz	0.034s
?   	github.com/google/pprof/internal/plugin	[no test files]
?   	github.com/google/pprof/internal/proftest	[no test files]
?   	github.com/google/pprof/internal/transport	[no test files]
?   	github.com/google/pprof/third_party/svgpan	[no test files]
--- FAIL: TestObjFile (1.77s)
    --- FAIL: TestObjFile/fixed_load_address (1.65s)
        binutils_test.go:379: SourceLine for main: got [{main /tmp/hello.c 3 0 0}]; want [{main /tmp/hello.c 3 0 3}]
    --- FAIL: TestObjFile/simulated_ASLR_address (0.12s)
        binutils_test.go:379: SourceLine for main: got [{main /tmp/hello.c 3 0 0}]; want [{main /tmp/hello.c 3 0 3}]
FAIL
FAIL	github.com/google/pprof/internal/binutils	1.867s
ok  	github.com/google/pprof/internal/driver	1.728s
ok  	github.com/google/pprof/internal/elfexec	0.092s
ok  	github.com/google/pprof/internal/graph	0.125s
ok  	github.com/google/pprof/internal/measurement	0.125s
ok  	github.com/google/pprof/internal/report	0.921s
ok  	github.com/google/pprof/internal/symbolizer	0.097s
ok  	github.com/google/pprof/internal/symbolz	0.071s
ok  	github.com/google/pprof/profile	0.114s
FAIL
Ngôn ngữ chính
Go
Star
9.3k
Fork
683
Merge trung bình
1 ngày 21 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của google/pprof

Tất cả issue của google/pprof

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.