Skip to content

DATA RACE: Is this an Echo Data Race or is it something I am doing #2306

@wayneforrest

Description

@wayneforrest

Issue Description

I am experiencing a DATA RACE and I am not sure what the cause is. Is this an Echo Issue or is it something that I am doing?

I interpret this as the context is being reset, the write operation, while I try to read the request : echo.Contex.Request().

`WARNING: DATA RACE Write at 0x00c000168a00 by goroutine 15298: github.com/labstack/echo/v4.(*context).Reset() /Users/user/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/context.go:626 +0x70 github.com/labstack/echo/v4.(*Echo).ServeHTTP() /Users/user/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/echo.go:612 +0x68 net/http.serverHandler.ServeHTTP() /opt/homebrew/Cellar/go/1.19.2/libexec/src/net/http/server.go:2947 +0x4f4 net/http.initALPNRequest.ServeHTTP() /opt/homebrew/Cellar/go/1.19.2/libexec/src/net/http/server.go:3556 +0x290 net/http.(*initALPNRequest).ServeHTTP() <autogenerated>:1 +0x74 net/http.Handler.ServeHTTP-fm() <autogenerated>:1 +0x60 net/http.(*http2serverConn).runHandler() /opt/homebrew/Cellar/go/1.19.2/libexec/src/net/http/h2_bundle.go:5911 +0x98 net/http.(*http2serverConn).processHeaders.func1() /opt/homebrew/Cellar/go/1.19.2/libexec/src/net/http/h2_bundle.go:5641 +0x58 Previous read at 0x00c000168a00 by goroutine 15262: github.com/labstack/echo/v4.(*context).Request() /Users/user/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/context.go:232 +0x2c main.serveFile() /Users/user/Documents/Projects/Racing/racer/cmd/server.go:139 +0x174 main.handleGetRequest.func1() /Users/user/Documents/Projects/Racing/racer/cmd/server.go:208 +0x2a0 github.com/labstack/echo/v4.(*Echo).add.func1() /Users/user/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/echo.go:520 +0x70 github.com/labstack/echo/v4/middleware.echoHandlerFuncWrapper.ServeHTTP() /Users/user/go/pkg/mod/github.com/labstack/echo/v4@v4.7.2/middleware/timeout.go:164 +0x16c github.com/labstack/echo/v4/middleware.(*echoHandlerFuncWrapper).ServeHTTP() <autogenerated>:1 +0x8c net/http.(*timeoutHandler).ServeHTTP.func1() /opt/homebrew/Cellar/go/1.19.2/libexec/src/net/http/server.go:3407 +0xac` 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions