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

Actions stuck on "Job is about to start running on the hosted runner" for hours #1819

Closed
dimanlm opened this issue Apr 11, 2022 · 12 comments
Closed
Assignees
Labels
bug Something isn't working Runner Bug Bug fix scope to the runner

Comments

@dimanlm
Copy link

dimanlm commented Apr 11, 2022

Describe the bug
Ubuntu latest actions get stuck on "Job is about to start running on the hosted runner: Hosted Agent (hosted)". Usually after 3 hours it says if the build passed or not.
This problem started after I added more tests to my project (NodeJS - Jest)

To Reproduce
Steps to reproduce the behavior:

  1. Push a new commit
  2. Run "Actions"
  3. See error

Expected behavior
There are 24 tests, and usually it takes 15 seconds (maximum) to run them locally.

Runner Version and Platform

Version of your runner? Ubuntu-latest

Jobs in the workflow:

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [16.x] 
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v2
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    
    - name: Install Node dependencies
      run: npm i

    - name: Run unit and integration tests
      run: npm test

    - name: SonarCloud scan
      uses: sonarsource/sonarcloud-github-action@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

What's not working?

image
image
image
"Run unit and integration tests" final log:
image

Job Log Output

image

@dimanlm dimanlm added the bug Something isn't working label Apr 11, 2022
@nikola-jokic
Copy link
Member

Hi @dimanlm, thanks for submitting this issue.

Could you please provide _diag file so we can investigate what is causing this issue?

@nikola-jokic nikola-jokic added the Runner Bug Bug fix scope to the runner label Apr 11, 2022
@nikola-jokic nikola-jokic self-assigned this Apr 11, 2022
@dimanlm
Copy link
Author

dimanlm commented Apr 11, 2022

Hello @nikola-jokic, thank you for your answer.

I suppose _diag file is generated on self-hosted runners. That's not my case, so I attach you the logs that I could download from the last run.
pipeline_log.txt
logs_42(1).zip

@lithiumtoast
Copy link

Hey @dimanlm,

I had the same issue. I was able to use ubuntu-18.04 instead of ubuntu-latest which then I could get my workflow running.

@dimanlm
Copy link
Author

dimanlm commented Apr 14, 2022

Hey @dimanlm,

I had the same issue. I was able to use ubuntu-18.04 instead of ubuntu-latest which then I could get my workflow running.

Hi @lithiumtoast ,

Thank you for your reply. I found out that open handles after jest tests were causing Github Actions runner to be blocked at this step waiting for the timeout. Those open handles were left by mongoose (mongoose.connect and .connection.close()). To fix this issue, I created a test-teardown-globals.js file, as suggested on this thread: ladjs/supertest#520 (comment)
I will keep your suggestion to put ubuntu-18.4 in my workflow though :)

@dimanlm dimanlm closed this as completed Apr 14, 2022
@darius-sas
Copy link

In my case the problem was that the server running the self-hosted runner ran out of space (full of docker images!).
Maybe this is useful to someone.

@subooom
Copy link

subooom commented Dec 31, 2022

Hey, I initially created the directory under /home/ubuntu and it was all working. I later decided to move the directory to /var/www/html and it stopped working.

Waiting for a runner to pick up this job...

@jscherb1
Copy link

@darius-sas - how did you identify the server was full of docker images? And what did you do to remove those images?

@darius-sas
Copy link

@darius-sas - how did you identify the server was full of docker images? And what did you do to remove those images?

Just out of luck actually...

You can use docker system prune to remove all unused images and containers! You can Google yourself how to remove old images

@therealdwright
Copy link

I have experienced this issue since the closure of this issue as recently as 20 minutes ago.

@roskelleycj
Copy link

I have experienced this issue since the closure of this issue as recently as 20 minutes ago.

Ditto, just 30m ago this issue has occurred. And https://www.githubstatus.com/ shows no issues.

Seems like an issue in the GitHub Action infrastructure.

@nasirky
Copy link

nasirky commented Jul 4, 2023

It is currently happening for us as well on certain workflows (we are using self-hosted runners)

@qpwo
Copy link

qpwo commented Jul 7, 2023

My whole host machine gets totally frozen every day or two and i have to hard reboot it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Runner Bug Bug fix scope to the runner
Projects
None yet
Development

No branches or pull requests

10 participants