maennchen / ZipStream-PHP

:floppy_disk: PHP ZIP Streaming Library
https://maennchen.dev/ZipStream-PHP/
MIT License
1.74k stars 104 forks source link

CI no space left on device #271

Closed maennchen closed 1 year ago

maennchen commented 1 year ago

ZipStream-PHP version

main

PHP version

*

Constraints for Bug Report

Summary

The GitLab Actions that run PHPUnit currently crash because they run out of disk space.

Current behavior

https://github.com/maennchen/ZipStream-PHP/actions/runs/5344154678

System.IO.IOException: No space left on device : '/home/runner/runners/2.305.0/_diag/Worker_20230622-095832-utc.log'
   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
   at System.IO.Strategies.BufferedFileStreamStrategy.FlushWrite()
   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.Worker.Worker.RunAsync(String pipeIn, String pipeOut)
   at GitHub.Runner.Worker.Program.MainAsync(IHostContext context, String[] args)
System.IO.IOException: No space left on device : '/home/runner/runners/2.305.0/_diag/Worker_20230622-095832-utc.log'
   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
   at System.IO.Strategies.BufferedFileStreamStrategy.FlushWrite()
   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.Tracing.Error(Exception exception)
   at GitHub.Runner.Worker.Program.MainAsync(IHostContext context, String[] args)
Unhandled exception. System.IO.IOException: No space left on device : '/home/runner/runners/2.305.0/_diag/Worker_20230622-095832-utc.log'
   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
   at System.IO.Strategies.BufferedFileStreamStrategy.FlushWrite()
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   at System.Diagnostics.TextWriterTraceListener.Flush()
   at System.Diagnostics.TraceSource.Flush()
   at GitHub.Runner.Common.TraceManager.Dispose(Boolean disposing)
   at GitHub.Runner.Common.TraceManager.Dispose()
   at GitHub.Runner.Common.HostContext.Dispose(Boolean disposing)
   at GitHub.Runner.Common.HostContext.Dispose()
   at GitHub.Runner.Worker.Program.Main(String[] args)

How to reproduce

Run actions on main.

Expected behavior

Passing tests

NicolasCARPi commented 1 year ago

Cache size issue? I used to have this in my CI: https://github.com/elabftw/elabimg/blob/4afbf8b237dbda3ed3901cc97cdb96f2e4382a2a/.github/workflows/build_hypernext.yaml#L67-L75

But now I'm using GhA Cache which doesn't have this issue: https://github.com/elabftw/elabimg/blob/6c98a0bec931d901420d9673ec1baa12b85a10ab/.github/workflows/build_hypernext.yaml#L61C12-L62

maennchen commented 1 year ago

@NicolasCARPi I think the problem is in the larger temp files that the unit tests create. I did not properly debug it so far, so I'm not 100% sure.

maennchen commented 1 year ago

@NicolasCARPi Yeah, deleting the tempfiles in the unit tests seems to solve the issue.

maennchen commented 1 year ago

Closing in favor of PR