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

executor: checkptr: converted pointer straddles multiple allocations #30342

Closed
hawkingrei opened this issue Dec 2, 2021 · 2 comments · Fixed by #33895
Closed

executor: checkptr: converted pointer straddles multiple allocations #30342

hawkingrei opened this issue Dec 2, 2021 · 2 comments · Fixed by #33895
Labels
affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.0 component/test severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@hawkingrei
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

 fatal error: checkptr: converted pointer straddles multiple allocations
goroutine 272 [running]:
runtime.throw({0x5302365, 0x269fa3e})
	/usr/local/go/src/runtime/panic.go:1198 +0x71 fp=0xc0013535b8 sp=0xc001353588 pc=0x131d651
runtime.checkptrAlignment(0x203000, 0xc000ae0a80, 0x0)
	/usr/local/go/src/runtime/checkptr.go:26 +0x6c fp=0xc0013535d8 sp=0xc0013535b8 pc=0x12edc6c
github.com/pingcap/tidb/util/chunk.(*Column).GetInt64(...)
	/go/tidb/util/chunk/column.go:540
github.com/pingcap/tidb/util/chunk.Row.GetInt64(...)
	/go/tidb/util/chunk/row.go:53
github.com/pingcap/tidb/util/codec.encodeHashChunkRowIdx(0xc00107f6d8, {0xc000b8c2d0, 0x94c}, 0xc00077a3c0, 0x2)
	/go/tidb/util/codec/codec.go:307 +0x9d2 fp=0xc001353838 sp=0xc0013535d8 pc=0x269a952
github.com/pingcap/tidb/util/codec.EqualChunkRow(0xc000514000, {0xc000b8c2d0, 0x100000001}, {0xc000c82660, 0x6, 0x0}, {0xc00107f560, 0x2, 0x0}, {0xc000b8c280, ...}, ...)
	/go/tidb/util/codec/codec.go:699 +0x1fe fp=0xc001353920 sp=0xc001353838 pc=0x269fa3e
github.com/pingcap/tidb/executor.(*hashRowContainer).matchJoinKey(0xc00fd92420, {0xc000b8c2d0, 0xc00107f750}, {0xc000b8c280, 0x101000004b748d0}, 0xc001353d48)
	/go/tidb/executor/hash_table.go:140 +0x23b fp=0xc001353a50 sp=0xc001353920 pc=0x42e8b9b
github.com/pingcap/tidb/executor.(*hashRowContainer).GetMatchedRowsAndPtrs(0xc00fd92420, 0xc000acad00, {0xc000b8c280, 0x0}, 0x0)
	/go/tidb/executor/hash_table.go:124 +0x211 fp=0xc001353b30 sp=0xc001353a50 pc=0x42e8651
github.com/pingcap/tidb/executor.testHashRowContainer(0x637c898, 0x53dead0, 0x1)
	/go/tidb/executor/hash_table_serial_test.go:158 +0x1178 fp=0xc001353dd0 sp=0xc001353b30 pc=0x44b60b8
github.com/pingcap/tidb/executor.TestHashRowContainer(0x0)
	/go/tidb/executor/hash_table_serial_test.go:95 +0x25b fp=0xc001353e98 sp=0xc001353dd0 pc=0x44b4a7b
testing.tRunner(0xc000acad00, 0x53db250)
	/usr/local/go/src/testing/testing.go:1259 +0x230 fp=0xc001353fb0 sp=0xc001353e98 pc=0x1484eb0
testing.(*T).Run·dwrap·21()
	/usr/local/go/src/testing/testing.go:1306 +0x48 fp=0xc001353fe0 sp=0xc001353fb0 pc=0x1486448
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc001353fe8 sp=0xc001353fe0 pc=0x13536c1
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1306 +0x727
goroutine 1 [chan receive]:
testing.(*T).Run(0xc000743a00, {0x5238848, 0x14}, 0x53db250)
	/usr/local/go/src/testing/testing.go:1307 +0x752
testing.runTests.func1(0x0)
	/usr/local/go/src/testing/testing.go:1598 +0x9a
testing.tRunner(0xc000743a00, 0xc000ac79a8)
	/usr/local/go/src/testing/testing.go:1259 +0x230
testing.runTests(0xc000b0e180, {0x7ee42a0, 0xdd, 0xdd}, {0xc000ac7a40, 0x1322005, 0x85ae920})
	/usr/local/go/src/testing/testing.go:1596 +0x7cb
testing.(*M).Run(0xc000b0e180)
	/usr/local/go/src/testing/testing.go:1504 +0x9d2
github.com/pingcap/tidb/testkit/testmain.(*testingM).Run(0xc0009368a0)
	/go/tidb/testkit/testmain/wrapper.go:28 +0x43
go.uber.org/goleak.VerifyTestMain({0x6360a00, 0xc0009368a0}, {0xc001355e08, 0x4, 0x4})
	/home/prow/go/pkg/mod/go.uber.org/[email protected]/testmain.go:53 +0x5a
github.com/pingcap/tidb/executor_test.TestMain(0xc000b0e180)
	/go/tidb/executor/main_test.go:67 +0x7dd
main.main()
	_testmain.go:529 +0x265
goroutine 24 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc0007e0800)
	/home/prow/go/pkg/mod/[email protected]/stats/view/worker.go:276 +0x185
created by go.opencensus.io/stats/view.init.0
	/home/prow/go/pkg/mod/[email protected]/stats/view/worker.go:34 +0xf9
goroutine 101 [chan receive]:
go.etcd.io/etcd/pkg/logutil.(*MergeLogger).outputLoop(0xc000578708)
	/home/prow/go/pkg/mod/go.etcd.io/[email protected]/pkg/logutil/merge_logger.go:173 +0xb0
created by go.etcd.io/etcd/pkg/logutil.NewMergeLogger
	/home/prow/go/pkg/mod/go.etcd.io/[email protected]/pkg/logutil/merge_logger.go:91 +0x159
goroutine 141 [chan receive]:
go.etcd.io/etcd/pkg/logutil.(*MergeLogger).outputLoop(0xc000579668)
	/home/prow/go/pkg/mod/go.etcd.io/[email protected]/pkg/logutil/merge_logger.go:173 +0xb0
created by go.etcd.io/etcd/pkg/logutil.NewMergeLogger
	/home/prow/go/pkg/mod/go.etcd.io/[email protected]/pkg/logutil/merge_logger.go:91 +0x159
goroutine 144 [chan receive]:
go.etcd.io/etcd/pkg/logutil.(*MergeLogger).outputLoop(0xc0005797a0)
	/home/prow/go/pkg/mod/go.etcd.io/[email protected]/pkg/logutil/merge_logger.go:173 +0xb0
created by go.etcd.io/etcd/pkg/logutil.NewMergeLogger
	/home/prow/go/pkg/mod/go.etcd.io/[email protected]/pkg/logutil/merge_logger.go:91 +0x159
goroutine 268 [chan receive]:
testing.(*T).Parallel(0xc000749520)
	/usr/local/go/src/testing/testing.go:1104 +0x48d
github.com/pingcap/tidb/executor.TestFetchShowBRIE(0x0)
	/go/tidb/executor/brie_test.go:70 +0x4b
testing.tRunner(0xc000749520, 0x53db240)
	/usr/local/go/src/testing/testing.go:1259 +0x230
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1306 +0x727
goroutine 267 [chan receive]:
testing.(*T).Parallel(0xc000748ea0)
	/usr/local/go/src/testing/testing.go:1104 +0x48d
github.com/pingcap/tidb/executor.TestGlueGetVersion(0x0)
	/go/tidb/executor/brie_test.go:38 +0x45
testing.tRunner(0xc000748ea0, 0x53db248)
	/usr/local/go/src/testing/testing.go:1259 +0x230
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1306 +0x727
goroutine 26 [chan receive]:
testing.(*T).Parallel(0xc000aca4e0)
	/usr/local/go/src/testing/testing.go:1104 +0x48d
github.com/pingcap/tidb/executor.TestConcurrentMap(0x0)
	/go/tidb/executor/concurrent_map_test.go:27 +0x48
testing.tRunner(0xc000aca4e0, 0x53db228)
	/usr/local/go/src/testing/testing.go:1259 +0x230
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1306 +0x727 

1. Minimal reproduce step (Required)

make race

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label Dec 2, 2021
@tiancaiamao
Copy link
Contributor

This is a feature introduced in Go 1.14, -d=checkptr the compiler will check the pointer is aligned.
https://go.dev/doc/go1.14

@tiancaiamao
Copy link
Contributor

Closed by #33895

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.0 component/test severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants