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

can not start tidb-server while using plugin #37319

Closed
aytrack opened this issue Aug 23, 2022 · 1 comment · Fixed by #37321
Closed

can not start tidb-server while using plugin #37319

aytrack opened this issue Aug 23, 2022 · 1 comment · Fixed by #37321
Labels
affects-6.1 severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@aytrack
Copy link
Contributor

aytrack commented Aug 23, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

./bin/tidb-server -plugin-load="whitelist-1,audit-1" -plugin-dir="/root/plugins/bin/"

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

tidb-server started and plugin load success

3. What did you see instead (Required)

tidb-server can not start

2022/08/23 20:43:04.848 +08:00] [INFO] [delete_range.go:140] ["[ddl] start delRange emulator"]
[2022/08/23 20:43:04.848 +08:00] [INFO] [ddl_worker.go:165] ["[ddl] start DDL worker"] [worker="worker 1, tp general"]
[2022/08/23 20:43:04.848 +08:00] [INFO] [ddl_worker.go:165] ["[ddl] start DDL worker"] [worker="worker 2, tp add index"]
[2022/08/23 20:43:04.849 +08:00] [WARN] [sysvar_cache.go:52] ["sysvar cache is empty, triggering rebuild"]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x88 pc=0x7f234549fd21]

goroutine 1 [running]:
github.com/pingcap/tidb/session.(*domainMap).Get(0x6495a60, {0x0, 0x0})
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/tidb.go:52 +0x61
github.com/pingcap/tidb/session.GetDomain(...)
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2926
github.com/pingcap/enterprise-plugin/whitelist.(*handle).init(0x7f2347fbcac0)
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/enterprise-plugin/whitelist/whitelist.go:188 +0xf8
github.com/pingcap/enterprise-plugin/whitelist.OnInit({0x3870dc0?, 0xc000914660?}, 0x30?)
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/enterprise-plugin/whitelist/whitelist.go:33 +0x25
github.com/pingcap/tidb/plugin.Init({0x42a6800, 0xc000054078}, {{0x0, 0x0, 0x0}, {0x0, 0x0}, 0x0, 0x0, 0x0})
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/plugin/plugin.go:209 +0x209
github.com/pingcap/tidb/session.BootstrapSession({0x42c2e00, 0xc000633100})
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:2880 +0x67d
main.createStoreAndDomain()
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:296 +0x114
main.main()
        /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:202 +0x4ca

4. What is your TiDB version? (Required)

sh-4.2# ./bin/tidb-server -V
Release Version: v6.1.1
Edition: Community
Git Commit Hash: 1f7e2ce63ddddd5e772e7f4efa17492d2017ed26
Git Branch: heads/refs/tags/v6.1.1
UTC Build Time: 2022-08-23 08:30:42
GoVersion: go1.18.5
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

sh-4.2# cat *.md5
887a614f3bca86d06be698a274b09d85  audit/audit-1.so
1b944c57ef8a479bbd4130ebb5e4eb45  whitelist/whitelist-1.so
@aytrack aytrack added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra severity/critical labels Aug 23, 2022
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 labels Aug 23, 2022
@xhebox
Copy link
Contributor

xhebox commented Aug 23, 2022

Introduced by #36792, will be fixed by #37321

@bb7133 bb7133 removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 may-affects-6.2 labels Aug 23, 2022
ti-chi-bot pushed a commit that referenced this issue Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 severity/critical sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants