Skip to content

[BUG] k8s environment nil pointer dereference. github.com/openimsdk/open-im-server/v3/pkg/common/cmd.(*RootCmd).persistentPreRun #3367

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

Open
liserc opened this issue May 19, 2025 · 0 comments
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@liserc
Copy link

liserc commented May 19, 2025

OpenIM Server Version

main

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x168 pc=0xecbdd7]

goroutine 1 [running]:
go.etcd.io/etcd/client/v3.(*Client).Close(0x0)
/go/pkg/mod/go.etcd.io/etcd/client/[email protected]/client.go:143 +0x17
github.com/openimsdk/open-im-server/v3/pkg/common/cmd.(*RootCmd).persistentPreRun(0xc000819508, 0xc000819508, {0xc00070a240, 0x1, 0xc0001ea800?})
/openim-server/pkg/common/cmd/root.go:113 +0x105
github.com/openimsdk/open-im-server/v3/pkg/common/cmd.NewRootCmd.func1(0xc0001ea800?, {0x268cf45?, 0x4?, 0x268cf49?})
/openim-server/pkg/common/cmd/root.go:70 +0x29
github.com/spf13/cobra.(*Command).execute(0xc000819508, {0xc0000500a0, 0x0, 0x0})
/go/pkg/mod/github.com/spf13/[email protected]/command.go:954 +0x951
github.com/spf13/cobra.(*Command).ExecuteC(0xc000819508)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039
github.com/openimsdk/open-im-server/v3/pkg/common/cmd.(*RootCmd).Execute(...)
/openim-server/pkg/common/cmd/root.go:246
github.com/openimsdk/open-im-server/v3/pkg/common/cmd.(*ApiCmd).Exec(...)
/openim-server/pkg/common/cmd/api.go:72
main.main()
/openim-server/cmd/openim-api/main.go:24 +0x1d

Screenshots Link

if r.etcdClient != nil {
	if err := r.etcdClient.Close(); err != nil {
		return errs.WrapMsg(err, "failed to close etcd client")
	}
}
@liserc liserc added the bug Categorizes issue or PR as related to a bug. label May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

1 participant