-
Notifications
You must be signed in to change notification settings - Fork 373
Open
Description
fatal error: concurrent map iteration and map write
goroutine 367 [running]:
runtime.throw(0xd9a8e0, 0x26)
/usr/local/go/src/runtime/panic.go:1117 +0x72 fp=0xc00099b010 sp=0xc00099afe0 pc=0x4382d2
runtime.mapiternext(0xc000ebed80)
/usr/local/go/src/runtime/map.go:858 +0x54c fp=0xc00099b090 sp=0xc00099b010 pc=0x41256c
reflect.mapiternext(0xc000ebed80)
/usr/local/go/src/runtime/map.go:1346 +0x2b fp=0xc00099b0a8 sp=0xc00099b090 pc=0x46842b
reflect.(*MapIter).Next(0xc0000c9340, 0xd53da0)
/usr/local/go/src/reflect/value.go:1277 +0xd6 fp=0xc00099b0d0 sp=0xc00099b0a8 pc=0x4a2ad6
internal/fmtsort.Sort(0xc7a0e0, 0xc00060c868, 0x95, 0x14)
/usr/local/go/src/internal/fmtsort/sort.go:63 +0x1af fp=0xc00099b180 sp=0xc00099b0d0 pc=0x4e784f
text/template.(*state).walkRange(0xc00099b700, 0xcbd560, 0xc00060c858, 0x99, 0xc0000da5c0)
/usr/local/go/src/text/template/exec.go:366 +0x7f9 fp=0xc00099b2d0 sp=0xc00099b180 pc=0x7ca259
text/template.(*state).walk(0xc00099b700, 0xcbd560, 0xc00060c858, 0x99, 0xe9d128, 0xc0000da5c0)
/usr/local/go/src/text/template/exec.go:266 +0x445 fp=0xc00099b358 sp=0xc00099b2d0 pc=0x7c9285
text/template.(*state).walk(0xc00099b700, 0xcbd560, 0xc00060c858, 0x99, 0xe9d008, 0xc00007f5c0)
/usr/local/go/src/text/template/exec.go:263 +0x13c fp=0xc00099b3e0 sp=0xc00099b358 pc=0x7c8f7c
text/template.(*state).walkRange.func1(0xc45440, 0xc0001c89c0, 0x98, 0xcbd560, 0xc00060c858, 0x99)
/usr/local/go/src/text/template/exec.go:350 +0x125 fp=0xc00099b430 sp=0xc00099b3e0 pc=0x7dba45
text/template.(*state).walkRange(0xc0000bb700, 0xc9b940, 0xc000ccc3c0, 0x15, 0xc00007cf00)
/usr/local/go/src/text/template/exec.go:368 +0x8a2 fp=0xc00099b580 sp=0xc00099b430 pc=0x7ca302
text/template.(*state).walk(0xc0000bb700, 0xc9b940, 0xc000ccc3c0, 0x15, 0xe9d128, 0xc00007cf00)
/usr/local/go/src/text/template/exec.go:266 +0x445 fp=0xc00099b608 sp=0xc00099b580 pc=0x7c9285
text/template.(*state).walk(0xc00099b700, 0xc9b940, 0xc000ccc3c0, 0x15, 0xe9d008, 0xc00007f380)
/usr/local/go/src/text/template/exec.go:263 +0x13c fp=0xc00099b690 sp=0xc00099b608 pc=0x7c8f7c
text/template.(*Template).execute(0xc0000da380, 0x7fa93c7d3b08, 0xc000404a00, 0xc9b940, 0xc000ccc3c0, 0x0, 0x0)
/usr/local/go/src/text/template/exec.go:217 +0x1c6 fp=0xc00099b768 sp=0xc00099b690 pc=0x7c8786
text/template.(*Template).Execute(...)
/usr/local/go/src/text/template/exec.go:200
html/template.(*Template).ExecuteTemplate(0xc0004ab230, 0x7fa93c7d3b08, 0xc000404a00, 0xd82277, 0xa, 0xc9b940, 0xc000ccc3c0, 0xc000057800, 0x0)
/usr/local/go/src/html/template/template.go:139 +0xab fp=0xc00099b7b0 sp=0xc00099b768 pc=0x7ea10b
github.com/gin-gonic/gin/render.HTML.Render(0xc0004ab230, 0xd82277, 0xa, 0xc9b940, 0xc000ccc3c0, 0x7fa93c7d3ad8, 0xc000404a00, 0x987e67, 0xc0000bb878)
/home/ec2-user/go/pkg/mod/github.com/gin-gonic/[email protected]/render/html.go:86 +0x169 fp=0xc00099b808 sp=0xc00099b7b0 pc=0x9852e9
github.com/gin-gonic/gin/render.(*HTML).Render(0xc000ccc3f0, 0x7fa93c7d3ad8, 0xc000404a00, 0x7fa93c7d3ad8, 0xc000404a00)
<autogenerated>:1 +0x91 fp=0xc00099b888 sp=0xc00099b808 pc=0x987651
github.com/gin-gonic/gin.(*Context).Render(0xc000404a00, 0xc8, 0xe91b28, 0xc000ccc3f0)
/home/ec2-user/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:927 +0x149 fp=0xc00099b8c8 sp=0xc00099b888 pc=0x98f969
github.com/gin-gonic/gin.(*Context).HTML(0xc000404a00, 0xc8, 0xd82277, 0xa, 0xc9b940, 0xc000ccc3c0)
/home/ec2-user/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:937 +0x99 fp=0xc00099b910 sp=0xc00099b8c8 pc=0x98fa59
main.HTTPAPIServerIndex(0xc000404a00)
/home/ec2-user/RTSPtoWeb-2.3.0/apiHTTPRouter.go:163 +0x237 fp=0xc00099b968 sp=0xc00099b910 pc=0xbaadf7
github.com/gin-gonic/gin.(*Context).Next(...)
/home/ec2-user/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:168
main.CrossOrigin.func1(0xc000404a00)
/home/ec2-user/RTSPtoWeb-2.3.0/apiHTTPRouter.go:304 +0x3c3 fp=0xc00099b9e8 sp=0xc00099b968 pc=0xbccee3
github.com/gin-gonic/gin.(*Context).Next(...)
/home/ec2-user/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:168
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc000464000, 0xc000404a00)
/home/ec2-user/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:555 +0x2b0 fp=0xc00099bb38 sp=0xc00099b9e8 pc=0x9965d0
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc000464000, 0xe96ac0, 0xc000483340, 0xc000155d00)
/home/ec2-user/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:511 +0x16b fp=0xc00099bb70 sp=0xc00099bb38 pc=0x99606b
net/http.serverHandler.ServeHTTP(0xc0003a2000, 0xe96ac0, 0xc000483340, 0xc000155d00)
/usr/local/go/src/net/http/server.go:2868 +0xa3 fp=0xc00099bba0 sp=0xc00099bb70 pc=0x6df5c3
net/http.(*conn).serve(0xc00037de00, 0xe98c60, 0xc0016de1c0)
/usr/local/go/src/net/http/server.go:1933 +0x8cd fp=0xc00099bfc8 sp=0xc00099bba0 pc=0x6da9ed
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc00099bfd0 sp=0xc00099bfc8 pc=0x46e8c1
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2994 +0x39b
goroutine 1 [chan receive, 34 minutes]:
main.main()
/home/ec2-user/RTSPtoWeb-2.3.0/RTSPtoWeb.go:35 +0x49c
goroutine 21 [IO wait]:
internal/poll.runtime_pollWait(0x7fa93c7d9da0, 0x72, 0x0)
/usr/local/go/src/runtime/netpoll.go:227 +0x55
internal/poll.(*pollDesc).wait(0xc0004fb998, 0x72, 0x0, 0x0, 0xd7ed1b)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc0004fb980, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:401 +0x212
net.(*netFD).accept(0xc0004fb980, 0x75a9d5b33d7ab591, 0x0, 0x0)
/usr/local/go/src/net/fd_unix.go:172 +0x45
net.(*TCPListener).accept(0xc0000acc90, 0x68c1d264, 0xc0000bd908, 0x4c8446)
/usr/local/go/src/net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc0000acc90, 0xc0000bd958, 0x18, 0xc000001b00, 0x6dfabb)
/usr/local/go/src/net/tcpsock.go:261 +0x65
net/http.(*Server).Serve(0xc0003a2000, 0xe968b0, 0xc0000acc90, 0x0, 0x0)
/usr/local/go/src/net/http/server.go:2962 +0x285
net/http.(*Server).ListenAndServe(0xc0003a2000, 0xc0003a2000, 0xc000161b08)
/usr/local/go/src/net/http/server.go:2891 +0xba
net/http.ListenAndServe(...)
/usr/local/go/src/net/http/server.go:3145
github.com/gin-gonic/gin.(*Engine).Run(0xc000464000, 0xc000161c00, 0x1, 0x1, 0x0, 0x0)
/home/ec2-user/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:356 +0x1db
main.HTTPAPIServer()
/home/ec2-user/RTSPtoWeb-2.3.0/apiHTTPRouter.go:149 +0xde8
created by main.main
/home/ec2-user/RTSPtoWeb-2.3.0/RTSPtoWeb.go:17 +0x1dd
If I embed on a page 20 streams, after a while it crashes with this error, there's a lot of goroutine 21 [IO wait]:, probably for each stream.
This is on a older version, but I've tried latest one and same thing.
Metadata
Metadata
Assignees
Labels
No labels