setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

"'GLIBC_2.38' not found" when installing Python 3.10 on container derived from `python:3.10-slim`

Open lpascal-ledger opened this issue 10 months ago • 8 comments

Hello there 👋 Thanks for the action, very useful! We've encountered a strange bug today:

Description:

We're using setup-python in a matrix to test our product on several Python versions.

The tests were running in a container derived from python:3.9-slim, where we previously installed all our tools. We were running tests with Python 3.8, 3.9, 3.10 and 3.11 and all was working fine.

Today we updated this image to python:3.10-slim, but now when we setup Python 3.10, python crashes when invoked.

Our tests also run with Python 3.11 setup which does not trigger this issue.

Action version:

actions/setup-python@v5

Platform:

  • [X] Ubuntu
  • [ ] macOS
  • [ ] Windows

Runner type:

  • [X] Hosted
  • [ ] Self-hosted

Tools version:

Repro steps:

I've tried and cornered the issue in the following workflow which triggers the bug:

name: Debug
on:
  workflow_dispatch:
  push:

jobs:
  not_working:
    runs-on: ubuntu-latest
    container:
      image: python:3.10-slim
    steps:
      - uses: actions/setup-python@v5
        with:
          python-version: "3.10"
      - run: python

An example of this failing workflow can be found here.

Expected behavior:

Python can be invoked without error.

Actual behavior:

When invoked, python crashes with the following errors:

python: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /__t/Python/3.10.16/x64/lib/libpython3.10.so.1.0)
python: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /__t/Python/3.10.16/x64/lib/libpython3.10.so.1.0)
Error: Process completed with exit code 1.

lpascal-ledger avatar Jan 22 '25 13:01 lpascal-ledger

Hello @lpascal-ledger👋, Thank you for reporting this issue. We will investigate it and get back to you as soon as we have some feedback.

priya-kinthali avatar Jan 22 '25 13:01 priya-kinthali

We are getting something that looks alot like this, but this occurs when running with ubuntu-latest with a debian bookworm based image. When setting the machines to ubuntu-22.04 the issue is not present.

mbrsamsung avatar Jan 28 '25 10:01 mbrsamsung

Hi @lpascal-ledger,

As the GLIBC library and other packages and tools have been removed from Ubuntu 24 due to maintenance and efforts to reduce the image size, we suggest using Ubuntu 22 or Ubuntu 20 runners to resolve this issue.

Please find the updated workflow and a screenshot for your reference:

name: Debug

on:
  workflow_dispatch:
  push:

jobs:
  not_working:
    runs-on: ubuntu-22.04
    container:
      image: python:3.10-slim
    steps:
      - uses: actions/setup-python@v5
        with:
          python-version: "3.10"
      - run: python

Image

Thank you for your understanding. Please feel free to reach out if you have any further concerns or need additional clarification!

lmvysakh avatar Feb 07 '25 06:02 lmvysakh

Hi! I recently experienced the same issue. Is there a long term plan for this or do we have to roll back to Ubuntu 22? Thanks for the help!

RemDelaporteMathurin avatar Feb 10 '25 17:02 RemDelaporteMathurin

Hy @lpascal-ledger,

Our initial investigation was conducted on GitHub Hosted Ubuntu runners, and we found no discrepancies related to glibc with the Ubuntu 20 and 22 runners.

Since the Ubuntu 20 and 22 runners are operating correctly, the issue might be specific to the Ubuntu 24 runner. Therefore, we are transferring this issue to the runner images team.

lmvysakh avatar Feb 25 '25 12:02 lmvysakh

Hi @lpascal-ledger , Thank you for bringing this issue to our attention. We will look into this issue and will update you after investigating.


vidyasagarnimmagaddi avatar Feb 26 '25 13:02 vidyasagarnimmagaddi

Hi @lpascal-ledger,

Thank you for bringing up this issue and providing a detailed description. I noticed that for the Ubuntu runner image 22.04, it uses glibc 2.35, and the corresponding container image also has glibc 2.35. However, for the Ubuntu runner image 24.04, it uses glibc 2.39, but the container image still has glibc 2.36. This mismatch creates a discrepancy for Ubuntu 24.04, leading to errors.

Following are the screenshots showing glibc version used by Ubuntu 20, 22 and 24 runners.

Image Image Image

The Python binary for setup-actions is selected based on the runner OS. In your case, you are trying to run this on a container image that has a lower version of glibc. I recommend raising an issue in the Python images repository to update the glibc of the container image to match it with the runner image.

You can raise the ticket in the following repository: https://github.com/docker-library/python/tree/master/3.10/slim-bullseye

lmvysakh avatar Mar 11 '25 05:03 lmvysakh

Hello @lpascal-ledger,

Just a gentle reminder! Could you please let us know if there are any updates from your side regarding this issue?

Thank you!

lmvysakh avatar Mar 24 '25 10:03 lmvysakh

Hello @lpascal-ledger,

As we have suggested earlier, please raise a support ticket for further assistance with this issue. Since there is nothing pending from our end, we are closing this issue now.

Thank you for your understanding and cooperation.

lmvysakh avatar Apr 01 '25 06:04 lmvysakh