Open Yovoss opened 2 years ago
Hi, wanted to add that I also am having the same issue
ValueError: Failed to start Kaleido subprocess. Error stream:
[0406/024334.965007:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale
prctl(PR_SET_NO_NEW_PRIVS) failed
[0406/024335.025482:FATAL:zygote_communication_linux.cc(255)] Cannot communicate with zygote
#0 0x55f266e5bd79 base::debug::CollectStackTrace()
#1 0x55f266dd9633 base::debug::StackTrace::StackTrace()
#2 0x55f266de915f logging::LogMessage::~LogMessage()
#3 0x55f265585d85 content::ZygoteCommunication::Init()
#4 0x55f2655863c7 content::CreateUnsandboxedZygote()
#5 0x55f266b4280b content::ContentMainRunnerImpl::Initialize()
#6 0x55f266b40bbc content::RunContentProcess()
#7 0x55f266b40cfc content::ContentMain()
#8 0x55f266b92182 headless::(anonymous namespace)::RunContentMain()
#9 0x55f266b92025 headless::HeadlessBrowserMain()
#10 0x55f264bb0fa8 main
#11 0x7f82aaf6e0ba __libc_start_main
#12 0x55f264baa3ea _start
Received signal 6
#0 0x55f266e5bd79 base::debug::CollectStackTrace()
#1 0x55f266dd9633 base::debug::StackTrace::StackTrace()
#2 0x55f266e5b95b base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7f82ac4437e0 (/usr/lib64/libpthread-2.26.so+0x117df)
#4 0x7f82aaf80c20 __GI_raise
#5 0x7f82aaf820c8 __GI_abort
#6 0x55f266e5a8f5 base::debug::BreakDebugger()
#7 0x55f266de95b2 logging::LogMessage::~LogMessage()
#8 0x55f265585d85 content::ZygoteCommunication::Init()
#9 0x55f2655863c7 content::CreateUnsandboxedZygote()
#10 0x55f266b4280b content::ContentMainRunnerImpl::Initialize()
#11 0x55f266b40bbc content::RunContentProcess()
#12 0x55f266b40cfc content::ContentMain()
#13 0x55f266b92182 headless::(anonymous namespace)::RunContentMain()
#14 0x55f266b92025 headless::HeadlessBrowserMain()
#15 0x55f264bb0fa8 main
#16 0x7f82aaf6e0ba __libc_start_main
#17 0x55f264baa3ea _start
r8: 0000000000000000 r9: 00007ffec14e5460 r10: 0000000000000008 r11: 0000000000000246
r12: 00007ffec14e5f00 r13: 00007ffec14e67f0 r14: 00007ffec14e6800 r15: 00007ffec14e6808
di: 0000000000000002 si: 00007ffec14e5460 bp: 00007ffec14e56b0 bx: 0000000000000006
dx: 0000000000000000 ax: 0000000000000000 cx: 00007f82aaf80c20 sp: 00007ffec14e5460
ip: 00007f82aaf80c20 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.
The version of kaleido is also 0.2.1
@Yovoss please put the bug label on this issue.
@Yovoss, I think you need to run ./gru/bin/conda-unpack
on server B.
Hi, wanted to add that I also am having the same issue
ValueError: Failed to start Kaleido subprocess. Error stream: [0406/024334.965007:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale prctl(PR_SET_NO_NEW_PRIVS) failed [0406/024335.025482:FATAL:zygote_communication_linux.cc(255)] Cannot communicate with zygote #0 0x55f266e5bd79 base::debug::CollectStackTrace() #1 0x55f266dd9633 base::debug::StackTrace::StackTrace() #2 0x55f266de915f logging::LogMessage::~LogMessage() #3 0x55f265585d85 content::ZygoteCommunication::Init() #4 0x55f2655863c7 content::CreateUnsandboxedZygote() #5 0x55f266b4280b content::ContentMainRunnerImpl::Initialize() #6 0x55f266b40bbc content::RunContentProcess() #7 0x55f266b40cfc content::ContentMain() #8 0x55f266b92182 headless::(anonymous namespace)::RunContentMain() #9 0x55f266b92025 headless::HeadlessBrowserMain() #10 0x55f264bb0fa8 main #11 0x7f82aaf6e0ba __libc_start_main #12 0x55f264baa3ea _start Received signal 6 #0 0x55f266e5bd79 base::debug::CollectStackTrace() #1 0x55f266dd9633 base::debug::StackTrace::StackTrace() #2 0x55f266e5b95b base::debug::(anonymous namespace)::StackDumpSignalHandler() #3 0x7f82ac4437e0 (/usr/lib64/libpthread-2.26.so+0x117df) #4 0x7f82aaf80c20 __GI_raise #5 0x7f82aaf820c8 __GI_abort #6 0x55f266e5a8f5 base::debug::BreakDebugger() #7 0x55f266de95b2 logging::LogMessage::~LogMessage() #8 0x55f265585d85 content::ZygoteCommunication::Init() #9 0x55f2655863c7 content::CreateUnsandboxedZygote() #10 0x55f266b4280b content::ContentMainRunnerImpl::Initialize() #11 0x55f266b40bbc content::RunContentProcess() #12 0x55f266b40cfc content::ContentMain() #13 0x55f266b92182 headless::(anonymous namespace)::RunContentMain() #14 0x55f266b92025 headless::HeadlessBrowserMain() #15 0x55f264bb0fa8 main #16 0x7f82aaf6e0ba __libc_start_main #17 0x55f264baa3ea _start r8: 0000000000000000 r9: 00007ffec14e5460 r10: 0000000000000008 r11: 0000000000000246 r12: 00007ffec14e5f00 r13: 00007ffec14e67f0 r14: 00007ffec14e6800 r15: 00007ffec14e6808 di: 0000000000000002 si: 00007ffec14e5460 bp: 00007ffec14e56b0 bx: 0000000000000006 dx: 0000000000000000 ax: 0000000000000000 cx: 00007f82aaf80c20 sp: 00007ffec14e5460 ip: 00007f82aaf80c20 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 [end of stack trace] Calling _exit(1). Core file will not be generated.
The version of kaleido is also 0.2.1
I'm having this same issue - running on a docker container on AWS Lambda. Just doing a write_image from a plotly figure, have tried setting --single-process that I saw suggested elsewhere as a potential fix on Lambda.
I've been able to work around it by using code that warms up Kaleido, waits and then continues when a simple throwaway image is created. This leads me to believe its related to the time taken to startup the background processes. Lamdas, being limited in computational power, would be extremely susceptible to this. I've created a hack to wait for the warmup to complete, code is below.
` import plotly.graph_objects as go import numpy as np import plotly.io as pio
def plotly_kaleido_warmup():
cold = True
try:
np.random.seed(1)
N = 100
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
sz = np.random.rand(N) * 30
fig = go.Figure()
fig.add_trace(go.Scatter(
x=x,
y=y,
mode="markers",
marker=go.scatter.Marker(
size=sz,
color=colors,
opacity=0.6,
colorscale="Viridis"
)))
fig.write_image(f"{tempfile.gettempdir()}/warmup.png")
cold = False
except Exception as ex:
print(f"WARMUP EXCEPTION {ex}")
finally:
return cold
pio.kaleido.scope.chromium_args += ("--single-process",)
cold = True
while cold:
cold = plotly_kaleido_warmup()
if cold:
log.info(f'cold; waiting 10 seconds.')
time.sleep(10)
else:
log.info(f'warmup complete.')`
Thanks for your interest in Kaleido. We are currently working on an overhaul that might address your issue - we hope to have news in a few weeks and will post an update then. Thanks - @gvwilson
I use conda-pack command to remove my gru conda environment from server A to server B, and there is an error about kaleido while i use the fig.write_image(). The error message is as follows:
**
**
So i want to know how to fix it? and the import is normal.