Kaleido fails on AWS Lambda - docker
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 entry point fig_to_base64 và lệnh gọi pio.write_image của nó trong môi trường Docker AWS Lambda được nêu trong báo cáo. Tái hiện lỗi không liên tục của subprocess Kaleido, sau đó xác định liệu việc xuất hình ảnh có thể hoàn tất một cách đáng tin cậy mà không xảy ra sự cố zygote hay không; issue không cung cấp tệp nguồn hoặc bài kiểm thử nào được nêu tên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi,
I run this code as part of my aws lambda with docker image:
import plotly.io as pio
import base64
import io
import plotly.graph_objects as go
def fig_to_base64(fig: go.Figure):
buffer = io.BytesIO()
if "--single-process" not in pio.kaleido.scope.chromium_args:
pio.kaleido.scope.chromium_args += ("--single-process",)
pio.write_image(fig=fig, file=buffer, format="png", engine="kaleido")
buffer.seek(0)
plot_base64 = base64.b64encode(buffer.read()).decode("utf-8")
buffer.close()
return plot_base64
The issue that I get 30% of the time is the following error crash (there are times which it work fine!):
Failed to start Kaleido subprocess. Error stream:
[0327/100250.883361:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale
prctl(PR_SET_NO_NEW_PRIVS) failed
prctl(PR_SET_NO_NEW_PRIVS) failed
[0327/100251.087148:FATAL:zygote_communication_linux.cc(255)] Cannot communicate with zygote
#0 0x55555555555 base::debug::CollectStackTrace()
#1 0x55555555555 base::debug::StackTrace::StackTrace()
#2 0x55555555555 logging::LogMessage::~LogMessage()
#3 0x55555555555 content::ZygoteCommunication::Init()
#4 0x55555555555 content::CreateGenericZygote()
#5 0x55555555555 content::ContentMainRunnerImpl::Initialize()
#6 0x55555555555 content::RunContentProcess()
#7 0x55555555555 content::ContentMain()
#8 0x55555555555 headless::(anonymous namespace)::RunContentMain()
#9 0x55555555555 headless::HeadlessBrowserMain()
#10 0x55555555555 main
#11 0x55555555555 __libc_start_call_main
#12 0x55555555555 __libc_start_main_alias_2
#13 0x55555555555 _start
Received signal 6
#0 0x55555555555 base::debug::CollectStackTrace()
#1 0x55555555555 base::debug::StackTrace::StackTrace()
#2 0x55555555555 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x55555555555 (/usr/lib64/libc.so.6+0x54ddf)
#4 0x55555555555 __pthread_kill_implementation
#5 0x55555555555 __GI_raise
#6 0x55555555555 __GI_abort
#7 0x55555555555 base::debug::BreakDebugger()
#8 0x55555555555 logging::LogMessage::~LogMessage()
#9 0x55555555555 content::ZygoteCommunication::Init()
#10 0x55555555555 content::CreateGenericZygote()
#11 0x55555555555 content::ContentMainRunnerImpl::Initialize()
#12 0x55555555555 content::RunContentProcess()
#13 0x55555555555 content::ContentMain()
#14 0x55555555555 headless::(anonymous namespace)::RunContentMain()
#15 0x55555555555 headless::HeadlessBrowserMain()
#16 0x55555555555 main
#17 0x55555555555 __libc_start_call_main
#18 0x55555555555 __libc_start_main_alias_2
#19 0x55555555555 _start
r8: 0x55555555555 r9: 0x55555555555 r10: 0x55555555555 r11: 0x55555555555
r12: 0x55555555555 r13: 0x55555555555 r14: 00007ffd6fd6d1b0 r15: 0x55555555555
di: 0x55555555555 si: 0x55555555555 bp: 0x55555555555 bx: 0x55555555555
dx: 0x55555555555 ax: 0x55555555555 cx: 0x55555555555 sp: 0x55555555555
ip: 0x55555555555 efl: 0x55555555555 cgf: 0x55555555555 erf: 0x55555555555
trp: 0x55555555555 msk: 0x55555555555 cr2: 0x55555555555
[end of stack trace]
Calling _exit(1). Core file will not be generated.
(I changed all the values with 0x55555555555)
I tried as u can see above to use manual the flag of --singe_process but it is not helps.
Thank u,
- Ngôn ngữ chính
- Python
- Star
- 504
- Fork
- 65
- Merge trung bình
- 6 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 plotly/kaleido
-
Writing to an existing directory whose name has a dot fails with "Invalid format"Có thể đã có người làm @RaphaelFakhri đã nhận 13 ngày trước. Đang mởbug P3 size: 1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
Deterministic Rendering ChallengesCó thể làm lại được @camdecoster đã nhận 67 ngày trước và không có pull request nào đang mở. Đang mởenhancement feature P2 size: 5
-
[FEATURE]: Embed custom fonts into vector exports (no system install)Có thể đã có người làm @camdecoster đã nhận 124 ngày trước. Đang mởenhancement P3 size: 3
-
enhancement feature P3 size: 5
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
GlobalKaleidoServer is not thread-safeCó thể đã có người làm @talleibman đã nhận 250 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của plotly/kaleido
Issue tương tự
-
area:cli bug difficulty:1
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 87/100
MakazhanAlpamys/Soup#2491 · 1 bình luận ·
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 76/100
microsoft/onnxscript#3155 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
IFEval nth-paragraph checker reads the wrong paragraph when a blank separator is presentCó thể đã có người làm @chetana1410 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
EleutherAI/lm-evaluation-harness#4530 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sv_SE vat_id() has 14 digits: the "16" organisation number prefix is keptCó thể đã có người làm @kevin9327 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 19 ngày