-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Get more of the tests passing for FreeBSD #3197
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
Conversation
Nice work! Want to try enabling more tests in the FreeBSD CI by adding this to your PR? --- a/ci/srht/freebsd_script
+++ b/ci/srht/freebsd_script
@@ -18,14 +18,11 @@ cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$(pwd)/release -DZIG_STATIC=ON
make $JOBS install
-# TODO test everything. right now it's skipping stuff including docs
-# because for some reason @cImport is failing on the CI server.
-release/bin/zig build --build-file ../build.zig test-behavior -Dskip-release
+release/bin/zig build test
if [ -f ~/.s3cfg ]; then
mv ../LICENSE release/
- # TODO re-enable this
- #mv ../zig-cache/langref.html release/
+ mv ../zig-cache/langref.html release/
mv release/bin/zig release/
rmdir release/bin |
Your patch has been applied 😸 |
apparently builds.sr.ht vm is 2GB and on my own vm is set at 6GB and consistently 4.1GB to 4.7GB proc is showing up:
|
we have 2 courses of action here:
For reducing memory usage of stage1, it's a lot of work. We need a framework for understanding where the memory is, to tell us what efforts would be rewarded. And then we have to be careful to not reduce the debuggability of stage1. E.g. if we tried to squeeze 3 flags into every 8 byte aligned pointer, that would save memory, but would probably cause bugs. Perhaps such tricks will be tried in the self-hosted compiler, but for stage1 the real priority is debuggability & maintainability as the language evolves. For convincing Drew, maybe I could offer to double my SourceHut donations? :-) |
Would using the heap profiler/checker from gperftools would help? https://github.com/gperftools/gperftools |
Maybe! I've never tried that before. In the meantime, here's something we can do, to merge your PR. Instead of:
which does all the tests. Let's see how many we can enable. It looks like the most memory used is in the std lib tests. Here's a way to run a subset:
All these "steps" can be run independently. So we can try something like this:
Maybe more have to be commented out; maybe not. But currently we're only doing |
Sorry, 6G isn't happening. |
Another approach would be switching to Azure for FreeBSD. We already use Azure for Linux, macOS, and Windows, and they provide enough RAM for our purposes. Here's a guide on FreeBSD. It looks like they do have FreeBSD 12 available. I'll look into this soon. I really would like to spend more time evolving & stabilizing the language right now and less time optimizing the stage1 compiler, so I'm inclined to look into this approach rather than the other one. |
|
This comment has been minimized.
This comment has been minimized.
After #3203 has been merged, should I rebase my PR to pick up more possible failures? |
Yes, if you don't mind, try doing my suggestion in #3197 (comment) and let's see how many of these tests we can enable. |
I see 2 things from this build log:
|
Sorry about that Andrew. I'm without my morning coffee... I got both the extra test disabled and rebased on upstream master. |
Well looks like I found a genuine test failure as it doesn't look like it's Out Of Memory. I'll see if I can fix that. |
I'm sorry that the error message didn't contain stderr, since that would have been helpful, but I used sr.ht's feature to log into the VM after a failed build and poked around, and saw this:
|
For take5 (if necessary) would you mind adding a comment for every commented out test explaining why the test is disabled? I believe it's the same for all of them, but let's duplicate the information for every disabled test. Example:
|
Phew 😤 |
You're going to have to revert the langref.html changes too, because that is produced by the |
Don't despair! You have succeeded in getting significantly more tests passing, as well as making it abundantly clear what the next steps are to get to full CI test coverage for FreeBSD. This is a meaningful improvement. |
Thank you Andrew, I'm glad to help. I think I deserve some breakfast after going through each take. 🍳 |
I can provide access to a system with enough ram. ping me (dch) on irc to discuss. we should be able to hook it into sr.ht API as well I think. |
These changes were necessary to get all of the tests, both with
-Dskip-release
and not, passing for FreeBSD.This should hopefully check the respecting box in issue #1759 and get the wheels rolling.