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

test(profiling): with address sanitizer on bookworm with GH actions #2432

Merged
merged 20 commits into from
Jan 11, 2024

Conversation

morrisonlevi
Copy link
Collaborator

@morrisonlevi morrisonlevi commented Dec 20, 2023

Description

This adds bookworm images which were heavily based on the buster image:

  • Many dependencies are newer and did not have to be built from scratch, which is nice.
  • This doesn't run all the tests on bookworm, just builds and uploads images.
  • However, only some images can be built. More work is required for PHP 7.3 and below to get working. I'm not sure how much more work is needed, but the two known issues are with intl and I think PHP 7.0 requires OpenSSL v1. Additionally, the shared extension versions have failures, something about ldap_connect having a mismatched signature, possibly: build fails with OpenLDAP 2.5.4 curl/curl#7004.

The key reason this PR was made is to add a PHP 8.3 NTS ASAN build, and then runs the profiling/tests/phpt tests with it. This is why I didn't continue working on the bookworm images so that all versions work; I really just need ASAN right now, and it wasn't working on Buster due to libasan5 vs libasan6 differences.

PROF-8286

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@github-actions github-actions bot added the profiling Relates to the Continuous Profiler label Dec 20, 2023
@pr-commenter
Copy link

pr-commenter bot commented Dec 20, 2023

Benchmarks

Benchmark execution time: 2024-01-11 10:53:21

Comparing candidate commit a486091 in PR branch levi/bookworm with baseline commit 41cb273 in branch master.

Found 0 performance improvements and 2 performance regressions! Performance is the same for 16 metrics, 3 unstable metrics.

scenario:walk_stack/50

  • 🟥 wall_time [+753.578ns; +757.005ns] or [+4.939%; +4.962%]

scenario:walk_stack/99

  • 🟥 wall_time [+805.193ns; +809.729ns] or [+5.265%; +5.295%]

@morrisonlevi morrisonlevi marked this pull request as ready for review December 28, 2023 16:56
@morrisonlevi morrisonlevi requested review from a team as code owners December 28, 2023 16:56
Comment on lines 1 to 2
BOOKWORM_CURRENT_VERSION=1
BOOKWORM_NEXT_VERSION=2
Copy link
Collaborator

Choose a reason for hiding this comment

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

I do not understand the point of this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The current buster builds are "unversioned." This can cause issues (like the one you mention below with nts-asan failing). This file is a way to version the build, although it's not plumbed all the way through everything like the CI and such. We do this in the libdatadog images and it's worked nicely there.

@bwoebi
Copy link
Collaborator

bwoebi commented Jan 3, 2024

I'm not sure whether parts of this are already pushed, but https://app.circleci.com/pipelines/github/DataDog/dd-trace-php/13970/workflows/b0aaa43d-7966-4958-a4c2-416367afda4c/jobs/3410571 looks somewhat related I suppose?

@morrisonlevi
Copy link
Collaborator Author

The push was from a different but related PR where I tried to do this on buster images. I have re-pushed images from that were built from master.

@morrisonlevi morrisonlevi changed the title test(profiling): with address sanitizer on bookworm with github actions test(profiling): with address sanitizer on bookworm with GH actions Jan 8, 2024
@morrisonlevi
Copy link
Collaborator Author

morrisonlevi commented Jan 8, 2024

I've added lsof and rebuilt the relevant images. Once this is reviewed, I'll actually add back all the buster image sources which were deleted in this PR. Doing it in this way makes the diff much easier to review.

morrisonlevi and others added 4 commits January 9, 2024 16:47
PHP can have memory issues with modules which are loaded at runtime
with the `dl` function, and the `run-tests.php` script does this. The
zend_test extension in particular hits this edge, so exclude it.
@realFlowControl
Copy link
Member

realFlowControl commented Jan 11, 2024

The Cache build dependencies step did not cache anything due to:

Warning: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.
Warning: Cache save failed.

See https://github.com/DataDog/dd-trace-php/actions/runs/7468310960/job/20347970685?pr=2432
I fixed the path in e34c5f6

It is still not working correctly, but this might be due to some race condition, as I started two actions at the same time (one through push and another through retry), so currently it looks like the cache key exists in a weird state.

We should have a look after merging in a new PR where we just cargo update, which will change the key and then we'll see.

So feel free to merge 🎉

@realFlowControl realFlowControl added this to the 0.97.0 milestone Jan 11, 2024
@morrisonlevi morrisonlevi merged commit a68faff into master Jan 11, 2024
4 checks passed
@morrisonlevi morrisonlevi deleted the levi/bookworm branch January 11, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci dev/testing profiling Relates to the Continuous Profiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants