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

honor canceled context and do not leak on mergeChannels #15034

Merged
merged 1 commit into from Jun 3, 2022

Conversation

harshavardhana
Copy link
Member

Description

honor canceled context and do not leak on mergeChannels

Motivation and Context

mergeEntryChannels has the potential to perpetually
wait on the results channel, context might be closed
and we did not honor the caller context canceling.

How to test this PR?

Not sure, but it looks like reproduced here #15033

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Documentation updated
  • Unit tests added/updated

mergeEntryChannels has the potential to perpetually
wait on the results channel, context might be closed
and we did not honor the caller context canceling.
@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-gateway-s3.sh ✔️
mint-erasure.sh ✔️
mint-compress-encrypt-dist-erasure.sh ✔️
mint-pools.sh ✔️
mint-dist-erasure.sh more...

15034-3611125/mint-dist-erasure.sh.log:

Running with
SERVER_ENDPOINT:      minio-k8s2:32533
ACCESS_KEY:           minio
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0
RUN_ON_FAIL:          0

To get logs, run 'docker cp :/mint/log /tmp/mint-logs'

(1/15) Running aws-sdk-go tests ... done in 0 seconds
(2/15) Running aws-sdk-java tests ... done in 2 seconds
(3/15) Running aws-sdk-php tests ... done in 43 seconds
(4/15) Running aws-sdk-ruby tests ... done in 6 seconds
(5/15) Running awscli tests ... done in 55 seconds
(6/15) Running healthcheck tests ... done in 0 seconds
(7/15) Running mc tests ... done in 29 seconds
(8/15) Running minio-dotnet tests ... done in 6 minutes and 12 seconds
(9/15) Running minio-go tests ... done in 1 minutes and 37 seconds
(10/15) Running minio-java tests ... done in 33 seconds
(11/15) Running minio-js tests ... FAILED in 53 seconds
{
  "name": "minio-js",
  "function": "\"after all\" hook for \"removeObjects(bucketName, objectsList)",
  "args": "bucketName:minio-js-test-ver-presign-a2a93fbf-07a8-410c-a0fe-4dc15bcbf1f4\"",
  "duration": 5,
  "status": "FAIL",
  "error": "S3Error: The bucket you tried to delete is not empty. You must delete all versions in the bucket. at Object.parseError (node_modules/minio/dist/main/xml-parsers.js:71:11) at /mint/run/core/minio-js/node_modules/minio/dist/main/transformers.js:166:22 at DestroyableTransform._flush (node_modules/minio/dist/main/transformers.js:90:10) at DestroyableTransform.prefinish (node_modules/readable-stream/lib/_stream_transform.js:129:10) at prefinish (node_modules/readable-stream/lib/_stream_writable.js:611:14) at finishMaybe (node_modules/readable-stream/lib/_stream_writable.js:620:5) at endWritable (node_modules/readable-stream/lib/_stream_writable.js:643:3) at DestroyableTransform.Writable.end (node_modules/readable-stream/lib/_stream_writable.js:571:22) at IncomingMessage.onend (internal/streams/readable.js:670:10) at endReadableNT (internal/streams/readable.js:1333:12) at processTicksAndRejections (internal/process/task_queues.js:82:21)"
}
(11/15) Running minio-py tests ... done in 1 minutes and 18 seconds
(12/15) Running s3cmd tests ... done in 31 seconds
(13/15) Running s3select tests ... done in 4 seconds
(14/15) Running versioning tests ... done in 3 minutes and 4 seconds

Executed 14 out of 15 tests successfully.

Deleting image on docker hub
Deleting image locally

Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harshavardhana harshavardhana merged commit c3e1da8 into minio:master Jun 3, 2022
@harshavardhana harshavardhana deleted the remove-potential-leaks branch June 3, 2022 12:59
vadmeste pushed a commit to vadmeste/minio that referenced this pull request Dec 12, 2022
mergeEntryChannels has the potential to perpetually
wait on the results channel, context might be closed
and we did not honor the caller context canceling.
harshavardhana added a commit that referenced this pull request Mar 6, 2023
mergeEntryChannels has the potential to perpetually
wait on the results channel, context might be closed
and we did not honor the caller context canceling.
@bh4t bh4t added the bugfix label Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants