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 is failing due to "/usr/bin/ld: final link failed: No space left on device" #6676

Closed
alamb opened this issue Jun 15, 2023 · 6 comments · Fixed by #6688
Closed

CI is failing due to "/usr/bin/ld: final link failed: No space left on device" #6676

alamb opened this issue Jun 15, 2023 · 6 comments · Fixed by #6688
Assignees
Labels
bug Something isn't working development-process Related to development process of DataFusion

Comments

@alamb
Copy link
Contributor

alamb commented Jun 15, 2023

Describe the bug

The CI on main is failing due to the runners running out of disk space

To Reproduce

Example: https://github.com/apache/arrow-datafusion/actions/runs/5277391664/jobs/9545549038

"-Wl,-Bdynamic" "-llzma" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/usr/local/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/__w/arrow-datafusion/arrow-datafusion/target/debug/deps/roundtrip_physical_plan-8dff8073998bbd8f" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: /usr/bin/ld: final link failed: No space left on device
          collect2: error: ld returned 1 exit status
          

error: could not compile `datafusion-substrait` (test "roundtrip_physical_plan") due to previous error
Error: Process completed with exit code 101.

Expected behavior

Should pass

Additional context

No response

@alamb alamb added bug Something isn't working development-process Related to development process of DataFusion labels Jun 15, 2023
@alamb
Copy link
Contributor Author

alamb commented Jun 15, 2023

If someone else could look at this that would be great, otherwise I plan to do so in a few hours

@alamb
Copy link
Contributor Author

alamb commented Jun 15, 2023

Based off of this experiment:

Before any builds start the builder has 11G/35GB if its total disk, and has 33MB in the datafusion checkout:

11G	/
33M	/__w/arrow-datafusion/arrow-datafusion

After the build ends there is 35GB on the disk, all of it in the datafusion checkout:

35G	/
24G	/__w/arrow-datafusion/arrow-datafusion

Of that, almost all of it is in target:

4.0K	/__w/arrow-datafusion/arrow-datafusion/CHANGELOG.md
4.0K	/__w/arrow-datafusion/arrow-datafusion/CODE_OF_CONDUCT.md
4.0K	/__w/arrow-datafusion/arrow-datafusion/CONTRIBUTING.md
108K	/__w/arrow-datafusion/arrow-datafusion/Cargo.lock
4.0K	/__w/arrow-datafusion/arrow-datafusion/Cargo.toml
12K	/__w/arrow-datafusion/arrow-datafusion/LICENSE.txt
4.0K	/__w/arrow-datafusion/arrow-datafusion/NOTICE.txt
4.0K	/__w/arrow-datafusion/arrow-datafusion/README.md
224K	/__w/arrow-datafusion/arrow-datafusion/benchmarks
24K	/__w/arrow-datafusion/arrow-datafusion/ci
44K	/__w/arrow-datafusion/arrow-datafusion/conbench
13M	/__w/arrow-datafusion/arrow-datafusion/datafusion
196K	/__w/arrow-datafusion/arrow-datafusion/datafusion-cli
160K	/__w/arrow-datafusion/arrow-datafusion/datafusion-examples
792K	/__w/arrow-datafusion/arrow-datafusion/dev
444K	/__w/arrow-datafusion/arrow-datafusion/docs
4.0K	/__w/arrow-datafusion/arrow-datafusion/header
2.7M	/__w/arrow-datafusion/arrow-datafusion/parquet-testing
4.0K	/__w/arrow-datafusion/arrow-datafusion/pre-commit.sh
8.0K	/__w/arrow-datafusion/arrow-datafusion/python
4.0K	/__w/arrow-datafusion/arrow-datafusion/rustfmt.toml
24G	/__w/arrow-datafusion/arrow-datafusion/target.   <-- here is the problem
28K	/__w/arrow-datafusion/arrow-datafusion/test-utils
8.8M	/__w/arrow-datafusion/arrow-datafusion/testing

@alamb
Copy link
Contributor Author

alamb commented Jun 15, 2023

I will next sort out how to reduce the number and size of binaries

At least locally, for me, incremental compilation intermediate files seem to consume a large amount of space:

(arrow_dev) alamb@MacBook-Pro-8:~/Software/arrow-datafusion$ du -s -h target/debug/*
463M	target/debug/build
1.6G	target/debug/deps
780K	target/debug/examples
4.2G	target/debug/incremental

I will experiment with disabling that:
https://doc.rust-lang.org/cargo/reference/profiles.html?highlight=incremental#incremental

@alamb
Copy link
Contributor Author

alamb commented Jun 15, 2023

incremental seems to take 2GB of space on the builder -- will try disabling it and see what happens

https://github.com/apache/arrow-datafusion/actions/runs/5281745040/jobs/9555736433?pr=6678

Run du -s -h $GITHUB_WORKSPACE/target/debug/* || true
429M	/__w/arrow-datafusion/arrow-datafusion/target/debug/build
21G	/__w/arrow-datafusion/arrow-datafusion/target/debug/deps
4.0K	/__w/arrow-datafusion/arrow-datafusion/target/debug/examples
2.3G	/__w/arrow-datafusion/arrow-datafusion/target/debug/incremental

@alamb
Copy link
Contributor Author

alamb commented Jun 15, 2023

@alamb
Copy link
Contributor Author

alamb commented Jun 16, 2023

After applying all our the updates from yesterday, I measured disk usage again: https://github.com/apache/arrow-datafusion/actions/runs/5291555219/jobs/9577253624?pr=6678

Before the work the disk had 35GB at the end of the test run

35G	/

After all the changes it has 8GB to spare

27G	/

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working development-process Related to development process of DataFusion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant