You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Ubuntu coverage suite crashes pkg/proxy while running TestHandler_HandleEventKill:
fatal error: concurrent map writes
github.com/matrixorigin/matrixone/pkg/proxy.(*testHandler).handleKillConn(...)
pkg/proxy/server_conn_test.go:385
github.com/matrixorigin/matrixone/pkg/proxy.testHandle(...)
pkg/proxy/server_conn_test.go:358
github.com/matrixorigin/matrixone/pkg/proxy.(*testCNServer).Start.func1(...)
pkg/proxy/server_conn_test.go:318
created by github.com/matrixorigin/matrixone/pkg/proxy.(*testCNServer).Start
pkg/proxy/server_conn_test.go:313
FAIL github.com/matrixorigin/matrixone/pkg/proxy 3.491s
testCNServer.Start creates one handler goroutine per backend connection. handleKillConn lets those goroutines write the shared testCNServer.globalVars map without synchronization:
h.server.globalVars["killed"] ="yes"
The same shared map is also iterated without synchronization by handleShowGlobalVar.
Expected behavior
The proxy test server must serialize or otherwise encapsulate all access to
its shared state so concurrent kill handling cannot crash the test process or
race with readers.
Steps to reproduce
Check out the observed head or the baseline above.
Run the repository's Ubuntu all-package coverage command with -tags matrixone_test -covermode=set.
Observe TestHandler_HandleEventKill occasionally dispatch the kill to
concurrent test-server handlers and crash on the shared map write.
The failure is timing-sensitive. The linked attempt is the exact reproduction
and contains the complete goroutine stack.
Scope and attribution
Searches for TestHandler_HandleEventKill, handleKillConn, pkg/proxy plus concurrent map, and globalVars found no matching issue.
pkg/proxy/server_conn_test.go has the same SHA-256
(ac41d30b42d0d94a90b7f066cd6511936cdcbe9acaab3d4d88c9b3e3e4ac2733)
on the baseline and failing PR head.
The unsafe map and write were introduced in commit 90f59ec7a3c in 2023.
PR fix: preserve clone auto-increment continuation #27154 changes only clone allocator construction/tests and clone BVT
expectations. Although pkg/sql/compile is transitively linked into the
proxy test binary through pkg/frontend, its changed constructTableClone path is not executed by this test.
This is therefore an unrelated latent test-fixture concurrency defect exposed
by coverage scheduling, not a clone allocator regression.
Branch and build
mainc34f6ed28bc9587e9413d3d2468336fb82ff140765ec7eb16a580e1534e41f368f2d7cc561e7612b33126283893, attempt 1Actual behavior
The Ubuntu coverage suite crashes
pkg/proxywhile runningTestHandler_HandleEventKill:testCNServer.Startcreates one handler goroutine per backend connection.handleKillConnlets those goroutines write the sharedtestCNServer.globalVarsmap without synchronization:The same shared map is also iterated without synchronization by
handleShowGlobalVar.Expected behavior
The proxy test server must serialize or otherwise encapsulate all access to
its shared state so concurrent kill handling cannot crash the test process or
race with readers.
Steps to reproduce
-tags matrixone_test -covermode=set.TestHandler_HandleEventKilloccasionally dispatch the kill toconcurrent test-server handlers and crash on the shared map write.
The failure is timing-sensitive. The linked attempt is the exact reproduction
and contains the complete goroutine stack.
Scope and attribution
TestHandler_HandleEventKill,handleKillConn,pkg/proxyplusconcurrent map, andglobalVarsfound no matching issue.pkg/proxy/server_conn_test.gohas the same SHA-256(
ac41d30b42d0d94a90b7f066cd6511936cdcbe9acaab3d4d88c9b3e3e4ac2733)on the baseline and failing PR head.
90f59ec7a3cin 2023.expectations. Although
pkg/sql/compileis transitively linked into theproxy test binary through
pkg/frontend, its changedconstructTableClonepath is not executed by this test.This is therefore an unrelated latent test-fixture concurrency defect exposed
by coverage scheduling, not a clone allocator regression.