System.IO.IOException: Invalid argument
See original GitHub issueDescribe the bug I am running a job inside a container. (SELF-hosted runner w/ GHES 3.2.6) However, very occasionally, a step randomly fail due to the following reason;
Error: Invalid argument
Here’s my workflow snippet;
- name: main; download frontend base model if exist
uses: CODE-Actions/download-artifact@v2
if: ${{ matrix.base != '' }}
with:
path: /tmp/INBOUND
name: tmp_frontend_${{ matrix.base }}.result
- name: temp; list of frontend test results
run: |
ls -ARl /tmp/INBOUND
shell: bash
To Reproduce Steps to reproduce the behavior:
- Go to ‘…’
- Run ‘…’
- See error
Expected behavior A clear and concise description of what you expected to happen.
Runner Version and Platform
- 2.284.0
OS of the machine running the runner? OSX/Windows/Linux/…
- Ubuntu 20.04.3 LTS
- Docker version 20.10.12, build e91ed57
What’s not working?
Please include error messages and screenshots.
Job Log Output
-
Another instance. Very simple listing directory command.
Runner and Worker’s Diagnostic Logs
(Editted. Log from the job named temp; list of frontend test results)
[2022-02-03 03:17:16Z INFO StepsRunner] Current state: job state = ''
[2022-02-03 03:17:16Z INFO StepsRunner] Processing step: DisplayName='temp; list of frontend test results'
[2022-02-03 03:17:16Z INFO StepsRunner] Evaluating: success()
[2022-02-03 03:17:16Z INFO StepsRunner] Result: true
[2022-02-03 03:17:16Z INFO StepsRunner] Starting the step.
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Bin': '/home/github/actions-runner/bin'
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Root': '/home/github/actions-runner'
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Work': '/home/github/actions-runner/_work'
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Temp': '/home/github/actions-runner/_work/_temp'
[2022-02-03 03:17:16Z INFO ActionRunner] Write event payload to /home/github/actions-runner/_work/_temp/_github_workflow/event.json
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Bin': '/home/github/actions-runner/bin'
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Root': '/home/github/actions-runner'
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Work': '/home/github/actions-runner/_work'
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Temp': '/home/github/actions-runner/_work/_temp'
[2022-02-03 03:17:16Z INFO ExtensionManager] Getting extensions for interface: 'GitHub.Runner.Worker.IFileCommandExtension'
[2022-02-03 03:17:16Z INFO ExtensionManager] Getting extensions for interface: 'GitHub.Runner.Worker.IActionCommandExtension'
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command internal-set-repo-path
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command set-env
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command set-output
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command save-state
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command add-path
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command add-mask
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command add-matcher
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command remove-matcher
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command warning
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command error
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command notice
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command debug
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command group
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command endgroup
[2022-02-03 03:17:16Z INFO ActionCommandManager] Register action command extension for command echo
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Bin': '/home/github/actions-runner/bin'
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Root': '/home/github/actions-runner'
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Work': '/home/github/actions-runner/_work'
[2022-02-03 03:17:16Z INFO HostContext] Well known directory 'Temp': '/home/github/actions-runner/_work/_temp'
[2022-02-03 03:17:16Z INFO ScriptHandler] Which: 'bash'
[2022-02-03 03:17:16Z INFO ScriptHandler] Location: '/usr/bin/bash'
[2022-02-03 03:17:16Z INFO HostContext] [2022-02-03 03:17:16Z ERR StepsRunner] Caught exception from step: System.IO.IOException: Invalid argument
at System.IO.FileStream.WriteNative(ReadOnlySpan`1 source)
at System.IO.FileStream.FlushWriteBuffer()
at System.IO.FileStream.Flush(Boolean flushToDisk)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.Diagnostics.TextWriterTraceListener.Flush()
at GitHub.Runner.Common.HostTraceListener.WriteHeader(String source, TraceEventType eventType, Int32 id)
at GitHub.Runner.Common.HostTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message)
at GitHub.Runner.Common.HostContext.GetDirectory(WellKnownDirectory directory)
at GitHub.Runner.Common.HostContext.GetDirectory(WellKnownDirectory directory)
at GitHub.Runner.Common.HostContext.GetDirectory(WellKnownDirectory directory)
at GitHub.Runner.Worker.Handlers.ContainerStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, CancellationToken cancellationToken)
at GitHub.Runner.Worker.Handlers.ScriptHandler.RunAsync(ActionRunStage stage)
at GitHub.Runner.Worker.ActionRunner.RunAsync()
at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
[2022-02-03 03:17:16Z INFO StepsRunner] Step result: Failed
[2022-02-03 03:17:16Z INFO StepsRunner] Update job result with current step result 'Failed'.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
System.IO.IOException : Invalid argument, when trying to ...
The file gets in fine and if I debug in Visual Studio I can see that it's the correct file that's being sent...
Read more >java.io.IOException: invalid argument
I'm new to Katalon and downloaded some test cases that someone else had made, however I can't seem to run any of them....
Read more >Invalid argument, when trying to save FormFile in web api-.net ...
[Solved]-System.IO.IOException : Invalid argument, when trying to save FormFile in web api-.net-core ... firstly, try to use async version of copyto method -> ......
Read more >What went wrong: java.io.IOException: Invalid argument
Had this issue myself, the solution is to either rename whatever is in non-English to English or just move project folder.
Read more >SERVER STARTUP HANGS WITH JAVA.IO.IOEXCEPTION
It appears to hang and eventually times out. The exception "java.io.IOException: Invalid argument at sun.nio.ch.DevPollArrayWrapper.poll0" is seen in FFDC. The ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @nikola-jokic I’ll reopen this ticket once we can collect the logs. Thank you for your update.
@nikola-jokic Thank you for the feedback. I’ll prepare example workflows soon.
So far… I have 5 failures out of 3,000 jobs. Looks like there is no easy reproducible scenarios. It does not occur only in a specific step, but occurs randomly in several places.