Skip to content

x/telemetry: file extension is not concurrency safe #67818

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

Closed
findleyr opened this issue Jun 4, 2024 · 1 comment
Closed

x/telemetry: file extension is not concurrency safe #67818

findleyr opened this issue Jun 4, 2024 · 1 comment
Assignees
Labels
telemetry x/telemetry issues
Milestone

Comments

@findleyr
Copy link
Member

findleyr commented Jun 4, 2024

As in the description: extending the telemetry file is not concurrency safe.

Reproducible by making ./internal/counter.TestLarge concurrent:

unexpected fault address 0x7f206e535920
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0x7f206e535920 pc=0x5387b2]

goroutine 11378 gp=0xc0039d28c0 m=28 mp=0xc001508008 [running]:
runtime.throw({0x58307e?, 0x0?})
        /usr/local/google/home/rfindley/src/go/src/runtime/panic.go:1067 +0x48 fp=0xc00055cd98 sp=0xc00055cd68 pc=0x46c408
runtime.sigpanic()
        /usr/local/google/home/rfindley/src/go/src/runtime/signal_unix.go:914 +0x26c fp=0xc00055cdf8 sp=0xc00055cd98 pc=0x46dc4c
sync/atomic.(*Uint64).Load(...)
        /usr/local/google/home/rfindley/src/go/src/sync/atomic/type.go:169
golang.org/x/telemetry/internal/counter.(*Counter).add(...)
        /usr/local/google/home/rfindley/src/telemetry/internal/counter/counter.go:252
golang.org/x/telemetry/internal/counter.(*Counter).releaseLock(0xc00171d7c0, 0x7fffffff)
        /usr/local/google/home/rfindley/src/telemetry/internal/counter/counter.go:233 +0x312 fp=0xc00055cea8 sp=0xc00055cdf8 pc=0x5387b2
golang.org/x/telemetry/internal/counter.(*Counter).Add(0xc00171d7c0, 0x264)
        /usr/local/google/home/rfindley/src/telemetry/internal/counter/counter.go:178 +0x38a fp=0xc00055cf50 sp=0xc00055cea8 pc=0x5380ea
golang.org/x/telemetry/internal/counter.TestLarge.func2()
        /usr/local/google/home/rfindley/src/telemetry/internal/counter/counter_test.go:165 +0x118 fp=0xc00055cfe0 sp=0xc00055cf50 pc=0x53f3b8
runtime.goexit({})
        /usr/local/google/home/rfindley/src/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc00055cfe8 sp=0xc00055cfe0 pc=0x473dc1
created by golang.org/x/telemetry/internal/counter.TestLarge in goroutine 17
        /usr/local/google/home/rfindley/src/telemetry/internal/counter/counter_test.go:162 +0x225

I will fix this soon, for [email protected].

CC @golang/telemetry

@findleyr findleyr added this to the gopls/v0.16.0 milestone Jun 4, 2024
@findleyr findleyr self-assigned this Jun 4, 2024
@gopherbot gopherbot added the telemetry x/telemetry issues label Jun 4, 2024
@findleyr
Copy link
Member Author

findleyr commented Jun 4, 2024

Whoops, this appears to be an error in my test. I haven't yet demonstrated a bug.

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
telemetry x/telemetry issues
Projects
None yet
Development

No branches or pull requests

2 participants