jprq icon indicating copy to clipboard operation
jprq copied to clipboard

Data race on shared maps -> server crash

Open stohirov opened this issue 5 months ago • 1 comments

Every connection is handled in its own goroutine (server/server/tcpserver.go), yet the shared maps are read and written with no mutex anywhere on the Jprq struct.

stohirov avatar Jun 09 '26 06:06 stohirov

+1 More specifically: serveEventConn and servePubliConn methods are not synchronized. serveEventConn actively modfies the following maps: cnameMap, httpTunnels, and tcpTunnels on each TunnelRequest event. And at the same time servePublicConn is reading from those maps.

myselfBZ avatar Jun 21 '26 08:06 myselfBZ