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] Script has finished with exit code 'null' #16

Open
david-allison opened this issue Feb 28, 2023 · 5 comments
Open

[BUG] Script has finished with exit code 'null' #16

david-allison opened this issue Feb 28, 2023 · 5 comments

Comments

@david-allison
Copy link

david-allison commented Feb 28, 2023

The script is occasionally flaky, resulting in Script has finished with exit code 'null'. Can't reproduce.

YAML

    steps:
      - name: Configure Windows Pagefile
        uses: al-cheb/[email protected]
        if: matrix.os == 'windows-latest'
        with:
          minimum-size: 8GB
          maximum-size: 12GB
          disk-root: "D:"

https://github.com/ankidroid/Anki-Android/blob/8e683f4919d80a541fa10eeb9ea4cfc17d451322/.github/workflows/tests_unit.yml#L55-L62

Full Log

2023-02-28T10:59:09.5259190Z Requested labels: windows-latest
2023-02-28T10:59:09.5259238Z Job defined at: ankidroid/Anki-Android/.github/workflows/tests_unit.yml@refs/pull/13362/merge
2023-02-28T10:59:09.5259277Z Waiting for a runner to pick up this job...
2023-02-28T10:59:12.0206863Z Job is waiting for a hosted runner to come online.
2023-02-28T10:59:23.6478195Z Job is about to start running on the hosted runner: GitHub Actions 8 (hosted)
2023-02-28T10:59:28.7869602Z Current runner version: '2.301.1'
2023-02-28T10:59:28.7894844Z ##[group]Operating System
2023-02-28T10:59:28.7895432Z Microsoft Windows Server 2022
2023-02-28T10:59:28.7895698Z 10.0.20348
2023-02-28T10:59:28.7895980Z Datacenter
2023-02-28T10:59:28.7896303Z ##[endgroup]
2023-02-28T10:59:28.7896547Z ##[group]Runner Image
2023-02-28T10:59:28.7896859Z Image: windows-2022
2023-02-28T10:59:28.7897160Z Version: 20230219.1
2023-02-28T10:59:28.7897586Z Included Software: https://github.com/actions/runner-images/blob/win22/20230219.1/images/win/Windows2022-Readme.md
2023-02-28T10:59:28.7898189Z Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20230219.1
2023-02-28T10:59:28.7898591Z ##[endgroup]
2023-02-28T10:59:28.7898862Z ##[group]Runner Image Provisioner
2023-02-28T10:59:28.7899175Z 2.0.117.1
2023-02-28T10:59:28.7899434Z ##[endgroup]
2023-02-28T10:59:28.7900302Z ##[group]GITHUB_TOKEN Permissions
2023-02-28T10:59:28.7900905Z Actions: read
2023-02-28T10:59:28.7901316Z Checks: read
2023-02-28T10:59:28.7901605Z Contents: read
2023-02-28T10:59:28.7901916Z Deployments: read
2023-02-28T10:59:28.7902194Z Discussions: read
2023-02-28T10:59:28.7902490Z Issues: read
2023-02-28T10:59:28.7902725Z Metadata: read
2023-02-28T10:59:28.7903004Z Packages: read
2023-02-28T10:59:28.7903299Z Pages: read
2023-02-28T10:59:28.7903544Z PullRequests: read
2023-02-28T10:59:28.7903872Z RepositoryProjects: read
2023-02-28T10:59:28.7904193Z SecurityEvents: read
2023-02-28T10:59:28.7904448Z Statuses: read
2023-02-28T10:59:28.7904750Z ##[endgroup]
2023-02-28T10:59:28.7908165Z Secret source: Dependabot
2023-02-28T10:59:28.7908599Z Prepare workflow directory
2023-02-28T10:59:28.8643251Z Prepare all required actions
2023-02-28T10:59:28.8823863Z Getting action download info
2023-02-28T10:59:29.1963246Z Download action repository 'al-cheb/[email protected]' (SHA:86589fd789a4de3e62ba628dda2cb10027b66d67)
2023-02-28T10:59:29.5668516Z Download action repository 'actions/checkout@v3' (SHA:ac593985615ec2ede58e132d2e21d2b1cbd6127c)
2023-02-28T10:59:29.7909503Z Download action repository 'actions/setup-java@v3' (SHA:3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98)
2023-02-28T10:59:30.0675052Z Download action repository 'gradle/gradle-build-action@v2' (SHA:6095a76664413da4c8c134ee32e8a8ae900f0f1f)
2023-02-28T10:59:30.3432239Z Download action repository 'nick-invision/retry@v2' (SHA:943e742917ac94714d2f408a0e8320f2d1fcafcd)
2023-02-28T10:59:30.5630534Z Download action repository 'codecov/codecov-action@v3' (SHA:d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70)
2023-02-28T10:59:30.9270109Z Complete job name: JUnit Tests (windows-latest, legacy_schema = true)
2023-02-28T10:59:31.2267941Z ##[group]Run al-cheb/[email protected]
2023-02-28T10:59:31.2268401Z with:
2023-02-28T10:59:31.2268599Z   minimum-size: 8GB
2023-02-28T10:59:31.2268821Z   maximum-size: 12GB
2023-02-28T10:59:31.2269078Z   disk-root: D:
2023-02-28T10:59:31.2269324Z ##[endgroup]
2023-02-28T11:01:34.1796242Z Pagefile configuration:
2023-02-28T11:01:34.1797081Z - Minimum size: 8GB
2023-02-28T11:01:34.1797380Z - Maximum size: 12GB
2023-02-28T11:01:34.1797614Z - Disk root: D:
2023-02-28T11:02:35.5089245Z 
2023-02-28T11:02:35.5131573Z ##[error]Script has finished with exit code 'null'
2023-02-28T11:02:38.3040142Z Cleaning up orphan processes
2023-02-28T11:02:39.2514995Z Terminate orphan process: pid (5564) (csc)

