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

[bug] bcs-client nil map 赋值导致崩溃 #682

Closed
AlexAi27 opened this issue Dec 3, 2020 · 0 comments
Closed

[bug] bcs-client nil map 赋值导致崩溃 #682

AlexAi27 opened this issue Dec 3, 2020 · 0 comments
Assignees
Labels
bug Something isn't working confirmed issue is confirmed inner issue comes from Tencent side
Milestone

Comments

@AlexAi27
Copy link
Collaborator

AlexAi27 commented Dec 3, 2020

问题描述

bcs-client 中对application、process的update操作使用了未初始化的 url.Values 导致程序访问空指针。

重现方法

使用bcs-client对application、process进行update操作

bcs-client update --type application --clusterid BCS-MESOS-10000 -f ./mesos/reqdatas/application/app_update.json --instance 1
panic: assignment to entry in nil map

goroutine 1 [running]:
net/url.Values.Add(...)
	/usr/lib/golang/src/net/url/url.go:854
github.com/Tencent/bk-bcs/bcs-services/bcs-client/cmd/update.updateApplication(0xc0003ada68, 0x4, 0xc00007e780)
	/data/project/src/github.com/Tencent/bk-bcs/bcs-services/bcs-client/cmd/update/application.go:45 +0x208
github.com/Tencent/bk-bcs/bcs-services/bcs-client/cmd/update.update(0xc0003ada68, 0xc000043ea1, 0x1441dc4)
	/data/project/src/github.com/Tencent/bk-bcs/bcs-services/bcs-client/cmd/update/update.go:64 +0xe1
github.com/Tencent/bk-bcs/bcs-services/bcs-client/cmd/update.NewUpdateCommand.func1(0xc0000d86e0, 0x0, 0xc0000b0240)
	/data/project/src/github.com/Tencent/bk-bcs/bcs-services/bcs-client/cmd/update/update.go:47 +0x68
github.com/urfave/cli.HandleAction(0x120aae0, 0x14a2c20, 0xc0000d86e0, 0xc0000d86e0, 0x0)
	/data/project/pkg/mod/github.com/urfave/cli@v1.22.4/app.go:526 +0x11a
github.com/urfave/cli.Command.Run(0x14439ee, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x148d942, 0x61, 0x0, ...)
	/data/project/pkg/mod/github.com/urfave/cli@v1.22.4/command.go:174 +0x57a
github.com/urfave/cli.(*App).Run(0xc00003fa40, 0xc00003c0a0, 0xa, 0xa, 0x0, 0x0)
	/data/project/pkg/mod/github.com/urfave/cli@v1.22.4/app.go:279 +0x7c7
main.main()
	/data/project/src/github.com/Tencent/bk-bcs/bcs-services/bcs-client/cmd/main.go:86 +0xe5b
@AlexAi27 AlexAi27 added the bug Something isn't working label Dec 3, 2020
AlexAi27 added a commit to AlexAi27/bk-bcs that referenced this issue Dec 3, 2020
@DeveloperJim DeveloperJim added this to the 1.20.x milestone Dec 4, 2020
@DeveloperJim DeveloperJim added confirmed issue is confirmed inner issue comes from Tencent side mesos labels Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed issue is confirmed inner issue comes from Tencent side
Projects
None yet
Development

No branches or pull requests

2 participants