Skip to content

fix: GLS slot not cleaned up after goroutine exits#232

Merged
RomainMuller merged 4 commits into
mainfrom
romain.marcadier/properly-manage-gls-slot
Aug 22, 2024
Merged

fix: GLS slot not cleaned up after goroutine exits#232
RomainMuller merged 4 commits into
mainfrom
romain.marcadier/properly-manage-gls-slot

Conversation

@RomainMuller
Copy link
Copy Markdown
Contributor

What does this PR do?

Specifically nil out the GLS slot when the goroutine exits, so that the underlying map can be GC'd and it is not incorrectly re-used by the next goroutine if that g is recycled from the gf list.

Motivation

The GLS slot was not reset to nil when the goroutine exits, causing the old context to be re-
used whenever the g object was recycled from the free list.

The GLS slot was not reset to nil when the goroutine exits, causing the old
context to be re-used whenever the g object was recycled from the free list.
@RomainMuller RomainMuller requested a review from a team as a code owner August 20, 2024 08:41
…erly-manage-gls-slot

# Conflicts:
#	internal/injector/builtin/generated.go
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.82%. Comparing base (97384a5) to head (155f1cb).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #232   +/-   ##
=======================================
  Coverage   61.82%   61.82%           
=======================================
  Files          93       93           
  Lines        5027     5027           
=======================================
  Hits         3108     3108           
  Misses       1592     1592           
  Partials      327      327           
Flag Coverage Δ
ARM64 45.16% <ø> (ø)
Linux 66.59% <ø> (ø)
Windows 43.83% <ø> (ø)
X64 61.82% <ø> (ø)
generator 42.71% <ø> (ø)
go 51.52% <ø> (ø)
go1.22 45.16% <ø> (ø)
go1.23 44.94% <ø> (ø)
integration 46.26% <ø> (ø)
macOS 45.16% <ø> (ø)
unit 40.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RomainMuller RomainMuller added this pull request to the merge queue Aug 22, 2024
Merged via the queue into main with commit 0922cdc Aug 22, 2024
@RomainMuller RomainMuller deleted the romain.marcadier/properly-manage-gls-slot branch August 22, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants