Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: bvt test fails at case matrixone/test/distributed/cases/ddl/comprimary_key.sql with error Exception in thread "main" java.lang.NullPointerException #11881

Closed
1 task done
aronchanisme opened this issue Sep 22, 2023 · 16 comments
Assignees
Labels
kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use team/c2
Milestone

Comments

@aronchanisme
Copy link
Contributor

aronchanisme commented Sep 22, 2023

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): 1.0.0-rc1
- Hardware parameters: 8c 16g and 4c 8g
- OS type: debian 11 and kylin 10
- Others: none

Actual Behavior

When running bvt test on mo in docker mode, this case always fails:

2023-09-21 19:54:06 INFO  Executor:241 - The script file[../matrixone/test/distributed/cases/ddl/alter_table_rename_column.sql] has been executed, and cost: 11.478s, total:261, success:242, failed:0, ignored:19, abnoraml:0
2023-09-21 19:54:06 INFO  Executor:33 - Start to execute the script file[../matrixone/test/distributed/cases/ddl/comprimary_key.sql] now, and it will take a few moment,pleas wait......
2023-09-21 19:54:06 ERROR RSSet:140 - The row count does not equal with each other, one is 4, the other is 0
2023-09-21 19:54:06 ERROR Executor:159 - [../matrixone/test/distributed/cases/ddl/comprimary_key.sql][row:23][select col3,col18 from cpk_table_1;] was executed failed, con[id=0, user=dump, ***
2023-09-21 19:54:06 ERROR Executor:161 - [EXPECT RESULT]:
col3    col18
1    message
3    message
5    OPQR.STU-_+=VWXYZa
3    L/MN?OPQR.STU-_+=VWXYZabcdefghigklmnopqrstuvwxyz012
2023-09-21 19:54:06 ERROR Executor:162 - [ACTUAL RESULT]:
col3    col18
Exception in thread "main" java.lang.NullPointerException
	at io.mo.result.StmtResult.regularMatch(StmtResult.java:114)
	at io.mo.cases.SqlCommand.checkResult(SqlCommand.java:202)
	at io.mo.db.Executor.run(Executor.java:146)
	at io.mo.Tester.run(Tester.java:201)
	at io.mo.Tester.run(Tester.java:210)
	at io.mo.Tester.run(Tester.java:210)
	at io.mo.Tester.main(Tester.java:148)
Error: Process completed with exit code 1.

Expected Behavior

All bvt cases should pass with no errors

Steps to Reproduce

  1. Deploy an mo in docker mode
    https://docs.matrixorigin.cn/0.8.0/MatrixOne/Get-Started/install-on-linux/install-on-linux-method3/

  2. Set mo confs,
    cn.toml

service-type = "CN"
data-dir = "./mo-data"

[log]
level = "info"

[cn]
uuid = "dd1dccb4-4d3c-41f8-b482-5251dc7a41bf"
port-base = 18000


[cn.txn]
mode = "pessimistic"

tn.toml

service-type = "TN"
data-dir = "./mo-data"

[log]
level = "info"

[tn]
uuid = "dd4dccb4-4d3c-41f8-b482-5251dc7a41bf"
port-base = 19000


[tn.txn]
mode = "pessimistic"

Save these 2 conf files to a folder, e.g. /data/mo/20230921_194537/matrixone/etc/
3. Start mo docker container

docker run -d  -v /data/mo/:/mo-data:rw -p 9876:12345 -p 6001:6001 --name mo --memory 6819m --env GOMEMLIMIT=6137MiB --hostname ecs-f749 --privileged=true -v /data/mo/20230921_194537/matrixone/etc/:/etc:rw --entrypoint /mo-service matrixorigin/matrixone:1.0.0-rc1 -launch /etc/quickstart/launch.toml
  1. Download mo source code with bvt test cases
mkdir -p /data/bvt/
cd /data/bvt/
git clone https://ghproxy.com/github.com/matrixorigin/matrixone.git -b 1.0.0-rc1
  1. Download mo-tester tool
mkdir -p /data/bvt/ 
git clone https://ghproxy.com/github.com/matrixorigin/mo-tester.git
  1. Run bvt test cases
cd /data/bvt/mo-tester
./run.sh -n -g -m run -p ../matrixone/test/distributed/cases -e optimistic
/data/bvt_cases/matrixone

Additional information

https://github.com/matrixorigin/mo-nightly-regression/actions/runs/6261178786/job/17000800347

@aronchanisme aronchanisme added kind/bug Something isn't working needs-triage severity/s0 Extreme impact: Cause the application to break down and seriously affect the use labels Sep 22, 2023
@aronchanisme aronchanisme added this to the 1.0.0 milestone Sep 22, 2023
@jensenojs
Copy link
Contributor

类似的问题, 这个报错来看mo和mo-tester都有点问题, 合理的预期是这个case失败了mo-tester能继续往下跑
matrixorigin/mo-tester#143

@sukki37 sukki37 assigned ouyuanning and unassigned matrix-meow Sep 23, 2023
@ouyuanning
Copy link
Contributor

还没时间看

@sukki37 sukki37 modified the milestones: 1.0.0, 1.1.0 Oct 7, 2023
@ouyuanning
Copy link
Contributor

还没时间看

2 similar comments
@ouyuanning
Copy link
Contributor

还没时间看

@ouyuanning
Copy link
Contributor

还没时间看

@LiSong0214
Copy link

在原环境上复现。

@ouyuanning
Copy link
Contributor

还没时间看

@ouyuanning
Copy link
Contributor

not working on it

1 similar comment
@ouyuanning
Copy link
Contributor

not working on it

@ouyuanning
Copy link
Contributor

not working on it

3 similar comments
@ouyuanning
Copy link
Contributor

not working on it

@ouyuanning
Copy link
Contributor

not working on it

@ouyuanning
Copy link
Contributor

not working on it

@ouyuanning ouyuanning assigned aressu1985 and unassigned ouyuanning Nov 13, 2023
@ouyuanning
Copy link
Contributor

1、在测试过程中有碰到这个问题。

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.length()" because "replacement" is null
        at java.base/java.util.regex.Matcher.appendExpandedReplacement(Matcher.java:1014)
        at java.base/java.util.regex.Matcher.appendReplacement(Matcher.java:997)
        at java.base/java.util.regex.Matcher.replaceAll(Matcher.java:1181)
        at java.base/java.lang.String.replaceAll(String.java:2939)
        at io.mo.db.Executor.run(Executor.java:126)
        at io.mo.Tester.run(Tester.java:206)
        at io.mo.Tester.run(Tester.java:215)
        at io.mo.Tester.run(Tester.java:215)
        at io.mo.Tester.run(Tester.java:215)
        at io.mo.Tester.main(Tester.java:153)

这个经确认,是要在启动项中增加  -s 来指定  resource_path

2、另外

Exception in thread "main" java.lang.NullPointerException
	at io.mo.result.StmtResult.regularMatch(StmtResult.java:114)
	at io.mo.cases.SqlCommand.checkResult(SqlCommand.java:202)
	at io.mo.db.Executor.run(Executor.java:146)
	at io.mo.Tester.run(Tester.java:201)
	at io.mo.Tester.run(Tester.java:210)
	at io.mo.Tester.run(Tester.java:210)
	at io.mo.Tester.main(Tester.java:148)

这个部分与matrixorigin/mo-tester#143
这个重复了。先转苏动帮忙看看吧

@aronchanisme
Copy link
Contributor Author

Seems to be raised by mo-tester itself and not an MO issue.

cd mo-tester

./run.sh -n -g -m run -p /data/mo/20231116_110729/test -e optimistic # not ok

./run.sh -n -g -m run -p /data/mo/20231116_110729/test/distributed/cases -e optimistic # ok
image

@aronchanisme aronchanisme modified the milestones: 1.1.0, Backlog Nov 16, 2023
@aronchanisme aronchanisme modified the milestones: Backlog, 1.1.0 Nov 16, 2023
@aronchanisme
Copy link
Contributor Author

Seems to be raised by mo-tester itself and not an MO issue.

cd mo-tester

./run.sh -n -g -m run -p /data/mo/20231116_110729/test -e optimistic # not ok

./run.sh -n -g -m run -p /data/mo/20231116_110729/test/distributed/cases -e optimistic # ok
image

work around as stated here, closing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working severity/s0 Extreme impact: Cause the application to break down and seriously affect the use team/c2
Projects
None yet
Development

No branches or pull requests

7 participants