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

server: fix misleading TestJemalloc result for ppc64le #46255

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

amitsadaphule
Copy link
Contributor

@amitsadaphule amitsadaphule commented Mar 18, 2020

Fixes #43522

The test failed on ppc64le since the 16KiB constant in allocateMemory
didn't exceed the thread cache on ppc64le. Brief failure log shown below:

=== RUN   TestJemalloc
--- FAIL: TestJemalloc (0.00s)
    jemalloc_test.go:37: allocated stat not incremented on allocation: 2322976

Configuring jemalloc with --disable-tcache to disable the thread cache or
flushing thread cache as mallctl("thread.tcache.flush", NULL, NULL, NULL, 0);
showed expected behavior. But had performance and code clutter trade-offs resp.
So, updated the constant to suit ppc64le which also works for x86 and others.

Release justification: Fixes misleading test result for jemalloc stat on PPC
Release note: None

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Mar 18, 2020

CLA assistant check
All committers have signed the CLA.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rohany rohany requested a review from petermattis March 31, 2020 15:15
Copy link
Collaborator

@petermattis petermattis left a comment

Choose a reason for hiding this comment

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

:lgtm:

Thanks for the fix. The CI failure looks unrelated. I'll poke CI to run again, and get this merged on green.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @petermattis)

@amitsadaphule
Copy link
Contributor Author

Thanks for the review @petermattis !

@petermattis
Copy link
Collaborator

@amitsadaphule Do you mind rebasing onto current master? The CI failures seem to be do to your old branch.

@amitsadaphule
Copy link
Contributor Author

@petermattis sure. I'll rebase the branch.

The test failed on ppc64le since the 16KiB constant in allocateMemory
didn't exceed the thread cache on ppc64le. Brief failure log shown below:
```
=== RUN   TestJemalloc
--- FAIL: TestJemalloc (0.00s)
    jemalloc_test.go:37: allocated stat not incremented on allocation: 2322976
```
Configuring jemalloc with `--disable-tcache to disable the thread cache` or
flushing thread cache as `mallctl("thread.tcache.flush", NULL, NULL, NULL, 0);`
showed expected behavior. But had performance and code clutter trade-offs resp.
So, updated the constant to suit ppc64le which also works for x86 and others.

Release justification: Fixes misleading test result for jemalloc stat on PPC
Release note: None
@petermattis
Copy link
Collaborator

@amitsadaphule Thanks.

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 31, 2020

Build failed

@petermattis
Copy link
Collaborator

Known / unrelated CI failure. Trying again.

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 31, 2020

Build failed (retrying...)

@petermattis
Copy link
Collaborator

Another unrelated CI failure (#43251). This PR doesn't want to go in.

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 31, 2020

Already running a review

@craig
Copy link
Contributor

craig bot commented Mar 31, 2020

Build succeeded

@craig craig bot merged commit bb95271 into cockroachdb:master Mar 31, 2020
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.

TestJemalloc in pkg/server/status failed on Power Linux (ppc64le) platform
3 participants