Skip to content

dynamic_modules: link dynamic library lifetime with per route config#41112

Merged
mathetake merged 1 commit intoenvoyproxy:mainfrom
wtzhang23:dynamic-modules-per-route-link-module-lifetime
Sep 17, 2025
Merged

dynamic_modules: link dynamic library lifetime with per route config#41112
mathetake merged 1 commit intoenvoyproxy:mainfrom
wtzhang23:dynamic-modules-per-route-link-module-lifetime

Conversation

@wtzhang23
Copy link
Copy Markdown
Contributor

Commit Message: dynamic_modules: link dynamic library lifetime with per route config
Additional Description: Pass the RAII handle to the dynamic library to the per route config to ensure that at least one ref count for the dynamic library exists while the per route config is active. This can avoid the library from being closed and unmapped from the process should no filter config be active while per route configs are.
Risk Level: Low
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A
Potentially fixes #41094

Signed-off-by: William Zhang <wtzhang23@gmail.com>
@repokitteh-read-only
Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #41112 was opened by wtzhang23.

see: more, trace.

@wtzhang23
Copy link
Copy Markdown
Contributor Author

With this change:

bazel test -c dbg --config=asan //test/extensions/dynamic_modules/http:integration_test --jobs 20 --runs_per_test=1000 --cache_test_results=no 
INFO: Analyzed target //test/extensions/dynamic_modules/http:integration_test (0 packages loaded, 22 targets configured).
INFO: Found 1 test target...
Target //test/extensions/dynamic_modules/http:integration_test up-to-date:
  bazel-bin/test/extensions/dynamic_modules/http/integration_test
INFO: Elapsed time: 1779.827s, Critical Path: 72.90s
INFO: 1001 processes: 1 internal, 1000 processwrapper-sandbox.
INFO: Build completed successfully, 1001 total actions

Executed 1 out of 1 test: 1 test passes.

@wtzhang23 wtzhang23 marked this pull request as ready for review September 17, 2025 14:19
@mathetake mathetake self-assigned this Sep 17, 2025
Copy link
Copy Markdown
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

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

Cool, nice detective work!

@mathetake mathetake merged commit 5e41ea3 into envoyproxy:main Sep 17, 2025
24 checks passed
mbadov pushed a commit to mbadov/envoy that referenced this pull request Sep 22, 2025
…nvoyproxy#41112)

Commit Message: dynamic_modules: link dynamic library lifetime with per
route config
Additional Description: Pass the RAII handle to the dynamic library to
the per route config to ensure that at least one ref count for the
dynamic library exists while the per route config is active. This can
avoid the library from being closed and unmapped from the process should
no filter config be active while per route configs are.
Risk Level: Low
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A
Fixes envoyproxy#41094

Signed-off-by: William Zhang <wtzhang23@gmail.com>
Signed-off-by: Misha Badov <mbadov@google.com>
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.

Flaky Test: IpVersions/DynamicModulesIntegrationTest.PerRouteConfig/IPv4 ASAN

2 participants