bug: transient error TestRunner_RunEvent/GITHUB_STATE #923

Closed
opened 2025-09-01 10:25:50 +00:00 by earl-warren · 7 comments
Contributor
2025-09-15T15:28:45.4535532Z [service-container/service-container-test] [DEBUG] Starting container: b9c9a00810cb09a542e68dc336a0ac715275c5954804612270edf9f4ef55216c
2025-09-15T15:28:45.4535559Z [service-container/service-container-test] [DEBUG] Started container: b9c9a00810cb09a542e68dc336a0ac715275c5954804612270edf9f4ef55216c
2025-09-15T15:28:45.4535585Z [service-container/service-container-test] [DEBUG] Writing entry to tarball workflow/event.json len:2
2025-09-15T15:28:45.4535612Z [service-container/service-container-test] [DEBUG] Writing entry to tarball workflow/envs.txt len:0
2025-09-15T15:28:45.4535636Z [service-container/service-container-test] [DEBUG] Extracting content to '/var/run/act/'
2025-09-15T15:28:45.4535692Z ##[endgroup]
2025-09-15T15:28:45.4535717Z --- FAIL: TestRunner_RunEvent (517.43s)
2025-09-15T15:28:45.4535740Z     --- FAIL: TestRunner_RunEvent/GITHUB_STATE (2.62s)
2025-09-15T15:28:45.4535763Z         runner_test.go:211: 
2025-09-15T15:28:45.4535787Z             	Error Trace:	/home/debian/.cache/act/e56e3e646759b96e/hostexecutor/act/runner/runner_test.go:211
2025-09-15T15:28:45.4535813Z             	            				/home/debian/.cache/act/e56e3e646759b96e/hostexecutor/act/runner/runner_test.go:366
2025-09-15T15:28:45.4535838Z             	Error:      	Received unexpected error:
2025-09-15T15:28:45.4535863Z             	            	archive/tar: write too long
2025-09-15T15:28:45.4535886Z             	Test:       	TestRunner_RunEvent/GITHUB_STATE
2025-09-15T15:28:45.4535911Z             	Messages:   	/home/debian/.cache/act/e56e3e646759b96e/hostexecutor/act/runner/testdata/GITHUB_STATE
2025-09-15T15:28:45.4535978Z ##[group]shells/defaults
``` 2025-09-15T15:28:45.4535532Z [service-container/service-container-test] [DEBUG] Starting container: b9c9a00810cb09a542e68dc336a0ac715275c5954804612270edf9f4ef55216c 2025-09-15T15:28:45.4535559Z [service-container/service-container-test] [DEBUG] Started container: b9c9a00810cb09a542e68dc336a0ac715275c5954804612270edf9f4ef55216c 2025-09-15T15:28:45.4535585Z [service-container/service-container-test] [DEBUG] Writing entry to tarball workflow/event.json len:2 2025-09-15T15:28:45.4535612Z [service-container/service-container-test] [DEBUG] Writing entry to tarball workflow/envs.txt len:0 2025-09-15T15:28:45.4535636Z [service-container/service-container-test] [DEBUG] Extracting content to '/var/run/act/' 2025-09-15T15:28:45.4535692Z ##[endgroup] 2025-09-15T15:28:45.4535717Z --- FAIL: TestRunner_RunEvent (517.43s) 2025-09-15T15:28:45.4535740Z --- FAIL: TestRunner_RunEvent/GITHUB_STATE (2.62s) 2025-09-15T15:28:45.4535763Z runner_test.go:211: 2025-09-15T15:28:45.4535787Z Error Trace: /home/debian/.cache/act/e56e3e646759b96e/hostexecutor/act/runner/runner_test.go:211 2025-09-15T15:28:45.4535813Z /home/debian/.cache/act/e56e3e646759b96e/hostexecutor/act/runner/runner_test.go:366 2025-09-15T15:28:45.4535838Z Error: Received unexpected error: 2025-09-15T15:28:45.4535863Z archive/tar: write too long 2025-09-15T15:28:45.4535886Z Test: TestRunner_RunEvent/GITHUB_STATE 2025-09-15T15:28:45.4535911Z Messages: /home/debian/.cache/act/e56e3e646759b96e/hostexecutor/act/runner/testdata/GITHUB_STATE 2025-09-15T15:28:45.4535978Z ##[group]shells/defaults ```
Author
Contributor
https://code.forgejo.org/forgejo/runner/actions/runs/9543/jobs/2
Author
Contributor
https://code.forgejo.org/forgejo/runner/actions/runs/10036/jobs/2
Author
Contributor
https://code.forgejo.org/forgejo/runner/actions/runs/10248/jobs/2
Author
Contributor
No description provided.
Author
Contributor

