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

Fix race between block initialization and receiver disconnection #121646

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

ibraheemdev
Copy link
Member

@rustbot
Copy link
Collaborator

rustbot commented Feb 26, 2024

r? @ChrisDenton

rustbot has assigned @ChrisDenton.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 26, 2024
@ChrisDenton
Copy link
Member

The queue looks relatively light (once the current rollup is done) so I'll boost this one to the top

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Feb 26, 2024

📌 Commit 580b003 has been approved by ChrisDenton

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 26, 2024
@bors
Copy link
Contributor

bors commented Feb 26, 2024

⌛ Testing commit 580b003 with merge fc3800f...

@klensy
Copy link
Contributor

klensy commented Feb 26, 2024

Needs beta backport?

@ChrisDenton ChrisDenton added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Feb 26, 2024
@bors
Copy link
Contributor

bors commented Feb 26, 2024

☀️ Test successful - checks-actions
Approved by: ChrisDenton
Pushing fc3800f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 26, 2024
@bors bors merged commit fc3800f into rust-lang:master Feb 26, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 26, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fc3800f): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.2% [1.2%, 1.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
4.1% [3.8%, 4.4%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.7% [-1.7%, -1.7%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.1% [-1.7%, 4.4%] 3

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.6% [1.6%, 1.6%] 1
Regressions ❌
(secondary)
1.3% [1.3%, 1.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.6% [1.6%, 1.6%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 650.626s -> 651.881s (0.19%)
Artifact size: 311.12 MiB -> 311.16 MiB (0.01%)

@m-ou-se
Copy link
Member

m-ou-se commented Feb 28, 2024

We don't usually backport fixes for non-critical bugs that have already been around for a while on stable.

@m-ou-se m-ou-se removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Feb 28, 2024
@m-ou-se
Copy link
Member

m-ou-se commented Feb 28, 2024

We briefly discussed this in the libs team meeting. We didn't have consenesus on backporting this, due to the bug already being around for a long time on stable and the low severity of the bug (a memory leak).

@ibraheemdev
Copy link
Member Author

The race occurs if the receiver half of an empty channel is dropped while a sender is trying to send, which is not very likely. I don't think this needs to be backported.

jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 29, 2024
Document potential memory leak in unbounded channel

Follow up on rust-lang#121646.
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 29, 2024
Document potential memory leak in unbounded channel

Follow up on rust-lang#121646.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 29, 2024
Rollup merge of rust-lang#121778 - ibraheemdev:patch-19, r=RalfJung

Document potential memory leak in unbounded channel

Follow up on rust-lang#121646.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Occasional memory leak in mpsc channels
8 participants