https://github.com/ankidroid/Anki-Android/actions/runs/4292215431/jobs/7478378622 (Feb 28 2023, 11:02 UTC)

Other instances (no logs)

@gciatto
Copy link

gciatto commented May 26, 2023

Any news here?

I'm getting the same issue

@DanySK
Copy link

DanySK commented May 26, 2023

Same issue here

@armanbilge
Copy link

The error is thrown on this line:

if (scriptResult.status !== 0) { throw new Error(`Script has finished with exit code '${scriptResult.status}'`) }

The status comes from the script invocation here:

const scriptResult = child.spawnSync("powershell", [scriptPath, ...scriptArguments], {
timeout: 60 * 1000
});

According to Node.js docs this can occur when the process is terminated by a signal.

status <number> | <null> The exit code of the subprocess, or null if the subprocess terminated due to a signal.

https://nodejs.org/api/child_process.html#child_processspawnsynccommand-args-options

I suspect this would be happening due to the configured 60-second timeout sending a cancelation signal. This is supported by our instance of the failure.

Screen Shot 2023-05-28 at 8 20 44 PM

https://github.com/typelevel/cats-effect/actions/runs/5103462698/jobs/9179188983?pr=3605#step:19:16

Therefore I propose to increase the timeout.

@armanbilge
Copy link

@armanbilge
Copy link

Ah, seems there was already a PR for that 😅

lazka added a commit to msys2/MINGW-packages that referenced this issue Jul 30, 2023
it can time out and we don't need it for all jobs, so just
allow errors for now.

See al-cheb/configure-pagefile-action#16
lazka added a commit to msys2/MSYS2-packages that referenced this issue Jul 30, 2023
it can time out and we don't need it for all jobs, so just
allow errors for now.

See al-cheb/configure-pagefile-action#16
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

Successfully merging a pull request may close this issue.

4 participants