appleboy / appleboy/scp-action
tmp file conflict running two runners on the same host
- Dominant language
- Shell
- Stars
- 1.6k
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
Running three runners on the same host it seems that two of the runner which apparently finished almost at the same time run into an upload failure on both workflows. It seems the two workflows used the same tmp file name:
Runner 2
```
tar all files into /tmp/495458086/thELhqp4kO.tar
scp file to server.
create folder ***/6.0.dev20201***0/
untar file thELhqp4kO.tar
error: tar: Skipping to next header
tar: Exiting with failure status due to previous errors
drone-scp error: Process exited with status 2
drone-scp rollback: remove all target tmp file
remove file thELhqp4kO.tar
2020/12/20 19:45:29 Process exited with status 2
```
Runner 3
```
tar all files into /tmp/696865611/thELhqp4kO.tar
scp file to server.
create folder ***/6.0.dev20201***0/
untar file thELhqp4kO.tar
error: tar: thELhqp4kO.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
drone-scp error: Process exited with status 2
drone-scp rollback: remove all target tmp file
remove file thELhqp4kO.tar
2020/12/20 19:45:31 Process exited with status 2
```
How is the tmpfile name generated?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the runner creates the temporary archive and how scp transfers and extracts it, using the two concurrent runner logs as the reproduction case. Check whether concurrent runs can select the same archive name; done means simultaneous runners use independent temporary names and both uploads extract successfully without tar errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, shell
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100