matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.78k stars 275 forks source link

[Bug]: UT failed in TestKill(1.2-dev) #19097

Open zengyan1 opened 2 weeks ago

zengyan1 commented 2 weeks ago

Is there an existing issue for the same bug?

Branch Name

1.2-dev

Commit ID

f89ad17352ee036cfc59fe44f308eb71108754a8

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

2024-09-29T13:07:29.4867674Z ================== 2024-09-29T13:07:29.4867861Z WARNING: DATA RACE 2024-09-29T13:07:29.4868101Z Read at 0x00c003e2f000 by goroutine 773: 2024-09-29T13:07:29.4868760Z github.com/matrixorigin/matrixone/pkg/frontend.(Routine).killConnection.func1() 2024-09-29T13:07:29.4869494Z /home/runner/work/matrixone/matrixone/pkg/frontend/routine.go:400 +0x30 2024-09-29T13:07:29.4870227Z github.com/matrixorigin/matrixone/pkg/frontend.(Routine).execCallbackBasedOnRequest() 2024-09-29T13:07:29.4870973Z /home/runner/work/matrixone/matrixone/pkg/frontend/routine.go:127 +0xbb 2024-09-29T13:07:29.4871744Z github.com/matrixorigin/matrixone/pkg/frontend.(Routine).killConnection() 2024-09-29T13:07:29.4872486Z /home/runner/work/matrixone/matrixone/pkg/frontend/routine.go:406 +0x92 2024-09-29T13:07:29.4873053Z github.com/matrixorigin/matrixone/pkg/frontend.(RoutineManager).kill() 2024-09-29T13:07:29.4873863Z /home/runner/work/matrixone/matrixone/pkg/frontend/routine_manager.go:345 +0x15d 2024-09-29T13:07:29.4874282Z github.com/matrixorigin/matrixone/pkg/frontend.doKill() 2024-09-29T13:07:29.4875160Z /home/runner/work/matrixone/matrixone/pkg/frontend/mysql_cmd_executor.go:1366 +0x139 2024-09-29T13:07:29.4875619Z github.com/matrixorigin/matrixone/pkg/frontend.handleKill() 2024-09-29T13:07:29.4876496Z /home/runner/work/matrixone/matrixone/pkg/frontend/mysql_cmd_executor.go:1375 +0x2be4 2024-09-29T13:07:29.4877005Z github.com/matrixorigin/matrixone/pkg/frontend.execInFrontend() 2024-09-29T13:07:29.4877777Z /home/runner/work/matrixone/matrixone/pkg/frontend/self_handle.go:354 +0x2be5 2024-09-29T13:07:29.4878502Z github.com/matrixorigin/matrixone/pkg/frontend.executeStmt() 2024-09-29T13:07:29.4879540Z /home/runner/work/matrixone/matrixone/pkg/frontend/mysql_cmd_executor.go:2491 +0x1612 2024-09-29T13:07:29.4879827Z github.com/matrixorigin/matrixone/pkg/frontend.dispatchStmt() 2024-09-29T13:07:29.4880317Z /home/runner/work/matrixone/matrixone/pkg/frontend/mysql_cmd_executor.go:2459 +0x498 2024-09-29T13:07:29.4880657Z github.com/matrixorigin/matrixone/pkg/frontend.executeStmtWithIncrStmt() 2024-09-29T13:07:29.4881124Z /home/runner/work/matrixone/matrixone/pkg/frontend/mysql_cmd_executor.go:2428 +0x308 2024-09-29T13:07:29.4881648Z github.com/matrixorigin/matrixone/pkg/frontend.executeStmtWithWorkspace() 2024-09-29T13:07:29.4882131Z /home/runner/work/matrixone/matrixone/pkg/frontend/mysql_cmd_executor.go:2388 +0x834 2024-09-29T13:07:29.4882443Z github.com/matrixorigin/matrixone/pkg/frontend.executeStmtWithTxn() 2024-09-29T13:07:29.4882924Z /home/runner/work/matrixone/matrixone/pkg/frontend/mysql_cmd_executor.go:2280 +0x1f9 2024-09-29T13:07:29.4883262Z github.com/matrixorigin/matrixone/pkg/frontend.executeStmtWithResponse() 2024-09-29T13:07:29.4883720Z /home/runner/work/matrixone/matrixone/pkg/frontend/mysql_cmd_executor.go:2244 +0x5c4 2024-09-29T13:07:29.4883983Z github.com/matrixorigin/matrixone/pkg/frontend.doComQuery() 2024-09-29T13:07:29.4884463Z /home/runner/work/matrixone/matrixone/pkg/frontend/mysql_cmd_executor.go:2837 +0x35ed 2024-09-29T13:07:29.4884729Z github.com/matrixorigin/matrixone/pkg/frontend.ExecRequest() 2024-09-29T13:07:29.4885202Z /home/runner/work/matrixone/matrixone/pkg/frontend/mysql_cmd_executor.go:2912 +0xd91 2024-09-29T13:07:29.4885532Z github.com/matrixorigin/matrixone/pkg/frontend.(Routine).handleRequest() 2024-09-29T13:07:29.4885941Z /home/runner/work/matrixone/matrixone/pkg/frontend/routine.go:291 +0xa39 2024-09-29T13:07:29.4886280Z github.com/matrixorigin/matrixone/pkg/frontend.(RoutineManager).Handler() 2024-09-29T13:07:29.4886745Z /home/runner/work/matrixone/matrixone/pkg/frontend/routine_manager.go:545 +0x13f3 2024-09-29T13:07:29.4887195Z github.com/matrixorigin/matrixone/pkg/frontend.(RoutineManager).Handler-fm() 2024-09-29T13:07:29.4887349Z :1 +0x6d 2024-09-29T13:07:29.4887584Z github.com/fagongzi/goetty/v2.(server).doConnection() 2024-09-29T13:07:29.4888348Z /home/runner/go/pkg/mod/github.com/matrixorigin/goetty/v2@v2.0.0-20240611082008-a4de209fff3d/application.go:393 +0x426 2024-09-29T13:07:29.4888639Z github.com/fagongzi/goetty/v2.(server).doConnection-fm() 2024-09-29T13:07:29.4888788Z :1 +0x47 2024-09-29T13:07:29.4889017Z github.com/fagongzi/goetty/v2.(server).doStart.func2.1() 2024-09-29T13:07:29.4889747Z /home/runner/go/pkg/mod/github.com/matrixorigin/goetty/v2@v2.0.0-20240611082008-a4de209fff3d/application.go:356 +0x106 2024-09-29T13:07:29.4889754Z 2024-09-29T13:07:29.4889943Z Previous write at 0x00c003e2f000 by goroutine 770: 2024-09-29T13:07:29.4890418Z github.com/matrixorigin/matrixone/pkg/frontend.(RoutineManager).Closed.(Routine).cleanup.func4() 2024-09-29T13:07:29.4890834Z /home/runner/work/matrixone/matrixone/pkg/frontend/routine.go:448 +0x346 2024-09-29T13:07:29.4890961Z sync.(Once).doSlow() 2024-09-29T13:07:29.4891278Z /opt/hostedtoolcache/go/1.22.3/x64/src/sync/once.go:74 +0xf0 2024-09-29T13:07:29.4891511Z sync.(Once).Do() 2024-09-29T13:07:29.4891828Z /opt/hostedtoolcache/go/1.22.3/x64/src/sync/once.go:65 +0x44 2024-09-29T13:07:29.4892132Z github.com/matrixorigin/matrixone/pkg/frontend.(Routine).cleanup() 2024-09-29T13:07:29.4892535Z /home/runner/work/matrixone/matrixone/pkg/frontend/routine.go:416 +0x450 2024-09-29T13:07:29.4892867Z github.com/matrixorigin/matrixone/pkg/frontend.(RoutineManager).Closed() 2024-09-29T13:07:29.4893320Z /home/runner/work/matrixone/matrixone/pkg/frontend/routine_manager.go:329 +0x3f9 2024-09-29T13:07:29.4893514Z github.com/fagongzi/goetty/v2.(baseIO).Close() 2024-09-29T13:07:29.4894491Z /home/runner/go/pkg/mod/github.com/matrixorigin/goetty/v2@v2.0.0-20240611082008-a4de209fff3d/session.go:398 +0x3b2 2024-09-29T13:07:29.4894750Z github.com/fagongzi/goetty/v2.(server).doStart.func2.1.1() 2024-09-29T13:07:29.4895496Z /home/runner/go/pkg/mod/github.com/matrixorigin/goetty/v2@v2.0.0-20240611082008-a4de209fff3d/application.go:351 +0x81 2024-09-29T13:07:29.4895631Z runtime.deferreturn() 2024-09-29T13:07:29.4895984Z /opt/hostedtoolcache/go/1.22.3/x64/src/runtime/panic.go:602 +0x5d 2024-09-29T13:07:29.4895991Z 2024-09-29T13:07:29.4896128Z Goroutine 773 (running) created at: 2024-09-29T13:07:29.4896360Z github.com/fagongzi/goetty/v2.(server).doStart.func2() 2024-09-29T13:07:29.4897122Z /home/runner/go/pkg/mod/github.com/matrixorigin/goetty/v2@v2.0.0-20240611082008-a4de209fff3d/application.go:348 +0x634 2024-09-29T13:07:29.4897373Z github.com/fagongzi/goetty/v2.(server).doStart.gowrap1() 2024-09-29T13:07:29.4898107Z /home/runner/go/pkg/mod/github.com/matrixorigin/goetty/v2@v2.0.0-20240611082008-a4de209fff3d/application.go:365 +0x4f 2024-09-29T13:07:29.4898117Z 2024-09-29T13:07:29.4898258Z Goroutine 770 (finished) created at: 2024-09-29T13:07:29.4898483Z github.com/fagongzi/goetty/v2.(server).doStart.func2() 2024-09-29T13:07:29.4899666Z /home/runner/go/pkg/mod/github.com/matrixorigin/goetty/v2@v2.0.0-20240611082008-a4de209fff3d/application.go:348 +0x634 2024-09-29T13:07:29.4900089Z github.com/fagongzi/goetty/v2.(server).doStart.gowrap1() 2024-09-29T13:07:29.4901580Z /home/runner/go/pkg/mod/github.com/matrixorigin/goetty/v2@v2.0.0-20240611082008-a4de209fff3d/application.go:365 +0x4f

Expected Behavior

No response

Steps to Reproduce

https://github.com/matrixorigin/matrixone/actions/runs/11092817495/job/30818328345?pr=19092

Additional information

No response

xzxiong commented 4 days ago

repro https://github.com/matrixorigin/matrixone/actions/runs/11342227288/job/31542169452