Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

v1.0.2 requires a version of glibc that is not available on the current 'ubuntu-latest' Github runner #44

Closed
shabino opened this issue Nov 28, 2022 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@shabino
Copy link

shabino commented Nov 28, 2022

Reproduction steps:

  1. Create a Github workflow with a job running on ubuntu-latest
  2. Install the gh-actions-cache as a step in this job
  3. Executegh actions-cache list

Expected behavior: My caches are listed.

Actual behavior:

/home/runner/.local/share/gh/extensions/gh-actions-cache/gh-actions-cache: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/runner/.local/share/gh/extensions/gh-actions-cache/gh-actions-cache)
/home/runner/.local/share/gh/extensions/gh-actions-cache/gh-actions-cache: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/runner/.local/share/gh/extensions/gh-actions-cache/gh-actions-cache)

Workaround:

I changed my job to use the ubuntu-22.04 runner explicitly, and the problem resolved. It does seem that Github-provided extensions should work on the default runners though.

Commentary:

It looks like Github is updating ubuntu-latest to 22.04 slowly:

https://github.blog/changelog/2022-11-09-github-actions-ubuntu-latest-workflows-will-use-ubuntu-22-04/

My repo has not yet been updated yet, but the gh-actions-cache repo has (see OS info within):

https://github.com/actions/gh-actions-cache/actions/runs/3567634871/jobs/5995563551

I suspect that the change to the glibc required version might be due to v1.0.2 being compiled on 22.04 while v1.01 likely was compiled on 20.04. A blog entry I found (note that I'm not a Go developer and can't evaluate this):

https://utcc.utoronto.ca/~cks/space/blog/programming/GoAndGlibcVersioning

Diagnostics:

I did my best to collect useful information below. However, I'm outside of my areas of expertise here, so please correct me!

v1.0.2 seemingly was compiled to require a newer version (2.3.2/2.3.4) of glibc (for some additional functions?) than was required by v1.0.1. This was problematic for us because the "ubuntu-latest" Github runner image is ubuntu-20.04 which supplies 2.3.1:

https://launchpad.net/ubuntu/focal/+source/glibc

Ubuntu 22.04 supplies version 2.3.5:

https://launchpad.net/ubuntu/jammy/+source/glibc

Output from my dev machine (against v1.0.1):

mybox:~/.local/share/gh/extensions/gh-actions-cache$ objdump -T gh-actions-cache

gh-actions-cache:     file format elf64-x86-64

DYNAMIC SYMBOL TABLE:
00000000005ea660 g    DF .text  0000000000000063  Base        crosscall2
00000000005ea620 g    DF .text  0000000000000037  Base        _cgo_panic
0000000000464760 g    DF .text  0000000000000019  Base        _cgo_topofstack
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) __errno_location
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) getaddrinfo
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) freeaddrinfo
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) gai_strerror
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) stderr
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) fwrite
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.3.4) __vfprintf_chk
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) fputc
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) abort
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_mutex_lock
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.3.2) pthread_cond_wait
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_mutex_unlock
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.4)  __stack_chk_fail
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.3.2) pthread_cond_broadcast
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_create
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) nanosleep
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_detach
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) strerror
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.3.4) __fprintf_chk
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) free
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) malloc
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_attr_init
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_attr_getstacksize
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_attr_destroy
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) sigfillset
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_sigmask
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) mmap
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) munmap
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) setenv
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) unsetenv
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) sigemptyset
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) sigaddset
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) sigaction
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) sigismember

Output from my dev machine (against 1.0.2):

mybox:~/.local/share/gh/extensions/gh-actions-cache$ objdump -T gh-actions-cache

gh-actions-cache:     file format elf64-x86-64

