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

[docdb] ASAN leak in MetricsTest::DoLagTest #5762

Closed
bmatican opened this issue Sep 22, 2020 · 2 comments
Closed

[docdb] ASAN leak in MetricsTest::DoLagTest #5762

bmatican opened this issue Sep 22, 2020 · 2 comments
Assignees
Labels
area/docdb YugabyteDB core features kind/failing-test Tests and testing infra

Comments

@bmatican
Copy link
Contributor

==16494==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x546248 in operator new(unsigned long) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20200829090443-f431681041-centos/src/llvm-7.1.0.src/projects/compiler-rt/lib/asan/asan_new_delete.cc:106
    #1 0x55ba8e in void yb::MetricsTest::DoLagTest<yb::MillisLag>(yb::MillisLagPrototype const&) /nfusr/centos-gcp-cloud/jenkins-worker-24c/jenkins/jenkins-github-yugabyte-db-centos-master-clang-asan-1286/build/asan-clang-dynamic-ninja/../../src/yb/util/metrics-test.cc:71:16
@bmatican bmatican added kind/failing-test Tests and testing infra area/docdb YugabyteDB core features labels Sep 22, 2020
@bmatican bmatican self-assigned this Sep 22, 2020
hulien22 added a commit that referenced this issue Sep 23, 2020
Summary:
Before we were not initializing `timestamp_ms_` which caused flaky errors for `MetricsTest.SimpleLagTest` - changing this to now initialize to `now`.
Also fixing ASAN issue in `MetricsTest::DoLagTest`

Test Plan:
```
ybd --cxx-test util_metrics-test --gtest_filter MetricsTest.SimpleLagTest -n 100
ybd --cxx-test util_metrics-test --gtest_filter MetricsTest.SimpleAtomicLagTest -n 100
```

Reviewers: hector

Reviewed By: hector

Subscribers: bogdan, ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D9431
@hulien22
Copy link
Contributor

Didn't see that this github issue existed until I finished writing my diff @bmatican, but this should be fixed in e5494f1:

scoped_refptr<LagType> lag = new LagType(&metric);

@bmatican
Copy link
Contributor Author

Oh, awesome @hulien22 , no worries, thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features kind/failing-test Tests and testing infra
Projects
None yet
Development

No branches or pull requests

2 participants