Skip to content
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

[CI] Build std_spec in batches on 32-bit #11077

Closed
wants to merge 1 commit into from

Conversation

straight-shoota
Copy link
Member

Resolves #11073

This should make 32-bit specs run again.

The stdlib specs were previously built as a single binary and executed in batches (on 32-bit linux). This patch completely separates the build process in order to reduce memory demand at compile time. It also appears to run faster. So we might consider using this approach for all architectures.

The CI job still only runs stdlib specs against the latest release compiler, without building a new compiler from the development branch.

@straight-shoota
Copy link
Member Author

This now hits a different error in the second batch:

  Invalid memory access (signal 11) at address 0x0
  [0x8aeea53] ???
  [0x8aeea0e] ???
  [0x9ca8929] ???

This is different from the original error, which seems to be originating from LLVM running out of memory. Perhaps it's just different depending on when it runs out of memory.

But the thing is: this really shouldn't run out of memory anymore. When I built it locally, it showed about 800MB of memory use. That should be totally fine.
So this might be something entirely different.

I tried to recreate with the same docker image locally, and the same error appears. But as soon as I run the command in the container interactively instead of passing it directly to the container's shell via -s, the spec builds and runs correctly. This feels really odd, but appears to be very consistent.

@beta-ziliani
Copy link
Member

beta-ziliani commented Aug 9, 2021

just to be on the safe side, are you certain that the LLVM version is < 11?

@straight-shoota
Copy link
Member Author

Yeah, I was wondering about that, but no, it's LLVM 10:

Crystal 1.1.1 [6d9a1d583] (2021-07-26)

LLVM: 10.0.1
Default target: i386-unknown-linux-gnu

Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @straight-shoota 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Building std_spec runs ouf memory on 32-bit platform
3 participants