DYNAMIC SYMBOL TABLE:
00000000005eac40 g    DF .text  0000000000000063  Base        crosscall2
00000000005eac00 g    DF .text  0000000000000037  Base        _cgo_panic
00000000004647a0 g    DF .text  0000000000000019  Base        _cgo_topofstack
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) __errno_location
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) getaddrinfo
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) freeaddrinfo
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) gai_strerror
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) stderr
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) fwrite
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.3.4) __vfprintf_chk
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) fputc
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) abort
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_mutex_lock
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.3.2) pthread_cond_wait
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_mutex_unlock
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.4)  __stack_chk_fail
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.3.2) pthread_cond_broadcast
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.34) pthread_create
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) nanosleep
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.34) pthread_detach
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) strerror
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.3.4) __fprintf_chk
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) free
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) malloc
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_attr_init
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.34) pthread_attr_getstacksize
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) pthread_attr_destroy
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) sigfillset
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.32) pthread_sigmask
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) mmap
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) munmap
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) setenv
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) unsetenv
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) sigemptyset
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) sigaddset
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) sigaction
0000000000000000      DO *UND*  0000000000000000 (GLIBC_2.2.5) sigismember

It appears that the version of glibc required for certain function invocations (pthread_create, etc.) increased in v1.0.2.

@shabino shabino added the bug Something isn't working label Nov 28, 2022
@cefn
Copy link

cefn commented Nov 30, 2022

I am experiencing the same issue I think. Command as below. Is there a workaround? Neither of these are available to install via homebrew. I would be happy to run an older version if I can work out how to get it via the magic extension management mechanism. My development environment is based on Debian Buster so I can't containerise my way out of it.

$ gh actions-cache list
/home/cefn/.local/share/gh/extensions/gh-actions-cache/gh-actions-cache: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/cefn/.local/share/gh/extensions/gh-actions-cache/gh-actions-cache)
/home/cefn/.local/share/gh/extensions/gh-actions-cache/gh-actions-cache: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/cefn/.local/share/gh/extensions/gh-actions-cache/gh-actions-cache)

@shabino
Copy link
Author

shabino commented Nov 30, 2022

@cefn gh extension install actions/gh-actions-cache --pin v1.0.1 will let you use the older version. I think you have to remove the currently installed version first.

@t-dedah
Copy link
Contributor

t-dedah commented Dec 1, 2022

Hi @shabino @cefn We are investigating this and will be back with more details soon.

@t-dedah
Copy link
Contributor

t-dedah commented Dec 1, 2022

Hi @shabino your theory is correct. The cause for the issue is major changes from ubuntu-20 to ubuntu-22. ubuntu-latest should be now pointing to 22, can you confirm that for your runners?

@cefn
Copy link

cefn commented Dec 1, 2022

Unfortunately attempting to install the prior version is non-functional with the suggested command, or a commit-based equivalent...

$ gh extension install actions/gh-actions-cache --pin v1.01
X Could not find a release of actions/gh-actions-cache for v1.01
gh extension install actions/gh-actions-cache --pin 235994ccc5ee58fffe93fd6543733fb792d67492
X Could not find a release of actions/gh-actions-cache for 235994ccc5ee58fffe93fd6543733fb792d67492

As an alternative I completed the following which resolved the issue.

brew install gh
git clone git@github.com:actions/gh-actions-cache.git
cd gh-actions-cache/
git checkout v1.0.1
brew install go
go build
gh extension install .

@shabino
Copy link
Author

shabino commented Dec 1, 2022

@t-dedah our ubuntu-latest runners still are on 20.04

@zaknafeyn
Copy link

gh extension install actions/gh-actions-cache --pin v1.01

The version is 1.0.1 (not 1.01)
It works for me if I install extension like this:
gh extension install actions/gh-actions-cache --pin v1.0.1

@t-dedah
Copy link
Contributor

t-dedah commented Dec 16, 2022

Hi @shabino are you still facing this issue with ubuntu-latest?

@shabino
Copy link
Author

shabino commented Dec 28, 2022

@t-dedah Our ubuntu-latest is now 22.04.1, so this isn't an issue for us anymore. However, others stuck on older Linux distros will still have to pin to version 1.0.1.

@t-dedah
Copy link
Contributor

t-dedah commented Jan 5, 2023

That's great @shabino. Yes, people with their self-hosted runners with older ubuntu versions will be stuck with v1.0.1. We will look if we can support older OS versions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants