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

websocket data race #1191

Closed
omritoptix opened this issue Oct 30, 2024 · 1 comment
Closed

websocket data race #1191

omritoptix opened this issue Oct 30, 2024 · 1 comment

Comments

@omritoptix
Copy link
Contributor

WARNING: DATA RACE Read at 0x00c01c59f8d0 by goroutine 925: runtime.chansend() /home/runner/go/pkg/mod/golang.org/[email protected]/src/runtime/chan.go:160 +0x0 github.com/dymensionxyz/dymint/rpc/json.(*service).Subscribe.func1() /home/runner/work/dymint/dymint/rpc/json/service.go:157 +0x5a4 github.com/dymensionxyz/dymint/rpc/json.(*service).Subscribe.gowrap1() /home/runner/work/dymint/dymint/rpc/json/service.go:160 +0x61 Previous write at 0x00c01c59f8d0 by goroutine 921: runtime.closechan() /home/runner/go/pkg/mod/golang.org/[email protected]/src/runtime/chan.go:357 +0x0 github.com/dymensionxyz/dymint/rpc/json.(*handler).wsHandler.func2() /home/runner/work/dymint/dymint/rpc/json/ws.go:65 +0x64 runtime.deferreturn() /home/runner/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:602 +0x5d github.com/dymensionxyz/dymint/rpc/json.(*handler).wsHandler-fm() <autogenerated>:1 +0x51 net/http.HandlerFunc.ServeHTTP() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2166 +0x47 net/http.(*ServeMux).ServeHTTP() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2683 +0x1ef github.com/dymensionxyz/dymint/rpc/json.(*handler).ServeHTTP() /home/runner/work/dymint/dymint/rpc/json/handler.go:49 +0xb6 net/http.serverHandler.ServeHTTP() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3137 +0x2a1 net/http.(*conn).serve() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2039 +0x13c4 net/http.(*Server).Serve.gowrap3() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3285 +0x4f Goroutine 925 (running) created at: github.com/dymensionxyz/dymint/rpc/json.(*service).Subscribe() /home/runner/work/dymint/dymint/rpc/json/service.go:138 +0x7e5 github.com/dymensionxyz/dymint/rpc/json.(*service).Subscribe-fm() <autogenerated>:1 +0x89 runtime.call64() /home/runner/go/pkg/mod/golang.org/[email protected]/src/runtime/asm_amd64.s:772 +0x42 reflect.Value.Call() /home/runner/go/pkg/mod/golang.org/[email protected]/src/reflect/value.go:380 +0xb5 github.com/dymensionxyz/dymint/rpc/json.(*handler).serveJSONRPCforWS() /home/runner/work/dymint/dymint/rpc/json/handler.go:99 +0x7ab github.com/dymensionxyz/dymint/rpc/json.(*handler).wsHandler() /home/runner/work/dymint/dymint/rpc/json/ws.go:105 +0x92e github.com/dymensionxyz/dymint/rpc/json.(*handler).wsHandler-fm() <autogenerated>:1 +0x51 net/http.HandlerFunc.ServeHTTP() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2166 +0x47 net/http.(*ServeMux).ServeHTTP() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2683 +0x1ef github.com/dymensionxyz/dymint/rpc/json.(*handler).ServeHTTP() /home/runner/work/dymint/dymint/rpc/json/handler.go:49 +0xb6 net/http.serverHandler.ServeHTTP() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3137 +0x2a1 net/http.(*conn).serve() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2039 +0x13c4 net/http.(*Server).Serve.gowrap3() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3285 +0x4f Goroutine 921 (finished) created at: net/http.(*Server).Serve() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3285 +0x8ec net/http/httptest.(*Server).goServe.func1() /home/runner/go/pkg/mod/golang.org/[email protected]/src/net/http/httptest/server.go:310 +0xbb ================== panic: send on closed channel

@mtsitrin
Copy link
Contributor

dup of #1180

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

No branches or pull requests

2 participants