Git Product home page Git Product logo

Comments (13)

alpegon avatar alpegon commented on July 30, 2024 1

Fixed in PR #286.
Thanks to the new version of udocker the alpine containers can be used in AWS Lambda.

from scar.

gmolto avatar gmolto commented on July 30, 2024

The root of the problem is two-fold:

  1. In the alpine:latest Docker image, the command-line utilities (say /bin/sh, /bin/ls are symlinks to /bin/busybox)
  2. When activating the F1 execution mode in uDocker this problem is exhibited.

Steps to reproduce this issue:

udocker create --name=test-alpine alpine:latest
udocker setup --execmode=F1 test-alpine
udocker run test-alpine /bin/ls
Error: command not found or has no execute bit set:  ['/bin/ls']

Two options here:

  1. Raise an issue in uDocker to see if they can fix this in uDocker.
  2. Handle this in scarsupervisor.

Concerning (2), rewriting /bin/ls to /bin/busybox ls is not an option since the following error appears:

 udocker run test-alpine /bin/busybox ls

Warning: running as uid 0 is not supported by this engine
Warning: non-existing user will be created

##############################################################################

STARTING 819365c8-102d-34d1-9b7e-917afe328940

##############################################################################
executing: busybox
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __snprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __vfprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __chk_fail: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: rawmemchr: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __memmove_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __rawmemchr: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __strcpy_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __fprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __sprintf_chk: symbol not found

from scar.

gmolto avatar gmolto commented on July 30, 2024

For the sake of reference these are the udocker execution modes tested (W means successfully running the busybox command in a container out of the alpine:latest image executed in a local Linux box)

  • P1: proot accelerated mode using seccomp --> W, but not a valid mode for AWS Lambda
  • P2: proot accelerated mode disabled --> W, but not a valid mode for AWS Lambda
  • F1: fakeroot starting executables via direct loader invocation --> Does not work
  • F2: similar to F1 with protected environment and modified ld.so --> Does not work
  • F3: fakeroot patching elf headers in libraries and executables --> Does not work
  • F4: similar to F3 with support for newly created executables via
    dynamic patching elf headers of libraries and executables --> Does not work
  • R1: runc rootless --> Does not work (not a valid mode for AWS Lambda)

from scar.

gmolto avatar gmolto commented on July 30, 2024

Filed an issue in uDocker: See: indigo-dc/udocker#76

from scar.

gmolto avatar gmolto commented on July 30, 2024

It looks like this may be an issue with Alpine only supporting Musl instead of GLIBC.

Tested the frolvlad/alpine-glibc but the very same error is obtained.

from scar.

gmolto avatar gmolto commented on July 30, 2024

For the sake of reference, tested another image with the same results:

udocker run mikesir87-aws-cli /usr/bin/python aws s3 ls

Warning: running as uid 0 is not supported by this engine
Warning: non-existing user will be created

 ##############################################################################
 #                                                                            #
 #               STARTING 8f630e53-1eb1-3f01-8207-b40cd2db1c1f                #
 #                                                                            #
 ##############################################################################
 executing: python2.7
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __snprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __vfprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __chk_fail: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: rawmemchr: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __memmove_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __rawmemchr: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __strcpy_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __fprintf_chk: symbol not found
Error relocating /home/ubuntu/.udocker/lib/libfakechroot-Ubuntu-16-x86_64.so: __sprintf_chk: symbol not found

from scar.

micafer avatar micafer commented on July 30, 2024

It seems that it a problem with the libfakechroot used. Using the alpine libfakechroot lib (linked to musl) it seems to work.

from scar.

frezbo avatar frezbo commented on July 30, 2024

@gmolto What if the alpine image I use already has glibc installed #28 (comment)

from scar.

gmolto avatar gmolto commented on July 30, 2024

@frezbo Hi. This was already tested unsuccessfully with the frolvlad/alpine-glibc image as you can see in the previous comments. No progress AFAIK in uDocker in this respect.

from scar.

OndraZizka avatar OndraZizka commented on July 30, 2024

Hi, seeking a little help here. Is your observation that solutions like alpine-pkg-glibc won't fix this kind of issues?

Error relocating ...: __snprintf_chk: symbol not found

Related: gliderlabs/docker-alpine#149

from scar.

gmolto avatar gmolto commented on July 30, 2024

Looks like version 1.1.3 of udocker provides some experimental code for Alpine according to: indigo-dc/udocker#76

from scar.

rethab avatar rethab commented on July 30, 2024

How can I try scar with version 1.1.3? I tried to modify the Dockerfile (and monkey-patched some files in the repo), but I can't get past this error:

Unable to find "/scar/src/providers/aws/cloud/lambda/udocker/udocker-1.1.3.tar.gz" when adding binary and data files.

The command '/bin/sh -c pyinstaller --onefile   --add-data="src/providers/aws/cloud/lambda/scarsupervisor.py:src/providers/aws/cloud/lambda"   --add-data="src/providers/aws/cloud/lambda/clients/apigateway.py:src/providers/aws/cloud/lambda/clients"   --add-data="src/providers/aws/cloud/lambda/clients/batch.py:src/providers/aws/cloud/lambda/clients"   --add-data="src/providers/aws/cloud/lambda/clients/lambdafunction.py:src/providers/aws/cloud/lambda/clients"   --add-data="src/providers/aws/cloud/lambda/clients/s3.py:src/providers/aws/cloud/lambda/clients"   --add-data="src/providers/aws/cloud/lambda/clients/udocker.py:src/providers/aws/cloud/lambda/clients"   --add-data="src/exceptions.py:src"   --add-data="src/utils.py:src"   --add-data="src/providers/aws/cloud/lambda/udocker/udocker-1.1.3.tar.gz:src/providers/aws/cloud/lambda/udocker"   --add-binary="udockerb:src/providers/aws/cloud/lambda/udocker"   --add-binary="/usr/bin/zip:src/bin"   --hidden-import=urllib3   --hidden-import=configparser   scar.py' returned a non-zero code: 1

from scar.

alpegon avatar alpegon commented on July 30, 2024

I created a branch called 'udocker-update' with the latest version of udocker.
This version solves the issue with alpine containers (at least the containers that I tested).
Please check the if branch works correctly with your containers.

from scar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.