Skip to content

Conversation

@tire-fire
Copy link
Contributor

fatal error: concurrent map iteration and map write

goroutine 366332 [running]:
internal/runtime/maps.fatal({0x108cc23?, 0x47bc2f?})
/usr/local/go/src/runtime/panic.go:1046 +0x18
internal/runtime/maps.(*Iter).Next(0xc000b09640?)
/usr/local/go/src/internal/runtime/maps/table.go:792 +0x86
quotient/www/api.GetUptimeStatus({0x121bb10, 0xc0004fc5a0}, 0xc000210b40)
/src/www/api/graphs.go:198 +0x91b
net/http.HandlerFunc.ServeHTTP(...)
/usr/local/go/src/net/http/server.go:2322
quotient/www/middleware.Logging.func1({0x121bb10, 0xc0004fc5a0}, 0xc000210b40)
/src/www/middleware/logging.go:25 +0x2b8
net/http.HandlerFunc.ServeHTTP(...)
/usr/local/go/src/net/http/server.go:2322
quotient/www/middleware.Cors.func1({0x121bb10, 0xc0004fc5a0}, 0xc000210b40)
/src/www/middleware/cors.go:18 +0x272
quotient/www.(*Router).Start.Authentication.func2.1({0x121bb10, 0xc0004fc5a0}, 0xc000210a00)
/src/www/middleware/authentication.go:41 +0x31e
net/http.HandlerFunc.ServeHTTP(0xc00045aa80?, {0x121bb10?, 0xc0004fc5a0?}, 0xec4500?)
/usr/local/go/src/net/http/server.go:2322 +0x29
net/http.(*ServeMux).ServeHTTP(0x12?, {0x121bb10, 0xc0004fc5a0}, 0xc000210a00)
/usr/local/go/src/net/http/server.go:2861 +0x1c7

The engine goroutine was writing to se.UptimePerService in processCollectedResults while an HTTP handler was iterating the same map in GetUptimeStatus at graphs.go:198. Go's runtime detected this and killed the process.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant