dymensionxyz / dymint

Sequencing Engine for Dymension RollApps
Other
96 stars 67 forks source link

panic in the RPC handler #343

Closed mtsitrin closed 1 year ago

mtsitrin commented 1 year ago

log file have periodic errors as follows:

Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: 2023/06/10 06:46:15 http: panic serving 172.31.32.136:26048: runtime error: invalid memory address or nil pointer dereference
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: goroutine 295760677 [running]:
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: net/http.(*conn).serve.func1()
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         net/http/server.go:1825 +0xbf
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: panic({0x2a1c1a0, 0x552cca0})
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         runtime/panic.go:844 +0x258
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: github.com/dymensionxyz/dymint/rpc/client.(*Client).TxSearch.func2(0xc01e72ade0?, 0xc0abbbe4a0?)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         github.com/dymensionxyz/dymint@v0.4.0-beta.0.20230507080445-1511fed66c4d/rpc/client/client.go:586 +0x1f
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: sort.doPivot_func({0xc01e72ade0?, 0xc0abbbe4a0?}, 0x0, 0x1b64)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         sort/zfuncversion.go:83 +0x14c
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: sort.quickSort_func({0xc01e72ade0?, 0xc0abbbe4a0?}, 0xc05f09d908?, 0x0?, 0x0?)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         sort/zfuncversion.go:143 +0x85
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: sort.Slice({0x28bcd20, 0xc05f09d908}, 0x1b64?)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         sort/slice.go:20 +0x9f
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: github.com/dymensionxyz/dymint/rpc/client.(*Client).TxSearch(0xc0176658f0, {0x3df2040, 0xc0ac924c00}, {0xc0a686f140?, 0x2?}, 0x58?, 0x4e393e?, 0xc0ac924c60, {0xc06fa>
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         github.com/dymensionxyz/dymint@v0.4.0-beta.0.20230507080445-1511fed66c4d/rpc/client/client.go:585 +0x15a
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: github.com/dymensionxyz/dymint/rpc/json.(*service).TxSearch(0x0?, 0xc018100780?, 0x3?)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         github.com/dymensionxyz/dymint@v0.4.0-beta.0.20230507080445-1511fed66c4d/rpc/json/service.go:223 +0x69
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: reflect.Value.call({0x29ca6e0?, 0xc00106b190?, 0x13?}, {0x2e3e9fe, 0x4}, {0xc0214d1778, 0x2, 0x2?})
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         reflect/value.go:556 +0x845
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: reflect.Value.Call({0x29ca6e0?, 0xc00106b190?, 0x28033d8?}, {0xc0474aa778, 0x2, 0x2})
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         reflect/value.go:339 +0xbf
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: github.com/dymensionxyz/dymint/rpc/json.(*handler).newHandler.func1({0x3df0320, 0xc01b73b960}, 0xc01e4aa800)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         github.com/dymensionxyz/dymint@v0.4.0-beta.0.20230507080445-1511fed66c4d/rpc/json/handler.go:167 +0x765
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: net/http.HandlerFunc.ServeHTTP(0x1c?, {0x3df0320?, 0xc01b73b960?}, 0xc101412e21?)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         net/http/server.go:2084 +0x2f
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: net/http.(*ServeMux).ServeHTTP(0x0?, {0x3df0320, 0xc01b73b960}, 0xc01e4aa800)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         net/http/server.go:2462 +0x149
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: github.com/dymensionxyz/dymint/rpc/json.(*handler).ServeHTTP(0xc0178ad680?, {0x3df0320?, 0xc01b73b960?}, 0xc01e4aa800?)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         github.com/dymensionxyz/dymint@v0.4.0-beta.0.20230507080445-1511fed66c4d/rpc/json/handler.go:47 +0x27
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: github.com/rs/cors.(*Cors).Handler.func1({0x3df0320, 0xc01b73b960}, 0xc01e4aa800)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         github.com/rs/cors@v1.8.3/cors.go:236 +0x1c4
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: net/http.HandlerFunc.ServeHTTP(0xc06fac863f?, {0x3df0320?, 0xc01b73b960?}, 0xc001a4a000?)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         net/http/server.go:2084 +0x2f
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: net/http.serverHandler.ServeHTTP({0xc099bb3410?}, {0x3df0320, 0xc01b73b960}, 0xc01e4aa800)
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         net/http/server.go:2916 +0x43b
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: net/http.(*conn).serve(0xc02baa2be0, {0x3df20e8, 0xc02540c990})
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         net/http/server.go:1966 +0x5d7
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]: created by net/http.(*Server).Serve
Jun 10 06:46:15 ip-172-31-42-169 bash[1589801]:         net/http/server.go:3071 +0x4db
mtsitrin commented 1 year ago

To reproduce: GET https://rpc-rollappevm-35c.dymension.xyz/tx_search?query=message.action=%27/ibc.applications.transfer.v1.MsgTransfer%27&per_page=1&prove=false&page=1&order_by= net::ERR_FAILED 502

mtsitrin commented 1 year ago

reproducable with rollapp_evm q txs --events message.module=transfer