matrixorigin / matrixone

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

[Bug]: WARNING: DATA RACE #3849

Closed sukki37 closed 2 years ago

sukki37 commented 2 years ago

Is there an existing issue for the same bug?

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): 395ec24008447c71b031e33f6d506dab8b5a4c7b
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

Some WARNING: DATA RACE during BVT test, full log is here: mo-server.log.zip

==================
WARNING: DATA RACE
Write at 0x000003f8b9b8 by goroutine 62:
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.initTokens()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/tokens.go:280 +0x18c4
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.NewScanner()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:42 +0x46
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.NewLexer()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:54 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:29 +0x2c
  github.com/matrixorigin/matrixone/pkg/sql/parsers.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/sqlparse.go:29 +0x116
  github.com/matrixorigin/matrixone/pkg/frontend.glob..func11()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1379 +0x64
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1456 +0x7ee
  github.com/matrixorigin/matrixone/pkg/frontend.(*internalExecutor).Exec()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/internal_executor.go:60 +0x104
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).sqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:215 +0x248
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0x71

Previous read at 0x000003f8b9b8 by goroutine 61:
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.(*Scanner).scanIdentifier()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:583 +0x354
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.(*Scanner).Scan()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:102 +0x46f
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.(*Lexer).Lex()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:59 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.yylex1()
      yaccpar:127 +0x54
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.(*yyParserImpl).Parse()
      yaccpar:212 +0x57338
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.yyParse()
      yaccpar:161 +0x132
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:30 +0x133
  github.com/matrixorigin/matrixone/pkg/sql/parsers.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/sqlparse.go:29 +0x116
  github.com/matrixorigin/matrixone/pkg/frontend.glob..func11()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1379 +0x64
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1456 +0x7ee
  github.com/matrixorigin/matrixone/pkg/frontend.(*internalExecutor).Exec()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/internal_executor.go:60 +0x104
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).sqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:215 +0x248
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0x71

Goroutine 62 (running) created at:
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0xc4
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).Start()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:127 +0x58
  github.com/matrixorigin/matrixone/pkg/util/metric.InitMetric()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric.go:88 +0x3a4
  main.createMOServer()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:76 +0x3b4
  main.main()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:245 +0x1572

Goroutine 61 (running) created at:
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0xc4
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).Start()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:127 +0x58
  github.com/matrixorigin/matrixone/pkg/util/metric.InitMetric()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric.go:88 +0x3a4
  main.createMOServer()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:76 +0x3b4
  main.main()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:245 +0x1572
==================
{"level":"DEBUG","time":"2022/07/10 09:19:13.763415 +0000","caller":"segmentio/driver.go:115","msg":" store/tae/1002.seg-0xc0006a7968 | SegmentFile | Init "}
==================
WARNING: DATA RACE
Write at 0x000003f8bfe0 by goroutine 62:
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.initTokens()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/tokens.go:282 +0x18f2
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.NewScanner()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:42 +0x46
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.NewLexer()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:54 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:29 +0x2c
  github.com/matrixorigin/matrixone/pkg/sql/parsers.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/sqlparse.go:29 +0x116
  github.com/matrixorigin/matrixone/pkg/frontend.glob..func11()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1379 +0x64
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1456 +0x7ee
  github.com/matrixorigin/matrixone/pkg/frontend.(*internalExecutor).Exec()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/internal_executor.go:60 +0x104
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).sqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:215 +0x248
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0x71

Previous read at 0x000003f8bfe0 by goroutine 61:
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.(*Scanner).stepBackOneChar()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:232 +0x244
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.(*Scanner).Scan()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:144 +0x9ba
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.(*Lexer).Lex()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:59 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.yylex1()
      yaccpar:127 +0x54
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.(*yyParserImpl).Parse()
      yaccpar:212 +0x57338
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.yyParse()
      yaccpar:161 +0x132
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:30 +0x133
  github.com/matrixorigin/matrixone/pkg/sql/parsers.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/sqlparse.go:29 +0x116
  github.com/matrixorigin/matrixone/pkg/frontend.glob..func11()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1379 +0x64
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1456 +0x7ee
  github.com/matrixorigin/matrixone/pkg/frontend.(*internalExecutor).Exec()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/internal_executor.go:60 +0x104
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).sqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:215 +0x248
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0x71

Goroutine 62 (running) created at:
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0xc4
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).Start()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:127 +0x58
  github.com/matrixorigin/matrixone/pkg/util/metric.InitMetric()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric.go:88 +0x3a4
  main.createMOServer()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:76 +0x3b4
  main.main()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:245 +0x1572

Goroutine 61 (running) created at:
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0xc4
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).Start()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:127 +0x58
  github.com/matrixorigin/matrixone/pkg/util/metric.InitMetric()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric.go:88 +0x3a4
  main.createMOServer()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:76 +0x3b4
  main.main()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:245 +0x1572
==================
==================
WARNING: DATA RACE
Write at 0x000003f8ba40 by goroutine 62:
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.initTokens()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/tokens.go:283 +0x1909
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.NewScanner()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:42 +0x46
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.NewLexer()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:54 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:29 +0x2c
  github.com/matrixorigin/matrixone/pkg/sql/parsers.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/sqlparse.go:29 +0x116
  github.com/matrixorigin/matrixone/pkg/frontend.glob..func11()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1379 +0x64
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1456 +0x7ee
  github.com/matrixorigin/matrixone/pkg/frontend.(*internalExecutor).Exec()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/internal_executor.go:60 +0x104
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).sqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:215 +0x248
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0x71

Previous read at 0x000003f8ba40 by goroutine 61:
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.(*Scanner).scanNumber()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:503 +0x55
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.(*Scanner).Scan()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:104 +0xc0b
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.(*Lexer).Lex()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:59 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.yylex1()
      yaccpar:127 +0x54
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.(*yyParserImpl).Parse()
      yaccpar:212 +0x57338
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.yyParse()
      yaccpar:161 +0x132
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:30 +0x133
  github.com/matrixorigin/matrixone/pkg/sql/parsers.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/sqlparse.go:29 +0x116
  github.com/matrixorigin/matrixone/pkg/frontend.glob..func11()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1379 +0x64
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1456 +0x7ee
  github.com/matrixorigin/matrixone/pkg/frontend.(*internalExecutor).Exec()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/internal_executor.go:60 +0x104
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).sqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:215 +0x248
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0x71

Goroutine 62 (running) created at:
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0xc4
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).Start()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:127 +0x58
  github.com/matrixorigin/matrixone/pkg/util/metric.InitMetric()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric.go:88 +0x3a4
  main.createMOServer()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:76 +0x3b4
  main.main()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:245 +0x1572

Goroutine 61 (running) created at:
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0xc4
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).Start()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:127 +0x58
  github.com/matrixorigin/matrixone/pkg/util/metric.InitMetric()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric.go:88 +0x3a4
  main.createMOServer()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:76 +0x3b4
  main.main()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:245 +0x1572
==================
{"level":"DEBUG","time":"2022/07/10 09:19:13.764291 +0000","caller":"segmentio/driver.go:327","msg":" store/tae/1002.seg-0xc0006a7968 | SegmentFile | Mount | Null-1-1 | Log Level1 0xc001d4d038-ffffffffffffffff"}
{"level":"DEBUG","time":"2022/07/10 09:19:13.764415 +0000","caller":"segmentio/driver.go:327","msg":" store/tae/1002.seg-0xc0006a7968 | NewBlockFile | 5_1002.idx-2-2 | Log Level1 0xc001d4d038-ffffffffffffffff"}
==================
WARNING: DATA RACE
Write at 0x000003f8b8e0 by goroutine 62:
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.initTokens()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/tokens.go:284 +0x1924
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.NewScanner()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:42 +0x46
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.NewLexer()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:54 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:29 +0x2c
  github.com/matrixorigin/matrixone/pkg/sql/parsers.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/sqlparse.go:29 +0x116
  github.com/matrixorigin/matrixone/pkg/frontend.glob..func11()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1379 +0x64
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1456 +0x7ee
  github.com/matrixorigin/matrixone/pkg/frontend.(*internalExecutor).Exec()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/internal_executor.go:60 +0x104
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).sqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:215 +0x248
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0x71

Previous read at 0x000003f8b8e0 by goroutine 61:
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.(*Scanner).scanNumber()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:531 +0x5b8
  github.com/matrixorigin/matrixone/pkg/sql/parsers/scanner.(*Scanner).Scan()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/scanner/scanner.go:104 +0xc0b
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.(*Lexer).Lex()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:59 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.yylex1()
      yaccpar:127 +0x54
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.(*yyParserImpl).Parse()
      yaccpar:212 +0x57338
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.yyParse()
      yaccpar:161 +0x132
  github.com/matrixorigin/matrixone/pkg/sql/parsers/dialect/mysql.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/dialect/mysql/mysql_lexer.go:30 +0x133
  github.com/matrixorigin/matrixone/pkg/sql/parsers.Parse()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/parsers/sqlparse.go:29 +0x116
  github.com/matrixorigin/matrixone/pkg/frontend.glob..func11()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1379 +0x64
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1456 +0x7ee
  github.com/matrixorigin/matrixone/pkg/frontend.(*internalExecutor).Exec()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/internal_executor.go:60 +0x104
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).sqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:215 +0x248
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0x71

Goroutine 62 (running) created at:
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0xc4
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).Start()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:127 +0x58
  github.com/matrixorigin/matrixone/pkg/util/metric.InitMetric()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric.go:88 +0x3a4
  main.createMOServer()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:76 +0x3b4
  main.main()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:245 +0x1572

Goroutine 61 (running) created at:
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).startSqlWorker()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:149 +0xc4
  github.com/matrixorigin/matrixone/pkg/util/metric.(*metricCollector).Start()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric_collector.go:127 +0x58
  github.com/matrixorigin/matrixone/pkg/util/metric.InitMetric()
      /home/runner/work/matrixone/matrixone/head/pkg/util/metric/metric.go:88 +0x3a4
  main.createMOServer()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:76 +0x3b4
  main.main()
      /home/runner/work/matrixone/matrixone/head/cmd/db-server/main.go:245 +0x1572
==================
==================
WARNING: DATA RACE
Write at 0x00c00077b5a8 by goroutine 120:
  github.com/matrixorigin/matrixone/pkg/frontend.(*RoutineManager).Handler()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine_manager.go:104 +0x192
  github.com/matrixorigin/matrixone/pkg/frontend.(*RoutineManager).Handler-fm()
      <autogenerated>:1 +0x77
  github.com/fagongzi/goetty.(*server).doConnection()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:234 +0x435
  github.com/fagongzi/goetty.(*server).doStart.func1()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:207 +0x1c9

Previous write at 0x00c00077b5a8 by goroutine 121:
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlProtocolImpl).writePackets()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_protocol.go:1685 +0x304
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlProtocolImpl).sendOKPacket()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_protocol.go:1053 +0x8b
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlProtocolImpl).SendResponse()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/protocol.go:241 +0x447
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1782 +0x2de1
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).ExecRequest()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1900 +0x1364
  github.com/matrixorigin/matrixone/pkg/frontend.(*Routine).Loop()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:106 +0x3c5
  github.com/matrixorigin/matrixone/pkg/frontend.NewRoutine.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:158 +0x39

Goroutine 120 (running) created at:
  github.com/fagongzi/goetty.(*server).doStart()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:185 +0x27c
  github.com/fagongzi/goetty.(*server).Start.func2()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:95 +0x39

Goroutine 121 (running) created at:
  github.com/matrixorigin/matrixone/pkg/frontend.NewRoutine()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:158 +0x3d6
  github.com/matrixorigin/matrixone/pkg/frontend.(*RoutineManager).Created()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine_manager.go:41 +0x1f4
  github.com/fagongzi/goetty.(*server).doStart.func1()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:205 +0x1af
==================
{"level":"INFO","time":"2022/07/10 09:19:57.062757 +0000","caller":"frontend/mysql_cmd_executor.go:1876","msg":"query:select * from t1 join t2 on t1.decimald=t2.decimal..."}
{"level":"INFO","time":"2022/07/10 09:19:57.063048 +0000","caller":"frontend/session.go:444","msg":"start txn autocommit if needed"}
{"level":"INFO","time":"2022/07/10 09:19:57.063093 +0000","caller":"frontend/session.go:370","msg":"current txn state 0"}
{"level":"INFO","time":"2022/07/10 09:19:57.063132 +0000","caller":"frontend/session.go:449","msg":"need create new txn"}
{"level":"INFO","time":"2022/07/10 09:19:57.063161 +0000","caller":"frontend/session.go:430","msg":"start txn by autocommit"}
{"level":"INFO","time":"2022/07/10 09:19:57.063214 +0000","caller":"frontend/session.go:83","msg":"switch from 0 to 2"}
{"level":"INFO","time":"2022/07/10 09:19:57.063247 +0000","caller":"frontend/mysql_cmd_executor.go:1520","msg":"start autocommit txn in default"}
{"level":"INFO","time":"2022/07/10 09:19:57.063338 +0000","caller":"frontend/session.go:662","msg":"dbName decimal tableNames [t1 t2]"}
{"level":"INFO","time":"2022/07/10 09:19:57.063419 +0000","caller":"frontend/session.go:662","msg":"dbName decimal tableNames [t1 t2]"}
{"level":"INFO","time":"2022/07/10 09:19:57.063488 +0000","caller":"frontend/session.go:662","msg":"dbName decimal tableNames [t1 t2]"}
{"level":"INFO","time":"2022/07/10 09:19:57.063556 +0000","caller":"frontend/session.go:662","msg":"dbName decimal tableNames [t1 t2]"}
{"level":"INFO","time":"2022/07/10 09:19:57.064041 +0000","caller":"frontend/mysql_cmd_executor.go:1631","msg":"time of Exec.Build : 748.593µs"}
==================
WARNING: DATA RACE
Write at 0x00c00c05e220 by goroutine 160:
  github.com/matrixorigin/matrixone/pkg/sql/colexec/join.Prepare()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/colexec/join/join.go:60 +0x1046
  github.com/matrixorigin/matrixone/pkg/vm.Prepare()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/vm.go:37 +0xe1
  github.com/matrixorigin/matrixone/pkg/vm/pipeline.(*Pipeline).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/pipeline/pipeline.go:128 +0x228
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:358 +0x9b9
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func2()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:337 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func6()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:338 +0x47

Previous write at 0x00c00c05e220 by goroutine 152:
  github.com/matrixorigin/matrixone/pkg/sql/colexec/join.Prepare()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/colexec/join/join.go:60 +0x1046
  github.com/matrixorigin/matrixone/pkg/vm.Prepare()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/vm.go:37 +0xe1
  github.com/matrixorigin/matrixone/pkg/vm/pipeline.(*Pipeline).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/pipeline/pipeline.go:128 +0x228
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:358 +0x9b9
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func2()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:337 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func6()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:338 +0x47

Goroutine 160 (running) created at:
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:332 +0x527
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).DispatchRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:420 +0x12bb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).ParallelRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:433 +0x312
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).RemoteRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:425 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func3()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:345 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func7()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:346 +0x47

Goroutine 152 (running) created at:
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:332 +0x527
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).DispatchRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:420 +0x12bb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).ParallelRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:433 +0x312
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).RemoteRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:425 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func3()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:345 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func7()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:346 +0x47
==================
{"level":"INFO","time":"2022/07/10 09:19:57.065342 +0000","caller":"frontend/mysql_cmd_executor.go:343","msg":"goid 87 \n"}
{"level":"INFO","time":"2022/07/10 09:19:57.065469 +0000","caller":"frontend/mysql_cmd_executor.go:681","msg":"rowCount 1 \ntime of getDataFromPipeline : 24.8µs \nprocessBatchTime 21.4µs \nrow2colTime 0s \nallocateOutBufferTime 700ns \noutputQueue.flushTime 0s \nprocessBatchTime - row2colTime - allocateOutbufferTime - flushTime 20.7µs \nrestTime(=tTime - row2colTime - allocateOutBufferTime) 24.1µs \nprotoStats flushCount 0 writeCount 1 \nwriteBytes 0 0 MB\n\n"}
{"level":"INFO","time":"2022/07/10 09:19:57.065748 +0000","caller":"frontend/mysql_cmd_executor.go:1722","msg":"time of Exec.Run : 1.524486ms"}
{"level":"INFO","time":"2022/07/10 09:19:57.065854 +0000","caller":"frontend/session.go:522","msg":"commit autocommit only"}
{"level":"INFO","time":"2022/07/10 09:20:03.367867 +0000","caller":"frontend/mysql_cmd_executor.go:1861","msg":"cmd 3"}
{"level":"INFO","time":"2022/07/10 09:20:03.367919 +0000","caller":"frontend/mysql_cmd_executor.go:1876","msg":"query:SELECT a,COUNT(DISTINCT b) FROM t1 GROUP BY a HAVI..."}
{"level":"INFO","time":"2022/07/10 09:20:03.368217 +0000","caller":"frontend/session.go:444","msg":"start txn autocommit if needed"}
{"level":"INFO","time":"2022/07/10 09:20:03.368263 +0000","caller":"frontend/session.go:370","msg":"current txn state 0"}
{"level":"INFO","time":"2022/07/10 09:20:03.368300 +0000","caller":"frontend/session.go:449","msg":"need create new txn"}
{"level":"INFO","time":"2022/07/10 09:20:03.368340 +0000","caller":"frontend/session.go:430","msg":"start txn by autocommit"}
{"level":"INFO","time":"2022/07/10 09:20:03.368398 +0000","caller":"frontend/session.go:83","msg":"switch from 0 to 2"}
{"level":"INFO","time":"2022/07/10 09:20:03.368434 +0000","caller":"frontend/mysql_cmd_executor.go:1520","msg":"start autocommit txn in default"}
{"level":"INFO","time":"2022/07/10 09:20:03.368549 +0000","caller":"frontend/session.go:662","msg":"dbName func_aggr_avg tableNames [t1]"}
{"level":"INFO","time":"2022/07/10 09:20:03.368631 +0000","caller":"frontend/session.go:662","msg":"dbName func_aggr_avg tableNames [t1]"}
{"level":"INFO","time":"2022/07/10 09:20:03.369015 +0000","caller":"frontend/mysql_cmd_executor.go:1631","msg":"time of Exec.Build : 538.895µs"}
==================
WARNING: DATA RACE
Write at 0x00c03a303520 by goroutine 257:
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/moengine.(*txnBlock).Read()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/engine/tae/moengine/block.go:49 +0x587
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/moengine.(*txnReader).Read()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/engine/tae/moengine/reader.go:53 +0x2d8
  github.com/matrixorigin/matrixone/pkg/vm/pipeline.(*Pipeline).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/pipeline/pipeline.go:69 +0x341
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:311 +0x2a7
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:329 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func5()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:330 +0x47

Previous read at 0x00c03a303520 by goroutine 179:
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/moengine.(*txnBlock).Read()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/engine/tae/moengine/block.go:37 +0x24e
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/moengine.(*txnReader).Read()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/engine/tae/moengine/reader.go:53 +0x2d8
  github.com/matrixorigin/matrixone/pkg/vm/pipeline.(*Pipeline).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/pipeline/pipeline.go:69 +0x341
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:311 +0x2a7
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:329 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func5()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:330 +0x47

Goroutine 257 (running) created at:
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:324 +0x347
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).ParallelRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:608 +0x198d
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).RemoteRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:425 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func3()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:345 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func7()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:346 +0x47

Goroutine 179 (running) created at:
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:324 +0x347
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).ParallelRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:608 +0x198d
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).RemoteRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:425 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func3()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:345 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func7()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:346 +0x47
==================
{"level":"INFO","time":"2022/07/10 09:20:03.434390 +0000","caller":"frontend/mysql_cmd_executor.go:343","msg":"goid 87 \n"}
{"level":"INFO","time":"2022/07/10 09:20:03.434567 +0000","caller":"frontend/mysql_cmd_executor.go:681","msg":"rowCount 1 \ntime of getDataFromPipeline : 25.399µs \nprocessBatchTime 20.399µs \nrow2colTime 0s \nallocateOutBufferTime 900ns \noutputQueue.flushTime 0s \nprocessBatchTime - row2colTime - allocateOutbufferTime - flushTime 19.499µs \nrestTime(=tTime - row2colTime - allocateOutBufferTime) 24.499µs \nprotoStats flushCount 0 writeCount 1 \nwriteBytes 0 0 MB\n\n"}
{"level":"INFO","time":"2022/07/10 09:20:03.434802 +0000","caller":"frontend/mysql_cmd_executor.go:1722","msg":"time of Exec.Run : 65.551202ms"}
{"level":"INFO","time":"2022/07/10 09:20:03.434929 +0000","caller":"frontend/session.go:522","msg":"commit autocommit only"}
{"level":"INFO","time":"2022/07/10 09:20:03.434993 +0000","caller":"frontend/session.go:83","msg":"switch from 2 to 3"}
{"level":"INFO","time":"2022/07/10 09:20:03.435049 +0000","caller":"frontend/session.go:586","msg":"clean tae txn"}
{"level":"INFO","time":"2022/07/10 09:20:03.435343 +0000","caller":"frontend/mysql_cmd_executor.go:1861","msg":"cmd 3"}
{"level":"INFO","time":"2022/07/10 09:20:03.435437 +0000","caller":"frontend/mysql_cmd_executor.go:1876","msg":"query:SELECT DISTINCT a, SUM( b) FROM t1 GROUP BY a HAVI..."}
{"level":"INFO","time":"2022/07/10 09:20:03.435831 +0000","caller":"frontend/session.go:444","msg":"start txn autocommit if needed"}
{"level":"INFO","time":"2022/07/10 09:20:03.435882 +0000","caller":"frontend/session.go:370","msg":"current txn state 0"}
{"level":"INFO","time":"2022/07/10 09:20:03.435926 +0000","caller":"frontend/session.go:449","msg":"need create new txn"}
{"level":"INFO","time":"2022/07/10 09:20:03.435959 +0000","caller":"frontend/session.go:430","msg":"start txn by autocommit"}
{"level":"INFO","time":"2022/07/10 09:20:03.436018 +0000","caller":"frontend/session.go:83","msg":"switch from 0 to 2"}
{"level":"INFO","time":"2022/07/10 09:20:03.436061 +0000","caller":"frontend/mysql_cmd_executor.go:1520","msg":"start autocommit txn in default"}
{"level":"INFO","time":"2022/07/10 09:20:03.436218 +0000","caller":"frontend/session.go:662","msg":"dbName func_aggr_avg tableNames [t1]"}
{"level":"INFO","time":"2022/07/10 09:20:03.436319 +0000","caller":"frontend/session.go:662","msg":"dbName func_aggr_avg tableNames [t1]"}
{"level":"INFO","time":"2022/07/10 09:20:03.436744 +0000","caller":"frontend/mysql_cmd_executor.go:1631","msg":"time of Exec.Build : 636.394µs"}
==================
WARNING: DATA RACE
Read at 0x00c039f24c20 by goroutine 175:
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/moengine.(*txnBlock).Read()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/engine/tae/moengine/block.go:37 +0x24e
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/moengine.(*txnReader).Read()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/engine/tae/moengine/reader.go:53 +0x2d8
  github.com/matrixorigin/matrixone/pkg/vm/pipeline.(*Pipeline).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/pipeline/pipeline.go:69 +0x341
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:311 +0x2a7
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:329 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func5()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:330 +0x47

Previous write at 0x00c039f24c20 by goroutine 260:
  [failed to restore the stack]

Goroutine 175 (running) created at:
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:324 +0x347
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).ParallelRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:608 +0x198d
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).RemoteRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:425 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func3()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:345 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func7()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:346 +0x47

Goroutine 260 (running) created at:
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:324 +0x347
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).ParallelRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:608 +0x198d
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).RemoteRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:425 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func3()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:345 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func7()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:346 +0x47
==================
{"level":"INFO","time":"2022/07/10 09:20:03.465540 +0000","caller":"frontend/mysql_cmd_executor.go:343","msg":"goid 87 \n"}
{"level":"INFO","time":"2022/07/10 09:20:03.465713 +0000","caller":"frontend/mysql_cmd_executor.go:681","msg":"rowCount 1 \ntime of getDataFromPipeline : 27.799µs \nprocessBatchTime 19.2µs \nrow2colTime 0s \nallocateOutBufferTime 1.1µs \noutputQueue.flushTime 0s \nprocessBatchTime - row2colTime - allocateOutbufferTime - flushTime 18.1µs \nrestTime(=tTime - row2colTime - allocateOutBufferTime) 26.699µs \nprotoStats flushCount 0 writeCount 1 \nwriteBytes 0 0 MB\n\n"}
{"level":"INFO","time":"2022/07/10 09:20:03.465853 +0000","caller":"frontend/mysql_cmd_executor.go:1722","msg":"time of Exec.Run : 28.948336ms"}
{"level":"INFO","time":"2022/07/10 09:20:03.465977 +0000","caller":"frontend/session.go:522","msg":"commit autocommit only"}
{"level":"INFO","time":"2022/07/10 09:20:18.233926 +0000","caller":"frontend/mysql_cmd_executor.go:1861","msg":"cmd 3"}
{"level":"INFO","time":"2022/07/10 09:20:18.233975 +0000","caller":"frontend/mysql_cmd_executor.go:1876","msg":"query:select * from test_11;\n"}
{"level":"INFO","time":"2022/07/10 09:20:18.234187 +0000","caller":"frontend/session.go:444","msg":"start txn autocommit if needed"}
{"level":"INFO","time":"2022/07/10 09:20:18.234229 +0000","caller":"frontend/session.go:370","msg":"current txn state 1"}
{"level":"INFO","time":"2022/07/10 09:20:18.234260 +0000","caller":"frontend/mysql_cmd_executor.go:1520","msg":"start autocommit txn in default"}
{"level":"INFO","time":"2022/07/10 09:20:18.234336 +0000","caller":"frontend/session.go:662","msg":"dbName isolation tableNames [test_11]"}
{"level":"INFO","time":"2022/07/10 09:20:18.234408 +0000","caller":"frontend/session.go:662","msg":"dbName isolation tableNames [test_11]"}
{"level":"INFO","time":"2022/07/10 09:20:18.234664 +0000","caller":"frontend/mysql_cmd_executor.go:1631","msg":"time of Exec.Build : 361.397µs"}
{"level":"INFO","time":"2022/07/10 09:20:18.235284 +0000","caller":"frontend/mysql_cmd_executor.go:343","msg":"goid 87 \n"}
==================
WARNING: DATA RACE
Read at 0x00c009b91ba0 by goroutine 121:
  github.com/matrixorigin/matrixone/pkg/frontend.getDataFromPipeline()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:399 +0x93c
  github.com/matrixorigin/matrixone/pkg/sql/colexec/output.Call()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/colexec/output/output.go:34 +0xe4
  github.com/matrixorigin/matrixone/pkg/vm.Run()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/vm.go:53 +0x1c4
  github.com/matrixorigin/matrixone/pkg/vm/pipeline.(*Pipeline).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/pipeline/pipeline.go:133 +0x32d
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:358 +0x9b9
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Compile).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/compile.go:93 +0x20a
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1695 +0x3494
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).ExecRequest()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1900 +0x1364
  github.com/matrixorigin/matrixone/pkg/frontend.(*Routine).Loop()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:106 +0x3c5
  github.com/matrixorigin/matrixone/pkg/sql/plan/function.glob..func142()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/plan/function/builtins.go:2201 +0x51
  github.com/matrixorigin/matrixone/pkg/sql/plan/function.Function.VecFn()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/plan/function/function.go:147 +0x117
  github.com/matrixorigin/matrixone/pkg/sql/colexec.EvalExpr()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/colexec/expr_eval.go:156 +0x2573
  github.com/matrixorigin/matrixone/pkg/sql/plan/rule.(*ConstantFold).constantFold()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/plan/rule/constant_fold.go:87 +0x3be
  github.com/matrixorigin/matrixone/pkg/sql/plan/rule.(*ConstantFold).Apply()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/plan/rule/constant_fold.go:63 +0x505
  github.com/matrixorigin/matrixone/pkg/sql/plan.(*BaseOptimizer).exploreNode()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/plan/optimize.go:76 +0x1fa
  github.com/matrixorigin/matrixone/pkg/sql/plan.(*BaseOptimizer).optimize()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/plan/optimize.go:62 +0xf2
  github.com/matrixorigin/matrixone/pkg/sql/plan.(*BaseOptimizer).Optimize()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/plan/optimize.go:54 +0x104
  github.com/matrixorigin/matrixone/pkg/frontend.buildPlan()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1360 +0x258
  github.com/matrixorigin/matrixone/pkg/frontend.(*TxnComputationWrapper).Compile()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1333 +0xcb
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1625 +0x1e7d
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).ExecRequest()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1900 +0x1364
  github.com/matrixorigin/matrixone/pkg/frontend.(*Routine).Loop()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:106 +0x3c5
  github.com/matrixorigin/matrixone/pkg/frontend.NewRoutine.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:158 +0x39

Previous write at 0x00c009b91ba0 by goroutine 82:
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/moengine.(*txnReader).Read()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/engine/tae/moengine/reader.go:63 +0x4da
  github.com/matrixorigin/matrixone/pkg/vm/pipeline.(*Pipeline).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/pipeline/pipeline.go:69 +0x341
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:311 +0x2a7
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:329 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func5()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:330 +0x47

Goroutine 121 (running) created at:
  github.com/matrixorigin/matrixone/pkg/frontend.NewRoutine()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:158 +0x3d6
  github.com/matrixorigin/matrixone/pkg/frontend.(*RoutineManager).Created()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine_manager.go:41 +0x1f4
  github.com/fagongzi/goetty.(*server).doStart.func1()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:205 +0x1af

Goroutine 82 (running) created at:
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:324 +0x347
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).ParallelRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:608 +0x198d
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).RemoteRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:425 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func3()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:345 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func7()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:346 +0x47
==================
{"level":"INFO","time":"2022/07/10 09:20:18.235703 +0000","caller":"frontend/mysql_cmd_executor.go:681","msg":"rowCount 2 \ntime of getDataFromPipeline : 312.397µs \nprocessBatchTime 308.997µs \nrow2colTime 0s \nallocateOutBufferTime 700ns \noutputQueue.flushTime 0s \nprocessBatchTime - row2colTime - allocateOutbufferTime - flushTime 308.297µs \nrestTime(=tTime - row2colTime - allocateOutBufferTime) 311.697µs \nprotoStats flushCount 0 writeCount 1 \nwriteBytes 0 0 MB\n\n"}
{"level":"INFO","time":"2022/07/10 09:20:18.235827 +0000","caller":"frontend/mysql_cmd_executor.go:343","msg":"goid 87 \n"}
{"level":"INFO","time":"2022/07/10 09:20:18.235929 +0000","caller":"frontend/mysql_cmd_executor.go:681","msg":"rowCount 2 \ntime of getDataFromPipeline : 19.099µs \nprocessBatchTime 16.399µs \nrow2colTime 0s \nallocateOutBufferTime 700ns \noutputQueue.flushTime 0s \nprocessBatchTime - row2colTime - allocateOutbufferTime - flushTime 15.699µs \nrestTime(=tTime - row2colTime - allocateOutBufferTime) 18.399µs \nprotoStats flushCount 0 writeCount 1 \nwriteBytes 0 0 MB\n\n"}
{"level":"INFO","time":"2022/07/10 09:20:18.236132 +0000","caller":"frontend/mysql_cmd_executor.go:1722","msg":"time of Exec.Run : 1.318587ms"}
{"level":"INFO","time":"2022/07/10 09:20:18.236228 +0000","caller":"frontend/session.go:522","msg":"commit autocommit only"}
{"level":"INFO","time":"2022/07/10 09:20:18.236277 +0000","caller":"frontend/session.go:586","msg":"clean tae txn"}
{"level":"INFO","time":"2022/07/10 09:20:18.799258 +0000","caller":"frontend/routine.go:117","msg":"connection id 1001 , the time of handling the request 2.312379ms"}
{"level":"INFO","time":"2022/07/10 09:20:18.799341 +0000","caller":"frontend/mysql_cmd_executor.go:1861","msg":"cmd 3"}
{"level":"INFO","time":"2022/07/10 09:20:18.799400 +0000","caller":"frontend/mysql_cmd_executor.go:1876","msg":"query:SET autocommit=1"}
{"level":"INFO","time":"2022/07/10 09:20:18.799701 +0000","caller":"frontend/session.go:444","msg":"start txn autocommit if needed"}
{"level":"INFO","time":"2022/07/10 09:20:18.799756 +0000","caller":"frontend/session.go:370","msg":"current txn state 1"}
{"level":"INFO","time":"2022/07/10 09:20:18.799788 +0000","caller":"frontend/mysql_cmd_executor.go:1520","msg":"start autocommit txn in default"}
{"level":"INFO","time":"2022/07/10 09:20:18.799971 +0000","caller":"frontend/session.go:522","msg":"commit autocommit only"}
{"level":"INFO","time":"2022/07/10 09:20:18.800038 +0000","caller":"frontend/session.go:586","msg":"clean tae txn"}
==================
WARNING: DATA RACE
Write at 0x00c022bec948 by goroutine 188:
  github.com/matrixorigin/matrixone/pkg/frontend.(*RoutineManager).Handler()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine_manager.go:104 +0x192
  github.com/matrixorigin/matrixone/pkg/frontend.(*RoutineManager).Handler-fm()
      <autogenerated>:1 +0x77
  github.com/fagongzi/goetty.(*server).doConnection()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:234 +0x435
  github.com/fagongzi/goetty.(*server).doStart.func1()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:207 +0x1c9

Previous write at 0x00c022bec948 by goroutine 115:
{"level":"INFO","time":"2022/07/10 09:20:18.800086 +0000","caller":"frontend/routine.go:117","msg":"connection id 1003 , the time of handling the request 742.293µs"}
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlProtocolImpl).writePackets()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_protocol.go:1685 +0x304
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlProtocolImpl).sendOKPacket()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_protocol.go:1053 +0x8b
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlProtocolImpl).SendResponse()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/protocol.go:241 +0x447
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).handleSetVar()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1015 +0x447
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1574 +0x15b1
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).ExecRequest()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1900 +0x1364
  github.com/matrixorigin/matrixone/pkg/frontend.(*Routine).Loop()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:106 +0x3c5
  github.com/matrixorigin/matrixone/pkg/frontend.NewRoutine.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:158 +0x39

Goroutine 188 (running) created at:
  github.com/fagongzi/goetty.(*server).doStart()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:185 +0x27c
  github.com/fagongzi/goetty.(*server).Start.func2()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:95 +0x39

Goroutine 115 (running) created at:
  github.com/matrixorigin/matrixone/pkg/frontend.NewRoutine()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:158 +0x3d6
  github.com/matrixorigin/matrixone/pkg/frontend.(*RoutineManager).Created()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine_manager.go:41 +0x1f4
  github.com/fagongzi/goetty.(*server).doStart.func1()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:205 +0x1af
==================
{"level":"INFO","time":"2022/07/10 09:20:18.800206 +0000","caller":"frontend/mysql_cmd_executor.go:1861","msg":"cmd 3"}
{"level":"INFO","time":"2022/07/10 09:20:18.800255 +0000","caller":"frontend/mysql_cmd_executor.go:1876","msg":"query:commit;\n"}
{"level":"INFO","time":"2022/07/10 09:20:18.800483 +0000","caller":"frontend/session.go:505","msg":"commit began"}
{"level":"INFO","time":"2022/07/10 09:20:18.800535 +0000","caller":"frontend/session.go:83","msg":"switch from 1 to 3"}
{"level":"INFO","time":"2022/07/10 09:20:18.800610 +0000","caller":"frontend/session.go:586","msg":"clean tae txn"}
{"level":"INFO","time":"2022/07/10 09:20:18.853229 +0000","caller":"frontend/routine.go:117","msg":"connection id 1003 , the time of handling the request 828.592µs"}
{"level":"INFO","time":"2022/07/10 09:20:18.853314 +0000","caller":"frontend/mysql_cmd_executor.go:1861","msg":"cmd 3"}
{"level":"INFO","time":"2022/07/10 09:20:18.853364 +0000","caller":"frontend/mysql_cmd_executor.go:1876","msg":"query:select * from test_11;\n"}
{"level":"INFO","time":"2022/07/10 09:20:18.853595 +0000","caller":"frontend/session.go:444","msg":"start txn autocommit if needed"}
{"level":"INFO","time":"2022/07/10 09:20:18.853638 +0000","caller":"frontend/session.go:370","msg":"current txn state 1"}
{"level":"INFO","time":"2022/07/10 09:20:18.853674 +0000","caller":"frontend/mysql_cmd_executor.go:1520","msg":"start autocommit txn in default"}
{"level":"INFO","time":"2022/07/10 09:20:18.853757 +0000","caller":"frontend/session.go:662","msg":"dbName isolation_1 tableNames [test_11]"}
{"level":"INFO","time":"2022/07/10 09:20:18.853833 +0000","caller":"frontend/session.go:662","msg":"dbName isolation_1 tableNames [test_11]"}
{"level":"INFO","time":"2022/07/10 09:20:18.854076 +0000","caller":"frontend/mysql_cmd_executor.go:1631","msg":"time of Exec.Build : 359.297µs"}
{"level":"INFO","time":"2022/07/10 09:20:18.854727 +0000","caller":"frontend/mysql_cmd_executor.go:343","msg":"goid 12515 \n"}
==================
WARNING: DATA RACE
Read at 0x00c027b67370 by goroutine 115:
  github.com/matrixorigin/matrixone/pkg/frontend.getDataFromPipeline()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:399 +0x93c
  github.com/matrixorigin/matrixone/pkg/sql/colexec/output.Call()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/colexec/output/output.go:34 +0xe4
  github.com/matrixorigin/matrixone/pkg/vm.Run()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/vm.go:53 +0x1c4
  github.com/matrixorigin/matrixone/pkg/vm/pipeline.(*Pipeline).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/pipeline/pipeline.go:133 +0x32d
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:358 +0x9b9
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Compile).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/compile.go:93 +0x20a
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).doComQuery()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1695 +0x3494
  github.com/matrixorigin/matrixone/pkg/frontend.(*MysqlCmdExecutor).ExecRequest()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/mysql_cmd_executor.go:1900 +0x1364
  github.com/matrixorigin/matrixone/pkg/frontend.(*Routine).Loop()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:106 +0x3c5
  github.com/matrixorigin/matrixone/pkg/frontend.NewRoutine.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:158 +0x39

Previous write at 0x00c027b67370 by goroutine 102:
  github.com/matrixorigin/matrixone/pkg/vm/engine/tae/moengine.(*txnReader).Read()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/engine/tae/moengine/reader.go:63 +0x4da
  github.com/matrixorigin/matrixone/pkg/vm/pipeline.(*Pipeline).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/vm/pipeline/pipeline.go:69 +0x341
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).Run()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:311 +0x2a7
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func1()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:329 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func5()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:330 +0x47

Goroutine 115 (running) created at:
  github.com/matrixorigin/matrixone/pkg/frontend.NewRoutine()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine.go:158 +0x3d6
  github.com/matrixorigin/matrixone/pkg/frontend.(*RoutineManager).Created()
      /home/runner/work/matrixone/matrixone/head/pkg/frontend/routine_manager.go:41 +0x1f4
  github.com/fagongzi/goetty.(*server).doStart.func1()
      /home/runner/go/pkg/mod/github.com/fagongzi/goetty@v1.13.0/application.go:205 +0x1af

Goroutine 102 (running) created at:
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:324 +0x347
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).ParallelRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:608 +0x198d
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).RemoteRun()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:425 +0x44
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func3()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:345 +0xcb
  github.com/matrixorigin/matrixone/pkg/sql/compile.(*Scope).MergeRun.func7()
      /home/runner/work/matrixone/matrixone/head/pkg/sql/compile/scope.go:346 +0x47
==================
{"level":"INFO","time":"2022/07/10 09:20:18.855058 +0000","caller":"frontend/mysql_cmd_executor.go:681","msg":"rowCount 2 \ntime of getDataFromPipeline : 231.598µs \nprocessBatchTime 228.698µs \nrow2colTime 0s \nallocateOutBufferTime 700ns \noutputQueue.flushTime 0s \nprocessBatchTime - row2colTime - allocateOutbufferTime - flushTime 227.998µs \nrestTime(=tTime - row2colTime - allocateOutBufferTime) 230.898µs \nprotoStats flushCount 0 writeCount 1 \nwriteBytes 0 0 MB\n\n"}
{"level":"INFO","time":"2022/07/10 09:20:18.855185 +0000","caller":"frontend/mysql_cmd_executor.go:343","msg":"goid 12515 \n"}
{"level":"INFO","time":"2022/07/10 09:20:18.855294 +0000","caller":"frontend/mysql_cmd_executor.go:681","msg":"rowCount 2 \ntime of getDataFromPipeline : 17.9µs \nprocessBatchTime 15.4µs \nrow2colTime 0s \nallocateOutBufferTime 700ns \noutputQueue.flushTime 0s \nprocessBatchTime - row2colTime - allocateOutbufferTime - flushTime 14.7µs \nrestTime(=tTime - row2colTime - allocateOutBufferTime) 17.2µs \nprotoStats flushCount 0 writeCount 1 \nwriteBytes 0 0 MB\n\n"}
{"level":"INFO","time":"2022/07/10 09:20:18.855463 +0000","caller":"frontend/mysql_cmd_executor.go:1722","msg":"time of Exec.Run : 1.245488ms"}
{"level":"INFO","time":"2022/07/10 09:20:18.855560 +0000","caller":"frontend/session.go:522","msg":"commit autocommit only"}
{"level":"INFO","time":"2022/07/10 09:20:18.855631 +0000","caller":"frontend/session.go:586","msg":"clean tae txn"}

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

sukki37 commented 2 years ago

@nnsgmsone could you pls see if #3878 fix the data race problems in a reasonable way. thx

nnsgmsone commented 2 years ago

@nnsgmsone could you pls see if #3878 fix the data race problems in a reasonable way. thx

Why not use atomic variables for this. @jianwan0214 @daviszhen

iamlinjunhong commented 2 years ago

Because parser is now a lexical analyzer corresponding to multiple dialects, there is a thread safety problem hard to solve gracefully when parsing different dialects concurrently. But mo just use dialect of mysql currently, it is thread safety.

sukki37 commented 2 years ago

fixed 72a968f