Storage_Error when using [AWS.Client.Get return Response.Data] on musl Linux
Nobody has claimed this yet.
- Dominant language
- Ada
- Stars
- 162
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
As the title indicates, when I try to download relatively large files on musl Linux a Storage_Error is propagated. I believe this is due to musl having a limited stack size (by default, 80KB), however even when this is increased the error still occurs, just after more time. After looking at aws-client.adb, it appears that the full response body is being cached in a stack variable, which could be part of the issue.
I tried to use AWS.Client.HTTP_Utils instead, and this did not cause a Storage_Error, however I get "Socket closed by peer" instead, which is also unexpected, since I’m able to download the file in a web browser and via curl. This could also be a symptom of the reduced stack size, so I will do further testing with a manually increased stack size.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce a large-file download on musl Linux, then read aws-client.adb around the suspected stack-cached response body and compare it with AWS.Client.HTTP_Utils. Done means the download no longer raises Storage_Error or unexpectedly reports that the socket was closed by the peer.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100