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

util: use go-deadlock to find deadlock #40288

Merged
merged 15 commits into from
Jan 5, 2023
Prev Previous commit
Next Next commit
bazel update
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Jan 4, 2023
commit cdbc2ee19bb08ebca155f3d197bf642bf40dc568
2 changes: 1 addition & 1 deletion server/tidb_library_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestMemoryLeak(t *testing.T) {
runtime.ReadMemStats(&memStat)
// before the fix, initAndCloseTiDB for 20 times will cost 900 MB memory, so we test for a quite loose upper bound.
if syncutil.EnableDeadlock {
require.Less(t, memStat.HeapInuse-oldHeapInUse, uint64(units.GiB))
require.Less(t, memStat.HeapInuse-oldHeapInUse, uint64(1027*units.MiB))
} else {
require.Less(t, memStat.HeapInuse-oldHeapInUse, uint64(300*units.MiB))
}
Expand Down