Debug Symbols
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
- 30/100
Hướng nghiên cứu
Bắt đầu với cấu hình build image và kiểm tra entry point của postgres bằng file và readelf; xem xét phương pháp configure CFLAGS và find-dbgsym-packages được đề xuất. Được xem là hoàn tất khi thiết lập được một cách được hỗ trợ để các image cung cấp các debug symbol có thể sử dụng, hoặc ghi lại một workflow image dẫn xuất có thể tái lập cùng các đánh đổi về image-size và flavor của image đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The postgres binaries shipped with the docker images in this repo seem to be stripped:
root@0d42c3d8cd06:/# postgres --version
postgres (PostgreSQL) 12.1 (Debian 12.1-1.pgdg100+1)
root@0d42c3d8cd06:/# file $(which postgres)
/usr/lib/postgresql/12/bin/postgres: ELF 64-bit LSB shared object, x86-64, version 1
(SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux
3.2.0, BuildID[sha1]=e775eb7dcaa0306329f0624056df0fa892d48f03, stripped
-----------------------------------------------------------------^
This makes it difficult to use tools such as gdb or perf to debug problems as the resulting stack traces will often be useless.
See my tweet here for a practical example of what can be done when symbols are present.
Proposal
It'd be great if this image would start to ship with debug symbols by default, e.g. by compiling with ./configure CFLAGS="-fno-omit-frame-pointer -ggdb".
If not, it'd be great to document how to derive an image that includes symbols. My first attempts at doing so below have failed. I still get the same output for file $(which postgres) as above, and readelf -s $(which postgres) | wc -l gives me the same ~9k symbols contained in this image, rather than the ~30k symbols usually available for a non-stripped postgres binary.
FROM postgres
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
debian-goodies \
binutils
RUN apt-get install -y $(find-dbgsym-packages $(which postgres))
I suspect the image above doesn't work because postgres is pulled from apt.postgresql.org, but find-dbgsym-packages is not smart enough to search that repo for debug package, if those even exist.
I'd be happy to try to help with creating a PR to improve the debugging/symbol situation once the direction is clear.
From my PoV the only downside to including symbols is image size, so maybe they shouldn't go into the alpine flavor of this image.
- Ngôn ngữ chính
- Shell
- Star
- 2.5k
- Fork
- 1.2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 docker-library/postgres
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
docker-library/postgres#1420 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
docker-library/postgres#1419 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
docker-library/postgres#1389 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
docker-library/postgres#1356 · 5 bình luận · 7 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
docker-library/postgres#1355 · 10 bình luận · 11 reaction ·
Tất cả issue của docker-library/postgres
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
module: core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vercel-labs/just-bash#464 ·
-
area:sandbox documentation enhancement platform:linux
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
anthropics/claude-code#96664 ·
-
cost:cheap severity:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
fairagro/m4.2_sql_to_arc#227 ·