Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

var/task/bootstrap: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /var/task/bootstrap) #581

Open
salmanmeraji opened this issue Jan 17, 2025 · 0 comments

Comments

@salmanmeraji
Copy link

Hi There

We have a lambda function written in go with Amazon linux 2 runtime set to autoupdate. the app is getting built by a github action workflow as follow :

name: DBUpdateScript

on:
  push:
    branches: [ 'master']
    paths: [
      'apps/go/cmd/db-update/**',
      "build.json",
      ".github/workflows/lambda-dbupdate.yml"
    ]

concurrency:
  group: db-update-${{ github.ref }}
  cancel-in-progress: true

permissions:
  id-token: write
  contents: read

jobs:
  deploy:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [10.x]
    steps:
      - uses: actions/checkout@master
        with:
          fetch-depth: 0
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - name: Install Dependencies for AWS CLI
        run: npm install

      - name: Install Python for SAM
        uses: actions/setup-python@v2

      # https://aws.amazon.com/serverless/sam/
      - name: Install Sam CLI  
        uses: aws-actions/setup-sam@v2

      - name: Configure AWS credentials
        uses: aws-actions/configure-aws-credentials@v1-node16
        with:
          aws-region: us-east-1
          role-to-assume: ${{ secrets.AWS_GITHUB_ROLE}}
          role-session-name: githubactionsession

      - name: build container for Serverless Application Model (SAM)
        run: |
          GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -tags lambda.norpc -o bootstrap apps/go/cmd/db-update/main.go
          cp bootstrap apps/go/cmd/db-update/bootstrap
          cd apps/go/cmd/db-update 
          sam build
          sam validate --lint
          sam deploy --no-fail-on-empty-changeset

The issue is that the lambda keeps throwing this error since Jan 7th. These are errors collected from cloudwatch

/var/task/bootstrap: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /var/task/bootstrap)
/var/task/bootstrap: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /var/task/bootstrap)
INIT_REPORT Init Duration: 8.16 ms	Phase: init	Status: error	Error Type: Runtime.ExitError
/var/task/bootstrap: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /var/task/bootstrap)
/var/task/bootstrap: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /var/task/bootstrap)
INIT_REPORT Init Duration: 6.87 ms	Phase: invoke	Status: error	Error Type: Runtime.ExitError
START RequestId: 43a36fac-5a91-4f43-9cee-494187ca0ac1 Version: $LATEST
RequestId: 43a36fac-5a91-4f43-9cee-494187ca0ac1 Error: Runtime exited with error: exit status 1
Runtime.ExitError
END RequestId: 43a36fac-5a91-4f43-9cee-494187ca0ac1
REPORT RequestId: 43a36fac-5a91-4f43-9cee-494187ca0ac1	Duration: 8.18 ms	Billed Duration: 9 ms	Memory Size: 512 MB	Max Memory Used: 3 MB	

That said, the lambda code and workflow have been working fine until a week ago and no one has touched the code. Could someone please give me some advice in this regard? I have tried spinning up a new lambda and also packaging glibc v2.34 and adding as a new layer to the lambda but none of them worked. according to my research for the most cases the issue was resolved once people have changed CGO_ENABLED to 0 but in my case CGO_ENABLED=0 has been set to 0 from day 0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant