Node Exception Handling Report: panic: engine start failed. error: %+v idx out of range
【问题分类】
- bug
- P2P网络相关(包含libp2p,liquid)
- 链账户身份与权限相关(证书问题、public、多签投票问题)
- 核心交易引擎相关(交易池、DAG)
- 共识相关
- 智能合约相关
- 存储相关
- SDK相关
- 长安链CMC工具
- 长安链管理台
- 长安链浏览器
- 长安链合约IDE
- 长安链web签名插件
- 跨链相关
- 轻节点相关
- 隐私计算相关
- 密码学相关
- 环境依赖
- 其他补充:
【问题描述】(请对问题进行描述,方便定位问题)
When modifying configurations to start a node, I encountered an error in the exception handling message that included %+v
. Normally, this should be part of a formatted string, and if matched properly, it should not appear in the printed output.
After analyzing the exception stack step by step, I located the issue at /root/go/pkg/mod/chainmaker.org/chainmaker/consensus-maxbft/v2@v2.3.5/epoch/epoch.go:114
. The problem occurs in line 114, where the method e.log.Panic
is used for output. This method does not format strings but directly outputs comma-separated contents.
The e.log
object has another method, Panicf
, which can format strings for output. Replacing Panic
with Panicf
would allow the output to be formatted properly.
【相关日志文件】(如果有报错日志请贴图,或者上传附件)
chainmaker-go 的 log/system.log & bin/panic.log file *
SDK 的 sdk.log file
【系统信息】(请填写系统信息,方便定位问题)
- chainmaker-go version * : [v2.3.4]
- OS & version * : ubuntu-22.04.3-live-server-amd64, Linux version 5.15.0-119-generic