Fiber v2.22.0 ,GOVERSION="go1.18.3"
unexpected fault address 0x492610
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x2 addr=0x492610 pc=0x442c72]
goroutine 21 [running]:
runtime.throw({0xd23ac1?, 0x0?})
/usr/lib/go/src/runtime/panic.go:992 +0x71 fp=0xc000136140 sp=0xc000136110 pc=0x4674d1
runtime.sigpanic()
/usr/lib/go/src/runtime/signal_unix.go:825 +0x305 fp=0xc000136190 sp=0xc000136140 pc=0x47e145
runtime.mapiterinit(0xcb8940?, 0xc00009bd70, 0x492600)
/usr/lib/go/src/runtime/map.go:821 +0x72 fp=0xc0001361b8 sp=0xc000136190 pc=0x442c72
reflect.mapiterinit(0xc00009bd70?, 0x0?, 0x0?)
/usr/lib/go/src/runtime/map.go:1373 +0x19 fp=0xc0001361e0 sp=0xc0001361b8 pc=0x492619
github.com/gofiber/fiber/v2/internal/go-json/encoder/vm.Run(0xc000282000, {0xc00012e000, 0x0, 0x400}, 0xc00039e1c0)
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/internal/go-json/encoder/vm/vm.go:425 +0x6902 fp=0xc00013f260 sp=0xc0001361e0 pc=0x8af6a2
github.com/gofiber/fiber/v2/internal/go-json.encodeRunCode(0xc000282000, {0xc00012e000, 0x0, 0x400}, 0x49af25?)
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/internal/go-json/encode.go:307 +0x272 fp=0xc00013f2e0 sp=0xc00013f260 pc=0x90d572
github.com/gofiber/fiber/v2/internal/go-json.encode(0xc000282000, {0xcb8940, 0xc00009bd70})
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/internal/go-json/encode.go:232 +0x4be fp=0xc00013f3b8 sp=0xc00013f2e0 pc=0x90d1be
github.com/gofiber/fiber/v2/internal/go-json.marshal({0xcb8940, 0xc00009bd70}, {0x0, 0x0, 0x10000000000?})
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/internal/go-json/encode.go:147 +0x177 fp=0xc00013f448 sp=0xc00013f3b8 pc=0x90cbb7
github.com/gofiber/fiber/v2/internal/go-json.MarshalWithOption(...)
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/internal/go-json/json.go:186
github.com/gofiber/fiber/v2/internal/go-json.Marshal({0xcb8940, 0xc00009bd70})
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/internal/go-json/json.go:171 +0x3e fp=0xc00013f4a8 sp=0xc00013f448 pc=0x90d63e
github.com/gofiber/fiber/v2.(*Ctx).JSON(0xc0000c82c0, {0xcb8940, 0xc00009bd70})
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:650 +0x99 fp=0xc00013f538 sp=0xc00013f4a8 pc=0xaf3779
go-fiber-crud/route.helloWorld(0xc0000cfe40?)
/home/sw/dev_go/go-fiber-curd/route/index.route.go:55 +0x105 fp=0xc00013f598 sp=0xc00013f538 pc=0xc5e705
github.com/gofiber/fiber/v2.(*App).next(0xc000102d00, 0xc0000c82c0)
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:127 +0x496 fp=0xc00013f6b8 sp=0xc00013f598 pc=0xb03dd6
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc0000c82c0)
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:747 +0x165 fp=0xc00013f710 sp=0xc00013f6b8 pc=0xaf4ca5
main.main.func1(0xc0000c82c0)
/home/sw/dev_go/go-fiber-curd/main.go:33 +0x1c5 fp=0xc00013f760 sp=0xc00013f710 pc=0xc5e905
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc0000c82c0)
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:744 +0x14d fp=0xc00013f7b8 sp=0xc00013f760 pc=0xaf4c8d
github.com/gofiber/fiber/v2/middleware/cors.New.func1(0xc0000c82c0)
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:141 +0x328 fp=0xc00013f8e8 sp=0xc00013f7b8 pc=0xb0d6a8
github.com/gofiber/fiber/v2.(*App).next(0xc000102d00, 0xc0000c82c0)
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:127 +0x496 fp=0xc00013fa08 sp=0xc00013f8e8 pc=0xb03dd6
github.com/gofiber/fiber/v2.(*App).handler(0xc000102d00, 0x10d77b3ad?)
/home/sw/go/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:155 +0x16f fp=0xc00013fa80 sp=0xc00013fa08 pc=0xb0412f
github.com/gofiber/fiber/v2.(*App).handler-fm(0x11a6f70?)
:1 +0x45 fp=0xc00013fab0 sp=0xc00013fa80 pc=0xb0cb25
github.com/valyala/fasthttp.(*Server).serveConn(0xc0002d8600, {0xead758?, 0xc000010028})
/home/sw/go/pkg/mod/github.com/valyala/[email protected]/server.go:2278 +0x1add fp=0xc00013fe88 sp=0xc00013fab0 pc=0xa5c95d
github.com/valyala/fasthttp.(*Server).serveConn-fm({0xead758, 0xc000010028})
:1 +0x4e fp=0xc00013fec8 sp=0xc00013fe88 pc=0xa7516e
github.com/valyala/fasthttp.(*workerPool).workerFunc(0xc00038e6e0, 0xc000076000)
/home/sw/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:223 +0xe6 fp=0xc00013ff98 sp=0xc00013fec8 pc=0xa6e946
github.com/valyala/fasthttp.(*workerPool).getCh.func1()
/home/sw/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:195 +0x54 fp=0xc00013ffe0 sp=0xc00013ff98 pc=0xa6e5f4
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:1571 +0x1 fp=0xc00013ffe8 sp=0xc00013ffe0 pc=0x498061
created by github.com/valyala/fasthttp.(*workerPool).getCh
/home/sw/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:194 +0x34a
error maybe here:
index.route.go
func helloWorld(c *fiber.Ctx) error {
### return c.JSON(fiber.Map{
"hello": "world",
"message": "111",
})
}