Skip to content

Commit 6dd42ba

Browse files
committed
fix: avoid calling sendLog in a goroutine on a closed logger
- Calling p.sendLog in a goroutine allows the goroutine to escape the mutex that is being held by a calling function, presenting an opportunity for concurrent read/writes to occur on the map.
1 parent f35ece5 commit 6dd42ba

File tree

3 files changed

+47
-261
lines changed

3 files changed

+47
-261
lines changed

go.mod

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ module github.com/coder/coder-kubernetes-logs
33
go 1.20
44

55
// Required to import the codersdk!
6-
replace tailscale.com => github.com/coder/tailscale v1.1.1-0.20230418202606-ed9307cf1b22
6+
replace tailscale.com => github.com/coder/tailscale v0.0.0-20230522123520-74712221d00f
7+
8+
replace gvisor.dev/gvisor => github.com/coder/gvisor v0.0.0-20230714132058-be2e4ac102c3
79

810
require (
911
cdr.dev/slog v1.5.3
12+
github.com/breml/rootcerts v0.2.11
1013
github.com/coder/coder v0.23.6-0.20230522192129-95839109db09
11-
github.com/coder/retry v1.3.1-0.20230210155434-e90a2e1e091d
14+
github.com/fatih/color v1.15.0
1215
github.com/spf13/cobra v1.7.0
1316
github.com/stretchr/testify v1.8.2
1417
github.com/zeebo/assert v1.3.0
@@ -32,17 +35,17 @@ require (
3235
github.com/armon/go-radix v1.0.0 // indirect
3336
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
3437
github.com/beorn7/perks v1.0.1 // indirect
35-
github.com/breml/rootcerts v0.2.11 // indirect
38+
github.com/bytedance/sonic v1.10.2 // indirect
3639
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
3740
github.com/cespare/xxhash/v2 v2.2.0 // indirect
3841
github.com/charmbracelet/lipgloss v0.7.1 // indirect
42+
github.com/coder/retry v1.3.1-0.20230210155434-e90a2e1e091d // indirect
3943
github.com/coder/terraform-provider-coder v0.6.23 // indirect
4044
github.com/coreos/go-iptables v0.6.0 // indirect
4145
github.com/coreos/go-oidc/v3 v3.6.0 // indirect
4246
github.com/davecgh/go-spew v1.1.1 // indirect
4347
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
4448
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
45-
github.com/fatih/color v1.15.0 // indirect
4649
github.com/fxamacker/cbor/v2 v2.4.0 // indirect
4750
github.com/ghodss/yaml v1.0.0 // indirect
4851
github.com/go-chi/chi/v5 v5.0.8 // indirect
@@ -54,6 +57,7 @@ require (
5457
github.com/go-openapi/jsonreference v0.20.1 // indirect
5558
github.com/go-openapi/swag v0.22.3 // indirect
5659
github.com/gobwas/glob v0.2.3 // indirect
60+
github.com/goccy/go-json v0.10.2 // indirect
5761
github.com/godbus/dbus/v5 v5.1.0 // indirect
5862
github.com/gogo/protobuf v1.3.2 // indirect
5963
github.com/golang/glog v1.0.0 // indirect
@@ -175,7 +179,6 @@ require (
175179
google.golang.org/grpc v1.54.0 // indirect
176180
google.golang.org/protobuf v1.30.0 // indirect
177181
gopkg.in/inf.v0 v0.9.1 // indirect
178-
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
179182
gopkg.in/yaml.v2 v2.4.0 // indirect
180183
gopkg.in/yaml.v3 v3.0.1 // indirect
181184
gvisor.dev/gvisor v0.0.0-20221203005347-703fd9b7fbc0 // indirect

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy