Skip to content

Update bind9 CI test to use meson #2562

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

Merged
merged 3 commits into from
Jul 23, 2025
Merged

Conversation

nhatnghiho
Copy link
Contributor

@nhatnghiho nhatnghiho commented Jul 21, 2025

Issues:

Resolves P257046914

Description of changes:

Bind9 recently switched from automake to meson for its build system, leading to broken CI test on our end. This PR fixes that.

Callouts:

I disabled jemalloc for bind9 build because I ran into memory allocator conflict with jemalloc. We didn't have this problem when bind9 was still using automake so I suspect it's probably due to how meson is set up in bind9. Disabling jemalloc shouldn't affect the test outcome.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@nhatnghiho nhatnghiho requested a review from a team as a code owner July 21, 2025 15:48
@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.74%. Comparing base (127633f) to head (c6a7858).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2562      +/-   ##
==========================================
+ Coverage   78.73%   78.74%   +0.01%     
==========================================
  Files         645      645              
  Lines      110658   110658              
  Branches    15648    15648              
==========================================
+ Hits        87124    87137      +13     
+ Misses      22834    22820      -14     
- Partials      700      701       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -53,6 +59,7 @@ ls

aws_lc_build ${SRC_ROOT} ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER} -DBUILD_TESTING=OFF -DBUILD_TOOL=OFF -DBUILD_SHARED_LIBS=1
export LD_LIBRARY_PATH="${AWS_LC_INSTALL_FOLDER}/lib"
export LD_PRELOAD=libjemalloc.so.2
Copy link
Contributor

@WillChilds-Klein WillChilds-Klein Jul 21, 2025

Choose a reason for hiding this comment

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

LD_PRELOAD represents a path. is there a jemalloc lib in BIND9_SRC_FOLDER? if so, why do we need it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's no jemalloc lib in BIND9_SRC_FOLDER. I added it because I ran into a segmentation fault, which came from a memory allocator conflict between bind9 and aws-lc. Adding LD_PRELOAD solves the issue by forcing both to use the same memory allocator at runtime. But to be completely honest I don't like this approach too much.

We didn't have this problem building with jemalloc when bind9 was still using automake so I suspect it's probably due to how meson is set up in bind9.

Another option is to disable jemalloc altogether. Does that seem like a better way to go?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. This work-around effectively disables jemalloc by pointing LD_PRELOAD to a non-existent file. Doing that explicitly in the build configuration seems like a better way to go.

@darylmartin100 darylmartin100 requested a review from justsmth July 22, 2025 16:12
@nhatnghiho nhatnghiho enabled auto-merge (squash) July 22, 2025 23:51
@nhatnghiho nhatnghiho merged commit a435f20 into aws:main Jul 23, 2025
129 of 134 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants