Skip to content

tidb server crashes when doing gracful shutdown #48224

@cfzjywxk

Description

@cfzjywxk

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Not clear by now

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

No exception happens.

3. What did you see instead (Required)

The tidb-server crashes because of fatal error

[2023/10/26 18:59:13.564 +00:00] [ERROR] [terror.go:308] ["function call errored"] [error="invalid PlanCacheStmt type"] [stack="github.com/pingcap/tidb/parser/terror.Call\n\t/tidb/parser/terror/terror.go:308\ngithub.com/pingcap/tidb/server.(*TiDBContext).Close\n\t/tidb/server/driver_tidb.go:312\ngithub.com/pingcap/tidb/server.closeConn\n\t/tidb/server/conn.go:361\ngithub.com/pingcap/tidb/server.(*clientConn).Close\n\t/tidb/server/conn.go:345\ngithub.com/pingcap/tidb/server.(*Server).kickIdleConnection\n\t/tidb/server/server.go:901\ngithub.com/pingcap/tidb/server.(*Server).GracefulDown\n\t/tidb/server/server.go:869\nmain.cleanup\n\t/tidb/tidb-server/main.go:842\nmain.main.func1\n\t/tidb/tidb-server/main.go:229\ngithub.com/pingcap/tidb/util/signal.SetupSignalHandler.func2\n\t/tidb/util/signal/signal_posix.go:55"]
[2023/10/26 18:59:13.565 +00:00] [ERROR] [terror.go:308] ["function call errored"] [error="invalid PlanCacheStmt type"] [stack="github.com/pingcap/tidb/parser/terror.Call\n\t/tidb/parser/terror/terror.go:308\ngithub.com/pingcap/tidb/server.(*TiDBContext).Close\n\t/tidb/server/driver_tidb.go:312\ngithub.com/pingcap/tidb/server.closeConn\n\t/tidb/server/conn.go:361\ngithub.com/pingcap/tidb/server.(*clientConn).Close\n\t/tidb/server/conn.go:345\ngithub.com/pingcap/tidb/server.(*Server).onConn.func3\n\t/tidb/server/server.go:624\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/tidb/server/server.go:664"]
[2023/10/26 18:59:13.569 +00:00] [ERROR] [terror.go:308] ["function call errored"] [error="invalid PlanCacheStmt type"] [stack="github.com/pingcap/tidb/parser/terror.Call\n\t/tidb/parser/terror/terror.go:308\ngithub.com/pingcap/tidb/server.(*TiDBContext).Close\n\t/tidb/server/driver_tidb.go:312\ngithub.com/pingcap/tidb/server.closeConn\n\t/tidb/server/conn.go:361\ngithub.com/pingcap/tidb/server.(*clientConn).Close\n\t/tidb/server/conn.go:345\ngithub.com/pingcap/tidb/server.(*Server).kickIdleConnection\n\t/tidb/server/server.go:901\ngithub.com/pingcap/tidb/server.(*Server).GracefulDown\n\t/tidb/server/server.go:869\nmain.cleanup\n\t/tidb/tidb-server/main.go:842\nmain.main.func1\n\t/tidb/tidb-server/main.go:229\ngithub.com/pingcap/tidb/util/signal.SetupSignalHandler.func2\n\t/tidb/util/signal/signal_posix.go:55"]

fatal error: concurrent map writes



4. What is your TiDB version? (Required)

v6.5.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.severity/majorsig/sql-infraSIG: SQL Infratype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions