docker-library / docker-library/python

"debug build" for at least one image

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

Chưa có ai nhận issue này.

Ngôn ngữ chính
Dockerfile
Star
2.8k
Fork
1.1k
Merge trung bình
3 ngày 1 giờ
Pull request đã merge (30 ngày)
1

Mô tả

Recently we had a C extension for python failing in production in an environment that we do not own ourselves. The data in that environment was causing the issues. Because for that reason, it was complicated to reproduce it in different environments, we looked into running a debug version of python in that environment to understand where it was crashing, but that turned out quite complicated to do.

In the end I managed to home in on the data issues, set up data locally to reproduce it and build a debug version of the slim-bullseye image that I could use as a source for our application image. This allowed us to dump a core and investigate the back traces.

Would it be helpful to have at least one image that contains a debug build of python in this stack, so that it's easier for developers to switch to that image and do this analysis?

An image that adds these lines to .,/configure

--with-pydebug \ CFLAGS="-g -O0" \

and sets LDFLAGS="" instead of LDFLAGS="-Wl,--strip-all"; \ ,

installs gdb and gdb extensions (# enable GDB to load debugging data: https://github.com/docker-library/python/pull/701)

If that's not a good idea, could you let me know what you'd recommend otherwise as a better process?

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

  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.

Hướng nghiên cứu

Bắt đầu bằng việc xem xét cách image slim-bullseye được build và các tùy chọn ./configure cùng LDFLAGS của nó được thiết lập ở đâu. Kiểm tra các debug-build flags được đề xuất cho Python, việc cài đặt GDB và các extension của GDB so với quy trình image hiện có. Được xem là hoàn tất khi dự án có một debug image được tài liệu hóa hoặc một phương án thay thế rõ ràng, được maintainer phê duyệt, để tạo core dump và backtrace.

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

Đánh giá

Công nghệ
docker, python
Lĩnh vực
build-system, devops
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

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.