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

unwinder/native: Accomodate larger program due to rate limits #2059

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

javierhonduco
Copy link
Contributor

@javierhonduco javierhonduco commented Sep 25, 2023

The newly added rate limits increase the code size of the native unwinder. By default they are disabled, so the abstract paths that the verifier has to analyse are reduced, compared to when they are enabled.

As in Go, structs with fields that aren't explicitely named have a default value, in the case of booleans, false, this feature was disabled in unit and integration tests, working both locally and CI.

In the Agent binary we have this flag enabled by default. This worked in local testing because the kernel I run is new enough to allow for larger programs (6.4.6-200.fc38.x86_64) but both the e2e tests in CI and in our own Demo deployment, which run older kernels, the program fails to load with Argument list too long.

Enabled rate limiting by default in tests shows the issue before this commit. To fix it, the the iterations per program were reduced. We might want to revisit this in the future.

Test Plan

With rate-limits enabled both integration and unit tests pass now.

$ make vmtest
=============
Test results:
=============
- ✅ 5.4
- ✅ 5.10
- ✅ 5.19
- ✅ 6.1

The newly added rate limits increase the code size of the native
unwinder. By default they are disabled, so the abstract paths that the
verifier has to analyse are reduced, compared to when they are enabled.

As in Go, structs with fields that aren't explicitely named have a
default value, in the case of booleans, false, this feature was disabled
in unit and integration tests, working both locally and CI.

In the Agent binary we have this flag enabled by default. This worked in
local testing because the kernel I run is new enough to allow for larger
programs (6.4.6-200.fc38.x86_64) but both the e2e tests in CI and in
our own Demo deployment, which run older kernels, the program fails to
load with `Argument list too long`.

Enabled rate limiting by default in tests shows the issue before this
commit. To fix it, the the iterations per program were reduced. We might
want to revisit this in the future.

Test Plan
=========

With rate-limits enabled both integration and unit tests pass now.

Signed-off-by: Francisco Javier Honduvilla Coto <javierhonduco@gmail.com>
@javierhonduco javierhonduco marked this pull request as ready for review September 25, 2023 07:00
@javierhonduco javierhonduco requested a review from a team as a code owner September 25, 2023 07:00
@javierhonduco
Copy link
Contributor Author

javierhonduco commented Sep 25, 2023

Because of #2047 and #2047, we need to take a look at the Agent logs in the e2e tests before merging (https://github.com/parca-dev/parca-agent/actions/runs/6295970858/job/17090368809?pr=2059).

edit:

level=info name=parca-agent ts=2023-09-25T07:12:13.326519352Z caller=main.go:500 msg="maxprocs: Leaving GOMAXPROCS=2: CPU quota undefined"
level=info name=parca-agent ts=2023-09-25T07:12:13.399216751Z caller=main.go:589 msg="eBPF is supported and enabled by the host kernel"
name=parca-agent ts=2023-09-25T07:12:13.401571199Z caller=main.go:717 msg=starting... node=fv-az810-174 store=parca.parca.svc.cluster.local:7070
go test -v ./e2e --context "minikube"
go: downloading k8s.io/client-go v0.28.1
go: downloading github.com/parca-dev/parca v0.19.0

Let's roll this out to Demo before cutting a new release. Also heads up @Sylfrena as this might break in arm64. Very excited for the future kernel tests for arm64 to prevent these regressions!

@javierhonduco javierhonduco merged commit bc6fe85 into main Sep 25, 2023
22 checks passed
@javierhonduco javierhonduco deleted the accomodate-larger-program-due-to-ratelimits branch September 25, 2023 07:29
Copy link
Member

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

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

LGTM

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.

None yet

3 participants