azwhikaru / Action-TWRP-Builder

237 stars 1.64k forks source link

No Space Left on Device While Building #93

Open Minionguyjpro opened 1 month ago

Minionguyjpro commented 1 month ago

I am getting this error when building with the legacy action. The action should clean up things to keep enough free space, right? I'm not sure why it happens. I edited a few things in the workflow like Ubuntu 20.04 to the latest and changed the python package to python2 but I'm not sure whether this is correct (it did however build without Python errors as far as it came so I think it's fine). I'll try changing it back to 20.04 and see whether that helps

azwhikaru commented 1 month ago

in my testing, github action was sufficient to work on android 11 and 12. more logs about "No Space Left on Device While Building"?

also upstream the debian has removed python2, use 20.04 to build for devices below android 9 is recommend. workflow should be all ready, is tested

Minionguyjpro commented 1 month ago

in my testing, github action was sufficient to work on android 11 and 12. more logs about "No Space Left on Device While Building"?

also upstream the debian has removed python2, use 20.04 to build for devices below android 9 is recommend. workflow should be all ready, is tested

Well I can still install Python 2 on my Ubuntu 24.04 LTS system but okay, although Ubuntu 20.04 may be better anyways to save more space. I am trying to build for Android 8.1. I will try to undo the changes to the workflow. The error is anyways (but I guess it just means that there is no more space left):

System.IO.IOException: No space left on device : '/home/runner/runners/2.317.0/_diag/Worker_20240726-072303-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.317.0/_diag/Worker_20240726-072303-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.317.0/_diag/Worker_20240726-072303-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)
Minionguyjpro commented 1 month ago

Still failing with the no space left on device error, see https://github.com/Minionguyjpro/Action-TWRP-Builder

azwhikaru commented 1 month ago

hmm same problem, let me do some more testing...

azwhikaru commented 1 month ago

alright, I've tested 2 devices

twrp-12.1, aosp based: https://github.com/azwhikaru/Action-TWRP-Builder/actions/runs/10110630667/job/27960915340

twrp-8.1, omnirom based: https://github.com/azwhikaru/Action-TWRP-Builder/actions/runs/10113368293/job/27969589237

no problem even when building on 12.1 (definitely requires more space than 8.1)

maybe you can try to build your device on your localhost and see how much space it takes, the workflow has about 60-70GB available

Minionguyjpro commented 1 month ago

alright, I've tested 2 devices

twrp-12.1, aosp based: https://github.com/azwhikaru/Action-TWRP-Builder/actions/runs/10110630667/job/27960915340

twrp-8.1, omnirom based: https://github.com/azwhikaru/Action-TWRP-Builder/actions/runs/10113368293/job/27969589237

no problem even when building on 12.1 (definitely requires more space than 8.1)

maybe you can try to build your device on your localhost and see how much space it takes, the workflow has about 60-70GB available

I already tried it in my own container. The problem is that it gets stuck there (on /sbin/teamwin for some reason on which I can't find anything to fix it) and I actually wanted to test it in GitHub Actions instead, from a fresh environment.

Minionguyjpro commented 1 month ago

I've put the workflow completely back to as it was (using the one in this repository without any changes at all) and just entered the correct inputs when trying to run it manually. Will have to wait now to see...

Minionguyjpro commented 1 month ago

I've put the workflow completely back to as it was (using the one in this repository without any changes at all) and just entered the correct inputs when trying to run it manually. Will have to wait now to see...

Still getting no space left on device..., could you test it with my device tree from https://github.com/Minionguyjpro/android_device_samsung_a2corelte?

azwhikaru commented 1 month ago

hmm same problem, let me do some more testing...

actually I've tested with your device and got same problem

so please tell me how much space is needed when building on localhost, maybe it exceeds the quota of github actions

this doesn't seem to be related to the workflow's script, it can still build other devices. I've no idea about your device's problem

Minionguyjpro commented 1 month ago

hmm same problem, let me do some more testing...

actually I've tested with your device and got same problem

so please tell me how much space is needed when building on localhost, maybe it exceeds the quota of github actions

this doesn't seem to be related to the workflow's script, it can still build other devices. I've no idea about your device's problem

I'm not completely sure; my USB HDD (where it's building off in the container) had around 5GB in use BEFORE trying to build and now has around 38GB in use (so I guess around 33GB, although some cache and stuff could be left and I don't know it exactly). As far as I saw the GitHub Actions runners have around 29GB of free space (they have around 80GB in total but a lot of that is in use for all software, docker images etc.

Minionguyjpro commented 1 month ago

@azwhikaru It does seem to work fine with my other device tree which is based off the AOSP 12.1 TWRP manifest.

Minionguyjpro commented 1 month ago

@azwhikaru It does seem to work fine with my other device tree which is based off the AOSP 12.1 TWRP manifest.

Seems to fail with an rsync permission error... hm....

Minionguyjpro commented 3 weeks ago

Got it again this time (it worked fine for a while with one). The only thing that I changed since it worked was the kernel (which was slightly larger with 130KB more). It however happens at preparing the JDK and the summary shows that there a lot of space is actually available, so I'm not sure what goes wrong here...?

Minionguyjpro commented 3 weeks ago

Made PR #97 which should fix this.