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

Bug: action hangs #912

Open
1 of 2 tasks
weirdan opened this issue Feb 5, 2025 · 5 comments
Open
1 of 2 tasks

Bug: action hangs #912

weirdan opened this issue Feb 5, 2025 · 5 comments
Assignees
Labels
awaiting-release Added/Fixed and tested, awaiting release bug Something isn't working self-hosted

Comments

@weirdan
Copy link

weirdan commented Feb 5, 2025

Describe the bug

The action gets stuck after ==> Setup Tools message

Version

  • v2
  • v1

Runners

Self Hosted

Operating systems

Ubuntu 22.04.4 LTS

PHP versions

I'm installing PHP 8.0

To Reproduce

      - uses: shivammathur/setup-php@verbose
        with:
          php-version: '8.0'
          extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, dom, filter, gd, iconv, json, mbstring, pdo, imagick, xdebug, redis
        env:
          update: true
          runner: self-hosted

Expected behavior

The action should not hang

Screenshots/Logs

==> Setup PHP
Repository ondrej/php already exists
[apt-fast 10:57:56]
[apt-fast 10:57:56]Working... this may take a while.
Reading package lists...
Building dependency tree...
Reading state information...
php8.0-cgi is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
php8.0-cli is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
php8.0-curl is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
php8.0-dev is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
php8.0-fpm is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
php8.0-intl is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
php8.0-mbstring is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
php8.0-mysql is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
php8.0-opcache is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
php8.0-pgsql is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
php8.0-xml is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
php8.0-zip is already the newest version (1:8.0.30-12+ubuntu22.04.1+deb.sury.org+1).
0 upgraded, 0 newly installed, 0 to remove and 62 not upgraded.
update-alternatives: error: no alternatives for php-fpm
✓ xml Enabled
✓ php-config Added php-config 
✓ PECL Added PECL 1.10.12
date.timezone=UTC
memory_limit=-1
xdebug.mode=coverage
opcache.enable=1
opcache.jit_buffer_size=256M
opcache.jit=1235
php-version=8.0.30
✓ PHP Found PHP 8.0.30
==> Setup Extensions
✓ mbstring Enabled
✓ xml Enabled
✓ ctype Enabled
✓ iconv Enabled
✓ intl Enabled
✓ pdo_sqlite Enabled
✓ dom Enabled
✓ filter Enabled
✓ gd Enabled
✓ iconv Enabled
✓ json Enabled
✓ mbstring Enabled
✓ pdo Enabled
✓ imagick Enabled
✓ xdebug Enabled
✓ redis Enabled
==> Setup Tools

Additional context

Refs #904 (comment)

Seems to be the same as #904

Disabling tools installation completely (tools: none) allows the action to be completed.

Are you willing to submit a PR?

No

@weirdan weirdan added the bug Something isn't working label Feb 5, 2025
@shivammathur
Copy link
Owner

@weirdan
Copy link
Author

weirdan commented Feb 5, 2025

@shivammathur yes. GH runner runs under ubuntu user who is in the sudo group. I also confirmed it by logging in under that user and running sudo -Es - it dropped me into root shell and did not ask for a password.

@shivammathur
Copy link
Owner

shivammathur commented Feb 5, 2025

@weirdan
Please run your workflow with the more-verbose branch and provide me the logs

- uses: shivammathur/setup-php@more-verbose
  with:
    php-version: '8.0'
    extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, dom, filter, gd, iconv, json, mbstring, pdo, imagick, xdebug, redis
  env:
    update: true
    runner: self-hosted

@weirdan
Copy link
Author

weirdan commented Feb 5, 2025

It looped, seemingly forever, outputting

++ sudo mkdir /usr/local/bin/composer.lock
++ sleep 1
++ sudo mkdir /usr/local/bin/composer.lock
++ sleep 1
++ sudo mkdir /usr/local/bin/composer.lock
++ sleep 1
....

The directory existed, was empty and was owned by root, created yesterday (that's when the problem appeared).

Cancelling all workflows, removing that directory and restarting the job fixed the issue for me.

Let me know if you need more logs.

Thanks for you help, @shivammathur

@shivammathur
Copy link
Owner

shivammathur commented Feb 5, 2025

89a5bff should fix this, so it does not happen again.

@shivammathur shivammathur added awaiting-release Added/Fixed and tested, awaiting release self-hosted labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-release Added/Fixed and tested, awaiting release bug Something isn't working self-hosted
Projects
None yet
Development

No branches or pull requests

3 participants
@weirdan @shivammathur and others