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

gin with golang 1.21, 1.22 DATA RACE #3929

Closed
georgehao opened this issue Apr 21, 2024 · 0 comments
Closed

gin with golang 1.21, 1.22 DATA RACE #3929

georgehao opened this issue Apr 21, 2024 · 0 comments

Comments

@georgehao
Copy link

georgehao commented Apr 21, 2024

Description

gin 1.9.1 with 1.21, 1.22 something occurs data race. btw under 1.20 is ok

WARNING: DATA RACE
Write at 0x00c000323820 by goroutine 573:
  github.com/gin-gonic/gin.(*Engine).ServeHTTP()
      /Users/xx/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:573 +0xd0
  net/http.serverHandler.ServeHTTP()
      /Users/xx/sdk/go1.22.2/src/net/http/server.go:3137 +0x2a8
  net/http.(*conn).serve()
      /Users/xx/sdk/go1.22.2/src/net/http/server.go:2039 +0xf28
  net/http.(*Server).Serve.gowrap3()
      /Users/xx/sdk/go1.22.2/src/net/http/server.go:3285 +0x4c

Previous read at 0x00c000323820 by goroutine 554:
  github.com/gin-gonic/gin.(*Context).hasRequestContext()
      /Users/xx/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:1186 +0x8c
  github.com/gin-gonic/gin.(*Context).Err()
      /Users/xx/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:1208 +0x108
  database/sql.(*Rows).awaitDone()
      /Users/xx/sdk/go1.22.2/src/database/sql/sql.go:3001 +0x200
  database/sql.(*Rows).initContextClose.gowrap1()
      /Users/xx/sdk/go1.22.2/src/database/sql/sql.go:2977 +0x7c

How to reproduce

https://github.com/scroll-tech/scroll/actions/runs/8769487237/job/24065024246?pr=1284

Environment

  • go version: 1.21.x 1.22.x
  • gin version (or commit ref): 1.9.1
  • operating system: mac, linux
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

No branches or pull requests

1 participant