TIDB创建索引报错invalid memory address or nil pointer dereference

create index IDX_R_MEMID_TYPE
on zhcx.bike_transaction (rent_time, mem_id, mem_id_type);

[2024/11/22 16:17:21.977 +08:00] [ERROR] [task_executor.go:258] [“BaseTaskExecutor panicked”] [task-id=30013] [task-type=backfill] [recover=“runtime error: invalid memory address or nil pointer dereference”] [stack=“github.com/pingcap/tidb/pkg/disttask/framework/taskexecutor.(*BaseTaskExecutor).RunStep.func1
/workspace/source/tidb/pkg/disttask/framework/taskexecutor/task_executor.go:258
runtime.gopanic
/usr/local/go/src/runtime/panic.go:914
runtime.panicmem
/usr/local/go/src/runtime/panic.go:261
runtime.sigpanic
/usr/local/go/src/runtime/signal_unix.go:861
github.com/pingcap/tidb/pkg/ddl.(*backfillDistExecutor).getBackendCtx
/workspace/source/tidb/pkg/ddl/backfilling_dist_executor.go:143
github.com/pingcap/tidb/pkg/ddl.newReadIndexExecutor
/workspace/source/tidb/pkg/ddl/backfilling_read_index.go:73
github.com/pingcap/tidb/pkg/ddl.(*backfillDistExecutor).newBackfillSubtaskExecutor
/workspace/source/tidb/pkg/ddl/backfilling_dist_executor.go:120
github.com/pingcap/tidb/pkg/ddl.(*backfillDistExecutor).GetStepExecutor
/workspace/source/tidb/pkg/ddl/backfilling_dist_executor.go:199
github.com/pingcap/tidb/pkg/disttask/framework/taskexecutor.(*BaseTaskExecutor).runStep
/workspace/source/tidb/pkg/disttask/framework/taskexecutor/task_executor.go:312
github.com/pingcap/tidb/pkg/disttask/framework/taskexecutor.(*BaseTaskExecutor).RunStep
/workspace/source/tidb/pkg/disttask/framework/taskexecutor/task_executor.go:266
github.com/pingcap/tidb/pkg/disttask/framework/taskexecutor.(*BaseTaskExecutor).Run
/workspace/source/tidb/pkg/disttask/framework/taskexecutor/task_executor.go:246
github.com/pingcap/tidb/pkg/disttask/framework/taskexecutor.(*Manager).startTaskExecutor.func1
/workspace/source/tidb/pkg/disttask/framework/taskexecutor/manager.go:337
github.com/pingcap/tidb/pkg/util.(*WaitGroupWrapper).RunWithLog.func1
/workspace/source/tidb/pkg/util/wait_group_wrapper.go:171”]

什么版本呢?能复现吗 ? 感觉触发 bug 了

stack 好像这个 issue:

是不是跟这个类似?不过这个应该是已经在v7修复了。可以参考参考里面的解决方案。

好难过,没有复现你这个

错误信息中提到“invalid memory address or nil pointer dereference”,这通常意味着代码尝试访问一个未初始化或已被释放的内存地址。这可能是由于底层库的bug或者代码中的逻辑错误导致的,找个其他版本的环境,再试试要是没这问题就是版本问题