github.com/golang/go@630799c6c9/src/archive/tar/writer.go (L480-L490)

func (tw *Writer) Write(b []byte) (int, error) {
	if tw.err != nil {
		return 0, tw.err
	}
	n, err := tw.curr.Write(b)
	if err != nil && err != ErrWriteTooLong {
		tw.err = err
	}
	return n, err
}

I'm not sure how that can happen but a similar error issue suggest it may be a race by which two goroutine are reading/writing the same file.

https://github.com/golang/go/blob/630799c6c957994a7720b5d0b6bdd10f3acfc605/src/archive/tar/writer.go#L480-L490 ```go func (tw *Writer) Write(b []byte) (int, error) { if tw.err != nil { return 0, tw.err } n, err := tw.curr.Write(b) if err != nil && err != ErrWriteTooLong { tw.err = err } return n, err } ``` I'm not sure how that can happen but [a similar error](https://github.com/goreleaser/goreleaser/issues/4024) issue suggest it may be a race by which two goroutine are reading/writing the same file.
Author
Contributor

The logs suggest part of the test is delayed and collides with another.

{workdir, "environment-files", "push", "", platforms, secrets},
{workdir, "GITHUB_STATE", "push", "", platforms, secrets},
{workdir, "environment-files-parser-bug", "push", "", platforms, secrets},

2025-10-03T07:32:27.2711202Z ##[group]GITHUB_STATE
==>> logs here
2025-10-03T07:32:27.2857918Z ##[endgroup]
2025-10-03T07:32:27.2858447Z ##[group]environment-files-parser-bug

This is where each and every log are expected and yet, in all cases, the error shows up a lot later, after:

2025-10-03T07:32:27.4789662Z ##[group]mysql-service-container-premature-terminate
...
2025-10-03T07:32:27.4801019Z ##[endgroup]

which is the last test to run.

{workdir, "mysql-service-container-premature-terminate", "push", "service [maindb]", platforms, secrets},

The logs suggest part of the test is delayed and collides with another. https://code.forgejo.org/forgejo/runner/src/commit/a980acd9369da246bfc8f72a6aa8992c3ab71feb/act/runner/runner_test.go#L299-L301 ``` 2025-10-03T07:32:27.2711202Z ##[group]GITHUB_STATE ==>> logs here 2025-10-03T07:32:27.2857918Z ##[endgroup] 2025-10-03T07:32:27.2858447Z ##[group]environment-files-parser-bug ``` This is where each and every log are expected and yet, in all cases, the error shows up a lot later, after: ``` 2025-10-03T07:32:27.4789662Z ##[group]mysql-service-container-premature-terminate ... 2025-10-03T07:32:27.4801019Z ##[endgroup] ``` which is the last test to run. https://code.forgejo.org/forgejo/runner/src/commit/a980acd9369da246bfc8f72a6aa8992c3ab71feb/act/runner/runner_test.go#L335
Member

Closing because I haven't seen this test failure in a long time.

Closing because I haven't seen this test failure in a long time.
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/runner#923
No description provided.