Skip to content

Service breaks when an error occurs during a rewind in objectManager websocket #3092

@cesnietor

Description

@cesnietor

NOTE

If this case is urgent, please subscribe to Subnet so that our 24/7 support team may help you faster.

Potential culprit https://github.com/minio/console/blob/master/restapi/ws_objects.go#L171

Error while reading objectManager message
%!(EXTRA *net.OpError=read tcp [::1]:9090->[::1]:50292: use of closed network connection)panic: close of closed channel

goroutine 117 [running]:
github.com/minio/console/restapi.(*wsMinioClient).objectManager.func2()
	github.com/minio/console/restapi/ws_objects.go:52 +0x338
created by github.com/minio/console/restapi.(*wsMinioClient).objectManager in goroutine 116
	github.com/minio/console/restapi/ws_objects.go:47 +0x108

Expected Behavior

If an error occurs, it should close the channels and websockets gracefully without breaking the app.
UI should show that something went wrong by sending the right error message. (use WSResponse)

Current Behavior

It's closing a channel that was already closed.
App breaks.

Possible Solution

Steps to Reproduce (for bugs)

  1. Hardcode an error in the rewind case. in ws_objects.go :
s3Client, err := newS3BucketClient(session, objectRqConfigs.BucketName, objectRqConfigs.Prefix, clientIP)
err = fmt.Errorf("someError")
if err != nil {
	LogError("error creating S3Client:", err)
	cancel()
	return
}
  1. Create a versioned bucket
  2. Click on List Deleted Versions in the UI

Context

Regression

Your Environment

  • MinIO version used (minio --version): Console v0.40.0
  • Server setup and configuration:
  • Operating System and version (uname -a):

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions