We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
回复评论时会出现,复现没有规律性,但一般在10条以内。
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x107d959]
goroutine 196 [running]: github.com/valyala/fasthttp.(*RequestCtx).URI(...) /root/go/pkg/mod/github.com/valyala/[email protected]/server.go:952 github.com/valyala/fasthttp.(*RequestCtx).QueryArgs(0x0) /root/go/pkg/mod/github.com/valyala/[email protected]/server.go:991 +0x19 github.com/gofiber/fiber/v2.(*Ctx).Query(0xc000243080, {0x159d161, 0x5}, {0x0, 0x0, 0xc01649e108?}) /root/go/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1105 +0x45 github.com/ArtalkJS/Artalk/server/common.GetJwtInstanceByReq(0xc01649e108?) /go/src/github.com/ArtalkJS/Artalk/server/common/auth.go:59 +0x35 github.com/ArtalkJS/Artalk/server/common.CheckIsAdminReq(0x4?) /go/src/github.com/ArtalkJS/Artalk/server/common/check.go:25 +0x2e github.com/ArtalkJS/Artalk/server/handler.CommentAdd.func1.1() /go/src/github.com/ArtalkJS/Artalk/server/handler/comment_add.go:163 +0xbc created by github.com/ArtalkJS/Artalk/server/handler.CommentAdd.func1 /go/src/github.com/ArtalkJS/Artalk/server/handler/comment_add.go:156 +0xe5b
Artalk (2.5.2/febe890)
-> A Selfhosted Comment System. -> https://artalk.js.org
┌───────────────────────────────────────────────────┐ │ Fiber v2.42.0 │ │ http://127.0.0.1:8080 │ │ (bound on host 0.0.0.0 and port 8080) │ │ │ │ Handlers ............ 78 Processes ........... 1 │ │ Prefork ....... Disabled PID ............ 425157 │ └───────────────────────────────────────────────────┘
服务器环境:CentOS Stream 8
The text was updated successfully, but these errors were encountered:
一样的问题: 而且我的是每次评论时都会崩溃重启,但是数据似乎是有的
OS: centos 7.9 版本:2.5.2
要测试这个bug的话还需要什么额外信息?
报错如下图
Sorry, something went wrong.
感觉像是这里的 c 已经为空了
非常感谢你提供的线索!我也觉得是这个原因。
之前更换了 http 框架,由于新 fiber 框架的性能优化设计,导致在新开的 goroutine(线程)中引用 Context 指针资源被提前释放,故出现了 SIGSEGV 错误。
fix(api/comment_add): SIGSEGV crash in comment_add (#478)
399a217
Signed-off-by: qwqcode <[email protected]>
fix(api/comment_add): SIGSEGV crash in comment_add (#478) (#481)
ac4b8b0
Successfully merging a pull request may close this issue.
造成报错的操作:
回复评论时会出现,复现没有规律性,但一般在10条以内。
报错信息:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x107d959]
goroutine 196 [running]:
github.com/valyala/fasthttp.(*RequestCtx).URI(...)
/root/go/pkg/mod/github.com/valyala/[email protected]/server.go:952
github.com/valyala/fasthttp.(*RequestCtx).QueryArgs(0x0)
/root/go/pkg/mod/github.com/valyala/[email protected]/server.go:991 +0x19
github.com/gofiber/fiber/v2.(*Ctx).Query(0xc000243080, {0x159d161, 0x5}, {0x0, 0x0, 0xc01649e108?})
/root/go/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:1105 +0x45
github.com/ArtalkJS/Artalk/server/common.GetJwtInstanceByReq(0xc01649e108?)
/go/src/github.com/ArtalkJS/Artalk/server/common/auth.go:59 +0x35
github.com/ArtalkJS/Artalk/server/common.CheckIsAdminReq(0x4?)
/go/src/github.com/ArtalkJS/Artalk/server/common/check.go:25 +0x2e
github.com/ArtalkJS/Artalk/server/handler.CommentAdd.func1.1()
/go/src/github.com/ArtalkJS/Artalk/server/handler/comment_add.go:163 +0xbc
created by github.com/ArtalkJS/Artalk/server/handler.CommentAdd.func1
/go/src/github.com/ArtalkJS/Artalk/server/handler/comment_add.go:156 +0xe5b
环境信息:
Artalk (2.5.2/febe890)
-> A Selfhosted Comment System.
-> https://artalk.js.org
┌───────────────────────────────────────────────────┐
│ Fiber v2.42.0 │
│ http://127.0.0.1:8080 │
│ (bound on host 0.0.0.0 and port 8080) │
│ │
│ Handlers ............ 78 Processes ........... 1 │
│ Prefork ....... Disabled PID ............ 425157 │
└───────────────────────────────────────────────────┘
服务器环境:CentOS Stream 8
The text was updated successfully, but these errors were encountered: