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

panic on args #214

Open
derekperkins opened this issue Jan 23, 2023 · 1 comment
Open

panic on args #214

derekperkins opened this issue Jan 23, 2023 · 1 comment
Assignees
Labels
bug Something isn't working dmap release:v0.5.x Issues related with 0.5.x

Comments

@derekperkins
Copy link
Contributor

This is similar to #208, but panics in the arg creation, not execOnPipeline itself. Possible it is an upstream issue, I haven't looked into it.

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

goroutine 2150125 [running]:
github.com/go-redis/redis/v8.(*StringCmd).Args(0x1fc4ae0?)
	<autogenerated>:1
github.com/buraksezer/olric.(*DMapPipeline).execOnPartition(0xc00360a9c0, {0x2ae6c28, 0xc0056d4150}, 0xc000e0f750?)
	/Users/derek/go/pkg/mod/github.com/buraksezer/olric@v0.5.2/pipeline.go:483 +0x322
github.com/buraksezer/olric.(*DMapPipeline).Exec.func1()
	/Users/derek/go/pkg/mod/github.com/buraksezer/olric@v0.5.2/pipeline.go:532 +0x6e
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/Users/derek/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 +0x64
@buraksezer buraksezer self-assigned this Jan 25, 2023
@buraksezer buraksezer added bug Something isn't working dmap release:v0.5.x Issues related with 0.5.x labels Jan 25, 2023
@buraksezer
Copy link
Owner

This is not possible to debug on my side. NewStringCmd can take a nil argument. This is how it is created:

func NewStringCmd(ctx context.Context, args ...interface{}) *StringCmd {
	return &StringCmd{
		baseCmd: baseCmd{
			ctx:  ctx,
			args: args,
		},
	}
}

It seems that if args contains a nil, it can lead to a panic in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dmap release:v0.5.x Issues related with 0.5.x
Projects
None yet
Development

No branches or pull requests

2 participants