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

🐛 [Bug]: Immutable configuration in Fiber not working as expected #3236

Open
3 tasks done
rebaz94 opened this issue Dec 7, 2024 · 23 comments · Fixed by #3246
Open
3 tasks done

🐛 [Bug]: Immutable configuration in Fiber not working as expected #3236

rebaz94 opened this issue Dec 7, 2024 · 23 comments · Fixed by #3246

Comments

@rebaz94
Copy link

rebaz94 commented Dec 7, 2024

Bug Description

The Immutable configuration option in Fiber, when set to true, is intended to ensure that certain request values (e.g., request bodies) are immutable and accessible beyond the handler's lifecycle. However, enabling this option does not work as expected, resulting in data race errors when the request body is processed within a differernt goroutine.

Documentation Says:

When set to true, this relinquishes the 0-allocation promise in certain cases in order to access the handler values (e.g., request bodies) in an immutable fashion so that these values are available even if you return from the handler.

Am I missing something here, or is this the expected behavior, and I need to manually copy the body to ensure immutability in my code?

How to Reproduce

  1. Create a Fiber app with the Immutable and StreamRequestBody configurations set to true
app := fiber.New(fiber.Config{
    Immutable:         true,
    StreamRequestBody: true,
})
  1. Define a route where the request body is processed in new goroutine:
app.Get("/keep", func(c *fiber.Ctx) error {
    body := c.Body() // Supposed to be immutable
    go func() {
        for i := 0; i < 100; i++ {
            time.Sleep(time.Second)
            var data map[string]any
            err := json.Unmarshal(body, &data)
            fmt.Println(err, data) // Accessing body in a goroutine
        }
    }()
    return c.JSON(map[string]any{"success": true})
})
  1. send multiple concurrent requests
curl --request GET 'http://localhost:8080/keep' \
--header 'Content-Type: application/json' \
--data-raw '{"key": "val"}'

Expected Behavior

The request body c.Body() should remain immutable and safe to access across goroutines without causing data races but actually get a data races

==================
WARNING: DATA RACE
Read at 0x00c00011a080 by goroutine 76:
  encoding/json.checkValid()
  ...
Previous write at 0x00c00011a080 by goroutine 75:
  runtime.slicecopy()
  ...
==================

Fiber Version

v2.52.5

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my problem prior to opening this one.
  • I understand that improperly formatted bug reports may be closed without explanation.
@gaby
Copy link
Member

gaby commented Dec 7, 2024

This is probably happening in v3 too.

@rebaz94
Copy link
Author

rebaz94 commented Dec 17, 2024

@gaby there’s also a data race occurring when storing a reference to fiber.Ctx, even if the request hasn’t been closed yet. This often happens when adding breakpoints in the IDE.

Is there a way to determine if the request has been closed and the fiber.Ctx is no longer valid?

@gaby
Copy link
Member

gaby commented Dec 17, 2024

@rebaz94 We probably missing it somewhere else.

@gaby
Copy link
Member

gaby commented Dec 18, 2024

@rebaz94 Can you share the logs of the data race?

@rebaz94
Copy link
Author

rebaz94 commented Dec 21, 2024

Apologies for the delayed response. Here's a video demonstrating how you can reproduce the issue:

Screen.Recording.2024-12-22.at.2.04.59.AM.mp4

Here the logs

==================
WARNING: DATA RACE
Read at 0x00c0003f23a8 by goroutine 29:
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x40
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous write at 0x00c0003f23a8 by goroutine 28:
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0xb8
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1878 +0x114

Goroutine 29 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.useApiHandler.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:108 +0x7a8
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.baseMiddleware.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:21 +0x17c
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.New.func2()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/server.go:141 +0x63c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 28 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.useApiHandler.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:108 +0x7a8
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.baseMiddleware.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:21 +0x17c
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.New.func2()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/server.go:141 +0x63c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c0003eb830 by goroutine 29:
  runtime.slicecopy()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  github.com/valyala/fasthttp.(*URI).appendSchemeHost()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:826 +0x154
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:816 +0x64
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous read at 0x00c0003eb830 by goroutine 28:
  runtime.slicecopy()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  fmt.(*buffer).write()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/fmt/print.go:104 +0x154
  fmt.(*fmt).pad()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/fmt/format.go:95 +0xd4
  fmt.(*fmt).fmtBs()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/fmt/format.go:368 +0x98
  fmt.(*pp).fmtBytes()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/fmt/print.go:537 +0x17c
  fmt.(*pp).printArg()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/fmt/print.go:743 +0x808
  fmt.(*pp).doPrintf()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/fmt/print.go:1074 +0x974
  fmt.Sprintf()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/fmt/print.go:239 +0x80
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1872 +0x450

Goroutine 29 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.useApiHandler.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:108 +0x7a8
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.baseMiddleware.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:21 +0x17c
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.New.func2()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/server.go:141 +0x63c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 28 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.useApiHandler.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:108 +0x7a8
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.baseMiddleware.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:21 +0x17c
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.New.func2()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/server.go:141 +0x63c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Read at 0x00c0003f23c0 by goroutine 29:
  github.com/valyala/fasthttp.(*URI).RequestURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:684 +0x1d8
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x88
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous write at 0x00c0003f23c0 by goroutine 28:
  github.com/valyala/fasthttp.(*URI).RequestURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:693 +0x660
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x88
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1878 +0x114

Goroutine 29 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.useApiHandler.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:108 +0x7a8
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.baseMiddleware.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:21 +0x17c
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.New.func2()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/server.go:141 +0x63c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 28 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.useApiHandler.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:108 +0x7a8
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.baseMiddleware.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:21 +0x17c
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.New.func2()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/server.go:141 +0x63c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c0003f4058 by goroutine 29:
  github.com/valyala/fasthttp.appendQuotedPath()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/bytesconv.go:293 +0x464
  github.com/valyala/fasthttp.(*URI).RequestURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:684 +0x250
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x88
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous read at 0x00c0003f4058 by goroutine 28:
  runtime.slicecopy()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x194
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1878 +0x114

Goroutine 29 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.useApiHandler.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:108 +0x7a8
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.baseMiddleware.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:21 +0x17c
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.New.func2()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/server.go:141 +0x63c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 28 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.useApiHandler.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:108 +0x7a8
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.baseMiddleware.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:21 +0x17c
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.New.func2()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/server.go:141 +0x63c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c0003eb845 by goroutine 29:
  runtime.slicecopy()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x194
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous write at 0x00c0003eb845 by goroutine 28:
  runtime.slicecopy()
      ../swiftybase/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x194
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1878 +0x114

Goroutine 29 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.useApiHandler.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:108 +0x7a8
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.baseMiddleware.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:21 +0x17c
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.New.func2()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/server.go:141 +0x63c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 28 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.useApiHandler.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:108 +0x7a8
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.baseMiddleware.func1()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/route_handler.go:21 +0x17c
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1030 +0x1bc
  github.com/swiftytime/swiftybase/pkg/swifty_cb/pkg/server.New.func2()
      ../swiftybase/swiftybase/pkg/swifty_cb/pkg/server/server.go:141 +0x63c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/ctx.go:1027 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*App).next()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../swiftybase/pkg/mod/github.com/swiftytime/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../swiftybase/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================

@gaby
Copy link
Member

gaby commented Dec 23, 2024

@rebaz94 Found the issue, it's related to String() implementation.

@aliziyacevik
Copy link
Contributor

I can take a look at this. @gaby

@gaby
Copy link
Member

gaby commented Jan 22, 2025

@aliziyacevik I have the fix, forgot to submit a PR.

@gaby
Copy link
Member

gaby commented Jan 22, 2025

@aliziyacevik Feel free to submit a PR, basically we need the implementation of String() from the main branch to be added in the v2 branch.

@aliziyacevik
Copy link
Contributor

@aliziyacevik I have the fix, forgot to submit a PR.

If you have the fix, I think you should submit it. I haven't got the chance the look at this issue now.

@edvardsanta
Copy link

Is this error still happening? I’ve been trying to help by reproducing the error, and I’ve made several requests based on the code provided, but I haven’t been able to replicate the issue. I tested with both version v2.52.5 and v3, following the steps and making requests as described, but the error doesn’t seem to appear on my end.

@gaby
Copy link
Member

gaby commented Jan 28, 2025

@rebaz94 Can you test using github.com/gofiber/fiber/v2@master

@ReneWerner87
Copy link
Member

it should be fixed with
https://github.com/gofiber/fiber/pull/3246/files

@ReneWerner87
Copy link
Member

you can also test with https://github.com/gofiber/fiber/releases/tag/v2.52.6

@ReneWerner87 ReneWerner87 linked a pull request Jan 28, 2025 that will close this issue
9 tasks
@rebaz94
Copy link
Author

rebaz94 commented Jan 28, 2025

I tried it with the latest version, but the issue is still the same.

WARNING: DATA RACE
Read at 0x00c0006a3779 by goroutine 85:
  github.com/valyala/fasthttp.(*Request).parseURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:958 +0x40
  github.com/valyala/fasthttp.(*Request).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:939 +0x30
  github.com/valyala/fasthttp.(*RequestCtx).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:965 +0x38
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x90

Previous write at 0x00c0006a3779 by goroutine 83:
  github.com/valyala/fasthttp.(*Request).parseURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:961 +0x80
  github.com/valyala/fasthttp.(*Request).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:939 +0x30
  github.com/valyala/fasthttp.(*RequestCtx).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:965 +0x38
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x108

Goroutine 85 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/swiftytime//.New.func2()
      ../app/server.go:242 +0x2b8
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/encryptcookie.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/encryptcookie/encryptcookie.go:35 +0x230
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware()
      ../app/pkg/mod/github.com/ansrivas/fiberprometheus/[email protected]/middleware.go:231 +0x420
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware-fm()
      <autogenerated>:1 +0x4c
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 83 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/swiftytime//.New.func2()
      ../app/server.go:242 +0x2b8
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/encryptcookie.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/encryptcookie/encryptcookie.go:35 +0x230
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware()
      ../app/pkg/mod/github.com/ansrivas/fiberprometheus/[email protected]/middleware.go:231 +0x420
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware-fm()
      <autogenerated>:1 +0x4c
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Read at 0x00c0006a35a8 by goroutine 85:
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x40
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous write at 0x00c0006a35a8 by goroutine 83:
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0xb8
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x114

Goroutine 85 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/swiftytime//.New.func2()
      ../app/server.go:242 +0x2b8
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/encryptcookie.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/encryptcookie/encryptcookie.go:35 +0x230
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware()
      ../app/pkg/mod/github.com/ansrivas/fiberprometheus/[email protected]/middleware.go:231 +0x420
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware-fm()
      <autogenerated>:1 +0x4c
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 83 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/swiftytime//.New.func2()
      ../app/server.go:242 +0x2b8
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/encryptcookie.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/encryptcookie/encryptcookie.go:35 +0x230
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware()
      ../app/pkg/mod/github.com/ansrivas/fiberprometheus/[email protected]/middleware.go:231 +0x420
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware-fm()
      <autogenerated>:1 +0x4c
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Read at 0x00c0006a3530 by goroutine 85:
  github.com/valyala/fasthttp.(*URI).Scheme()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:201 +0x3c
  github.com/valyala/fasthttp.(*URI).appendSchemeHost()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:826 +0x48
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:816 +0x64
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous write at 0x00c0006a3530 by goroutine 83:
  github.com/valyala/fasthttp.(*URI).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:231 +0x80
  github.com/valyala/fasthttp.(*URI).parse()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:284 +0x58
  github.com/valyala/fasthttp.(*Request).parseURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:963 +0x14c
  github.com/valyala/fasthttp.(*Request).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:939 +0x30
  github.com/valyala/fasthttp.(*RequestCtx).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:965 +0x38
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x108

Goroutine 85 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/swiftytime//.New.func2()
      ../app/server.go:242 +0x2b8
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/encryptcookie.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/encryptcookie/encryptcookie.go:35 +0x230
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware()
      ../app/pkg/mod/github.com/ansrivas/fiberprometheus/[email protected]/middleware.go:231 +0x420
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware-fm()
      <autogenerated>:1 +0x4c
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 83 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/swiftytime//.New.func2()
      ../app/server.go:242 +0x2b8
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/encryptcookie.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/encryptcookie/encryptcookie.go:35 +0x230
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware()
      ../app/pkg/mod/github.com/ansrivas/fiberprometheus/[email protected]/middleware.go:231 +0x420
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware-fm()
      <autogenerated>:1 +0x4c
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00071a570 by goroutine 85:
  runtime.slicecopy()
      ../app/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  github.com/valyala/fasthttp.(*URI).appendSchemeHost()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:826 +0x154
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:816 +0x64
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous read at 0x00c00071a570 by goroutine 83:
  runtime.slicecopy()
      ../app/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  fmt.(*buffer).write()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/print.go:104 +0x154
  fmt.(*fmt).pad()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/format.go:95 +0xd4
  fmt.(*fmt).fmtBs()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/format.go:368 +0x98
  fmt.(*pp).fmtBytes()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/print.go:537 +0x17c
  fmt.(*pp).printArg()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/print.go:743 +0x808
  fmt.(*pp).doPrintf()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/print.go:1074 +0x974
  fmt.Sprintf()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/print.go:239 +0x80
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1837 +0x450

Goroutine 85 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/swiftytime//.New.func2()
      ../app/server.go:242 +0x2b8
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/encryptcookie.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/encryptcookie/encryptcookie.go:35 +0x230
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware()
      ../app/pkg/mod/github.com/ansrivas/fiberprometheus/[email protected]/middleware.go:231 +0x420
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware-fm()
      <autogenerated>:1 +0x4c
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 83 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/swiftytime//.New.func2()
      ../app/server.go:242 +0x2b8
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/encryptcookie.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/encryptcookie/encryptcookie.go:35 +0x230
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware()
      ../app/pkg/mod/github.com/ansrivas/fiberprometheus/[email protected]/middleware.go:231 +0x420
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware-fm()
      <autogenerated>:1 +0x4c
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Read at 0x00c0006a3590 by goroutine 85:
  github.com/valyala/fasthttp.(*URI).Host()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:256 +0x3c
  github.com/valyala/fasthttp.(*URI).appendSchemeHost()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:828 +0x304
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:816 +0x64
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous write at 0x00c0006a3590 by goroutine 83:
  github.com/valyala/fasthttp.(*URI).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:238 +0x1b8
  github.com/valyala/fasthttp.(*URI).parse()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:284 +0x58
  github.com/valyala/fasthttp.(*Request).parseURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:963 +0x14c
  github.com/valyala/fasthttp.(*Request).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:939 +0x30
  github.com/valyala/fasthttp.(*RequestCtx).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:965 +0x38
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x108

Goroutine 85 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/swiftytime//.New.func2()
      ../app/server.go:242 +0x2b8
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/encryptcookie.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/encryptcookie/encryptcookie.go:35 +0x230
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware()
      ../app/pkg/mod/github.com/ansrivas/fiberprometheus/[email protected]/middleware.go:231 +0x420
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware-fm()
      <autogenerated>:1 +0x4c
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 83 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/swiftytime//.New.func2()
      ../app/server.go:242 +0x2b8
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/encryptcookie.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/encryptcookie/encryptcookie.go:35 +0x230
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware()
      ../app/pkg/mod/github.com/ansrivas/fiberprometheus/[email protected]/middleware.go:231 +0x420
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware-fm()
      <autogenerated>:1 +0x4c
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Read at 0x00c000580c00 by goroutine 85:
  runtime.slicecopy()
      ../app/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  github.com/valyala/fasthttp.(*URI).appendSchemeHost()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:828 +0x410
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:816 +0x64
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous write at 0x00c000580c03 by goroutine 83:
  github.com/valyala/fasthttp.lowercaseBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/bytesconv.go:257 +0x9c
  github.com/valyala/fasthttp.(*URI).parse()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:320 +0xd14
  github.com/valyala/fasthttp.(*Request).parseURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:963 +0x14c
  github.com/valyala/fasthttp.(*Request).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:939 +0x30
  github.com/valyala/fasthttp.(*RequestCtx).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:965 +0x38
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x108

Goroutine 85 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/swiftytime//.New.func2()
      ../app/server.go:242 +0x2b8
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/encryptcookie.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/encryptcookie/encryptcookie.go:35 +0x230
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/cors.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:173 +0x27c
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/gofiber/fiber/v2/middleware/recover.New.func1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/recover/recover.go:43 +0x258
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1025 +0x178
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware()
      ../app/pkg/mod/github.com/ansrivas/fiberprometheus/[email protected]/middleware.go:231 +0x420
  github.com/ansrivas/fiberprometheus/v2.(*FiberPrometheus).Middleware-fm()
      <autogenerated>:1 +0x4c
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

@rebaz94
Copy link
Author

rebaz94 commented Jan 28, 2025

I just tested it without calling any function from ctx, and it shows a data race!

s.app.Get("/test", func(ctx *fiber.Ctx) error {
    return nil // add a breakpoint here
})

@gaby
Copy link
Member

gaby commented Jan 29, 2025

@rebaz94 I see what you mean, but you have a bunch of other middlewares in your code. I think those middlewares are the ones not respecting the Immutable flag.

Which middlewares are you using, so I can take a look at each one.

@gaby
Copy link
Member

gaby commented Jan 29, 2025

@ReneWerner87 I think this exposes a bug, when you do:

app := fiber.New(fiber.Config{
    Immutable:         true,
    StreamRequestBody: true,
})

Only the core is respecting that Immutable flag. Our middlewares don't even check for it, so if the middlewares were to use values from the ctx without making copies it would case a data race.

@gaby
Copy link
Member

gaby commented Jan 29, 2025

I see that you are using:

  • encryptcookie
  • cors
  • fiberprometheus

@rebaz94
Copy link
Author

rebaz94 commented Jan 29, 2025

Yes I use these middlewares:

  • recover middleware
  • fiberprometheus
  • cors
  • encryptcookie

Then I removed all middlewares and still happen:

full logs
WARNING: DATA RACE
Read at 0x00c00044a9a8 by goroutine 72:
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x40
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous write at 0x00c00044a9a8 by goroutine 71:
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0xb8
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x114

Goroutine 72 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c0005408d0 by goroutine 72:
  runtime.slicecopy()
      ../app/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  github.com/valyala/fasthttp.(*URI).appendSchemeHost()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:826 +0x154
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:816 +0x64
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous read at 0x00c0005408d0 by goroutine 71:
  runtime.slicecopy()
      ../app/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  fmt.(*buffer).write()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/print.go:104 +0x154
  fmt.(*fmt).pad()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/format.go:95 +0xd4
  fmt.(*fmt).fmtBs()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/format.go:368 +0x98
  fmt.(*pp).fmtBytes()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/print.go:537 +0x17c
  fmt.(*pp).printArg()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/print.go:743 +0x808
  fmt.(*pp).doPrintf()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/print.go:1074 +0x974
  fmt.Sprintf()
      ../app/pkg/mod/golang.org/[email protected]/src/fmt/print.go:239 +0x80
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1837 +0x450

Goroutine 72 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Read at 0x00c00044a9c0 by goroutine 72:
  github.com/valyala/fasthttp.(*URI).RequestURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:684 +0x1d8
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x88
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous write at 0x00c00044a9c0 by goroutine 71:
  github.com/valyala/fasthttp.(*URI).RequestURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:693 +0x660
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x88
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x114

Goroutine 72 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c0006897c8 by goroutine 72:
  github.com/valyala/fasthttp.appendQuotedPath()
      ../app/pkg/mod/github.com/valyala/[email protected]/bytesconv.go:293 +0x464
  github.com/valyala/fasthttp.(*URI).RequestURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:684 +0x250
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x88
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous read at 0x00c0006897c8 by goroutine 71:
  runtime.slicecopy()
      ../app/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x194
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x114

Goroutine 72 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c0005408e5 by goroutine 72:
  runtime.slicecopy()
      ../app/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x194
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Previous write at 0x00c0005408e5 by goroutine 71:
  runtime.slicecopy()
      ../app/pkg/mod/golang.org/[email protected]/src/runtime/slice.go:355 +0x0
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x194
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x114

Goroutine 72 (running) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
2025-01-29T10:47:17.296+03 INF server/server.go:264 > allocId=local body= edgeRegion= method=GET path=/keep region=fra serviceLatency=86293 status=200 version=DEVELOPMENT
2025-01-29T10:47:17.299+03 INF cmd/swiftybase/agent/agent.go:341 > Caught signal, shutting down allocId=local region=fra sig=2 version=DEVELOPMENT
2025-01-29T10:47:17.299+03 INF server/server.go:431 > making timeout faster in Development mode.. allocId=local region=fra version=DEVELOPMENT
2025-01-29T10:47:17.299+03 INF server/server.go:437 > closing squeues client allocId=local region=fra version=DEVELOPMENT
2025-01-29T10:47:17.300+03 INF server/server.go:444 > stopping.. allocId=local region=fra version=DEVELOPMENT
==================
WARNING: DATA RACE
Write at 0x00c00069d1a0 by goroutine 69:
  github.com/gofiber/fiber/v2.(*App).ReleaseCtx()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:193 +0x7c
  github.com/gofiber/fiber/v2.(*App).handler.deferwrap1()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:163 +0x4c
  runtime.deferreturn()
      ../app/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:605 +0x5c
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00069d1a0 by goroutine 71:
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1839 +0x40

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044aa28 by goroutine 69:
  github.com/valyala/fasthttp.(*RequestHeader).resetSkipNormalize()
      ../app/pkg/mod/github.com/valyala/[email protected]/header.go:1131 +0xcc
  github.com/valyala/fasthttp.(*RequestHeader).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/header.go:1121 +0x7c
  github.com/valyala/fasthttp.(*Request).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1125 +0xc8
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2494 +0x26fc
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044aa28 by goroutine 72:
  github.com/valyala/fasthttp.(*RequestHeader).Method()
      ../app/pkg/mod/github.com/valyala/[email protected]/header.go:733 +0x40
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x78

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 72 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044a930 by goroutine 69:
  github.com/valyala/fasthttp.(*URI).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:231 +0x80
  github.com/valyala/fasthttp.(*Request).resetSkipHeader()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1134 +0x40
  github.com/valyala/fasthttp.(*Request).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1126 +0xd4
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2494 +0x26fc
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044a930 by goroutine 71:
  github.com/valyala/fasthttp.(*URI).Scheme()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:201 +0x3c
  github.com/valyala/fasthttp.(*URI).appendSchemeHost()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:826 +0x48
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:816 +0x64
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x114

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044a948 by goroutine 69:
  github.com/valyala/fasthttp.(*URI).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:232 +0xb4
  github.com/valyala/fasthttp.(*Request).resetSkipHeader()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1134 +0x40
  github.com/valyala/fasthttp.(*Request).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1126 +0xd4
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2494 +0x26fc
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044a948 by goroutine 71:
  github.com/valyala/fasthttp.(*URI).Path()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:169 +0x3c
  github.com/valyala/fasthttp.(*URI).RequestURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:684 +0x204
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x88
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x114

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044a960 by goroutine 69:
  github.com/valyala/fasthttp.(*URI).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:233 +0xe8
  github.com/valyala/fasthttp.(*Request).resetSkipHeader()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1134 +0x40
  github.com/valyala/fasthttp.(*Request).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1126 +0xd4
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2494 +0x26fc
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044a960 by goroutine 71:
  github.com/valyala/fasthttp.(*URI).RequestURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:689 +0x3f8
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x88
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x114

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044a978 by goroutine 69:
  github.com/valyala/fasthttp.(*URI).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:234 +0x11c
  github.com/valyala/fasthttp.(*Request).resetSkipHeader()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1134 +0x40
  github.com/valyala/fasthttp.(*Request).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1126 +0xd4
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2494 +0x26fc
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044a978 by goroutine 71:
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:818 +0x1c0
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x114

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044a990 by goroutine 69:
  github.com/valyala/fasthttp.(*URI).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:238 +0x1b8
  github.com/valyala/fasthttp.(*Request).resetSkipHeader()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1134 +0x40
  github.com/valyala/fasthttp.(*Request).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1126 +0xd4
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2494 +0x26fc
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044a990 by goroutine 71:
  github.com/valyala/fasthttp.(*URI).Host()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:256 +0x3c
  github.com/valyala/fasthttp.(*URI).appendSchemeHost()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:828 +0x304
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:816 +0x64
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x114

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044aa08 by goroutine 69:
  github.com/valyala/fasthttp.(*URI).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:240 +0x1e4
  github.com/valyala/fasthttp.(*Request).resetSkipHeader()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1134 +0x40
  github.com/valyala/fasthttp.(*Request).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1126 +0xd4
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2494 +0x26fc
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044aa08 by goroutine 72:
  github.com/valyala/fasthttp.(*URI).RequestURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:686 +0x280
  github.com/valyala/fasthttp.(*URI).AppendBytes()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:817 +0x88
  github.com/valyala/fasthttp.(*URI).FullURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x88
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x9c

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 72 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044ab79 by goroutine 69:
  github.com/valyala/fasthttp.(*Request).resetSkipHeader()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1135 +0x54
  github.com/valyala/fasthttp.(*Request).Reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:1126 +0xd4
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2494 +0x26fc
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044ab79 by goroutine 72:
  github.com/valyala/fasthttp.(*Request).parseURI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:958 +0x40
  github.com/valyala/fasthttp.(*Request).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/http.go:939 +0x30
  github.com/valyala/fasthttp.(*RequestCtx).URI()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:965 +0x38
  github.com/valyala/fasthttp.(*RequestCtx).String()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:896 +0x90

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 72 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044ab80 by goroutine 69:
  github.com/valyala/fasthttp.(*RequestCtx).reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:815 +0x80
  github.com/valyala/fasthttp.(*Server).releaseCtx()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2832 +0x54
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2510 +0x27b8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044ab80 by goroutine 71:
  github.com/valyala/fasthttp.(*RequestCtx).ID()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:901 +0x38
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1839 +0x50

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044ab88 by goroutine 69:
  github.com/valyala/fasthttp.(*RequestCtx).reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:816 +0x9c
  github.com/valyala/fasthttp.(*Server).releaseCtx()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2832 +0x54
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2510 +0x27b8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044ab88 by goroutine 71:
  github.com/valyala/fasthttp.(*RequestCtx).ID()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:901 +0x58
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1839 +0x50

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044a7e8 by goroutine 69:
  github.com/valyala/fasthttp.(*RequestCtx).reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:818 +0x14c
  github.com/valyala/fasthttp.(*Server).releaseCtx()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2832 +0x54
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2510 +0x27b8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044a7e8 by goroutine 71:
  github.com/valyala/fasthttp.(*RequestCtx).RemoteAddr()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1237 +0x38
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1841 +0xa4

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54
==================
==================
WARNING: DATA RACE
Write at 0x00c00044a7f8 by goroutine 69:
  github.com/valyala/fasthttp.(*RequestCtx).reset()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:820 +0x224
  github.com/valyala/fasthttp.(*Server).releaseCtx()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2832 +0x54
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2510 +0x27b8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

Previous read at 0x00c00044a7f8 by goroutine 71:
  github.com/valyala/fasthttp.(*RequestCtx).LocalAddr()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1262 +0x38
  github.com/gofiber/fiber/v2.(*Ctx).String()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1840 +0x78

Goroutine 69 (running) created at:
  github.com/valyala/fasthttp.(*workerPool).getCh()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x41c
  github.com/valyala/fasthttp.(*workerPool).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:149 +0x38
  github.com/valyala/fasthttp.(*Server).Serve()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:1841 +0x980
  github.com/gofiber/fiber/v2.(*App).Listen()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/listen.go:93 +0x4cc
  github.com/repo/pkg/server.(*Server).Start()
      ../app/pkg/server/server.go:420 +0xdc
  github.com/repo/cmd/swiftybase/agent.init.func1.4()
      ../app/cmd/swiftybase/agent/agent.go:329 +0x148

Goroutine 71 (finished) created at:
  runtime.debugCallWrap()
      <autogenerated>:1 +0x10
  github.com/gofiber/fiber/v2.(*Ctx).Next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1028 +0x1bc
  github.com/repo/pkg/server.New.func1()
      ../app/pkg/server/server.go:238 +0x2b8
  github.com/gofiber/fiber/v2.(*App).next()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:145 +0x55c
  github.com/gofiber/fiber/v2.(*App).handler()
      ../app/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:172 +0x1e8
  github.com/gofiber/fiber/v2.(*App).handler-fm()
      <autogenerated>:1 +0x48
  github.com/valyala/fasthttp.(*Server).serveConn()
      ../app/pkg/mod/github.com/valyala/[email protected]/server.go:2385 +0x1ac8
  github.com/valyala/fasthttp.(*Server).serveConn-fm()
      <autogenerated>:1 +0x58
  github.com/valyala/fasthttp.(*workerPool).workerFunc()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:225 +0xec
  github.com/valyala/fasthttp.(*workerPool).getCh.func1()
      ../app/pkg/mod/github.com/valyala/[email protected]/workerpool.go:197 +0x54

@ReneWerner87
Copy link
Member

@rebaz94 Ok very interesting
Can you please comment out one after the other handler and find out which one is causing the problem and then give us the code for thisw
Also like narrower, we only need an example to reproduce what is also executable

@rebaz94
Copy link
Author

rebaz94 commented Jan 30, 2025

After testing, I found that Go wasn't updating the package properly. The logs showed version v2.52.6, but the old code was still in use. After updating, there were no more race conditions when accessing the body after the handler returns or using middleware.

However, a race condition still occurs when the IDE tries to display ctx, triggering ctx.String():

WARNING: DATA RACE  
Read at 0x00c00071afa8 by goroutine 68:  
  github.com/valyala/fasthttp.(*URI).FullURI()  
      ./app/pkg/mod/github.com/valyala/[email protected]/uri.go:810 +0x40  
  github.com/gofiber/fiber/v2.(*Ctx).String()  
      ./app/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1843 +0x114  

@gaby
Copy link
Member

gaby commented Jan 30, 2025

@rebaz94 Thanks for sharing, will check tonight again. That's progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants