C application crashed with "popen cannot allocate memory"

37 views
Skip to first unread message

Reddi Hareesh

unread,
Apr 29, 2022, 12:23:55 AM4/29/22
to Distroless Users
Hi guys,

I am using multi stage build for my C executable. 
The application runs fine with debian:stretch-slim as a runtime base image.

But with gcr.io/distroless/cc-debian11:debug it crashes with an error "popen cannot allocate memory"

The executable is linked with multiple .so files one among them is a cgo based .so file 

I am copying the missing libraries from builder like this:

COPY --from=builder /usr/lib/x86_64-linux-gnu/libunwind*so* /usr/lib/x86_64-linux-gnu/
COPY --from=builder /lib/x86_64-linux-gnu/libreadline*so* /lib/x86_64-linux-gnu/
COPY --from=builder /lib/x86_64-linux-gnu/libcrypt* /lib/x86_64-linux-gnu/
COPY --from=builder /lib/x86_64-linux-gnu/libtinfo*so* /lib/x86_64-linux-gnu/
COPY --from=builder /lib/x86_64-linux-gnu/liblzma*so* /lib/x86_64-linux-gnu/

Is there any solution for this?

Thanks and Regards,
Hareesh
Reply all
Reply to author
Forward
0 new messages