Skip to content

SeaweedFS 文件下载失败(unexpected EOF)导致空指针解引用(panic) #1614

@Sunlight-C

Description

@Sunlight-C

Bug 描述
由于网络连接出现短时波动造成Worker节点连接不到FS从而导致全部节点重启

复现步骤
unexpected EOF
... in (*SeaweedFsManager).downloadFile()
... in (*SeaweedFsManager).syncRemoteToLocal()
在 service.go 第 123 行,代码试图访问一个 nil 指针

Worker 启动

尝试从 master 的 filer (SeaweedFS) 同步文件

连接中断 / 响应异常 → unexpected EOF

代码未正确处理错误,返回了 nil 或无效对象

后续逻辑(Fetch)访问 nil 字段

panic: invalid memory address

进程崩溃,Exit Code 2

Kubernetes 重启 Pod

期望结果
在crawlab-core/task/handler/service.go 的 Fetch 方法中增加 nil 判空:

if someObj == nil {
log.Error("object is nil, skip")
return
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions