-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std::bad_alloc - rework file storage from internal buffer to stream #357
Comments
I found a
So it looks like node ran out of memory while running the Action. |
I took a look at the code, and in
This might be acceptable for small files and runners with lots of memory, but it would be safer to use a stream. |
The Now whether or not they actually handle the stream correctly internally is another question ;) |
Thank you for the quick fix, I appreciate it. Tomorrow I'll probably have another such large artifact to upload, and I'll confirm if it was successful. |
BTW, do you know if the self-hosted runner will download the new version of your action or will cache and re-use the same version that crashed before? Since the GitHub runner is active continuously, the machine runs non-stop. Probably you should have increased the version in |
Have you seen any documentation about that version being relevant? I was under the impression actions just utilized tags, branches and commits. Not actually sure how actions would be cached on a runner. I would assume they would see that the tag points to a new commit and pull it down, if not clone the action every run (but I don't really know for sure). |
Unfortunately not... I extrapolated from my experience with the modules used by npm, which I also use in xpm. But the runner is open source, perhaps this detail can be understood from the code. The build will take 10 more hours and tomorrow we'll know if it worked... |
The large build from yesterday (550 MB) was the first build based on gcc 13.2. This night build was an update based on gcc 12.3, and, being older, was slightly smaller, only 452 MB, so I can not fully confirm, but let's assume that the problem was solved. We'll know better when 13.3 will be out. Thank you! |
Describe the bug
The GitHub Actions runner failed with
std::bad_alloc
when trying to publish a large archive file.To Reproduce
Steps to reproduce the behavior:
Expected behavior
I successfully used the
ncipollo/release-action@v1
action to publish many releases, without any problems, and I expected to run properly for large archives too.Desktop (please complete the following information):
Additional context
From the downloaded log:
The workflow file is:
The run is:
I don't know which process threw this exception, if it is related to this GitHub Action or not, but it looks like a C++ out of memory condition.
Does this Action try to move the file by copying it into memory? Since the machine I'm running this is a small Raspberry Pi, with only 4 GB of memory.
If this is true, probably the code should be reworked to use a stream, which uses less memory.
To be noted that I successfully published even larger files (549 MB), but on machines with more memory.
The text was updated successfully, but these errors were encountered: