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
jraft-example benchmark client hang #410
Comments
Whether you have modified the source code? The stack and source code do not match! |
yes, but it doesn't matter. I can revert my changes... I found the reason is "initialServerList" was not added into benchmark_client.yaml, although it's provided in argument list. but still after "initialServerList" was added into yaml conf, the client still hits InterruptedException and exit. Below is the environment based on the master.
|
|
|
yes, I added. see mvn -pl jraft-example exec:java -Dexec.mainClass=com.alipay.sofa.jraft.benchmark.client.BenchmarkClient -Dexec.args="client 127.0.0.1:18091,127.0.0.1:18092,127.0.0.1:18093 jraft-example/config/benchmark_client.yaml 1 50 50 1024" |
It looks slidingWindow error
|
Maybe need to set benchmark thread daemon false |
it makes no difference after setting Daemon(false).
|
I tested it and found no problems server
client
|
do you know how to fix below NoClassDefFoundError error?
|
Are you able to run 3-node test? |
|
This is not directly related to 3 or 1 nodes |
After I pull the code from latest master, the problem is gone! Thanks! |
This still drives me crazy. When I merge master into my branch, it still fails at "NoClassDefFoundError: io/protostuff/runtime/RuntimeSchema". Not sure what's wrong.
|
Maybe you have two or more protobuf jars in your classpath, exclude one please. |
you mean protobuf or protostuff? RuntimeSchema is from jraft-example/target/jraft-bin/lib/protostuff-runtime-1.6.0.jar...
|
Finally I explicitely added protobuf dependency into jraft-example/pom.xml, now it works!
|
Describe the bug
When I run jraft-example test, it hangs at BenchmarkClient.main#rebalance, and the 'startBenchmark' test never starts.
The hang stack is below:
"com.alipay.sofa.jraft.benchmark.BenchmarkBootstrap.main()" #12 prio=5 os_prio=0 tid=0x00007f4110d24000 nid=0x613d waiting on condition [0x00007f40f8d86000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.alipay.sofa.jraft.rhea.client.pd.AbstractPlacementDriverClient.getLeader(AbstractPlacementDriverClient.java:273)
at com.alipay.sofa.jraft.rhea.client.pd.AbstractPlacementDriverClient.getLeader(AbstractPlacementDriverClient.java:237)
at com.alipay.sofa.jraft.benchmark.client.BenchmarkClient.rebalance(BenchmarkClient.java:183)
at com.alipay.sofa.jraft.benchmark.client.BenchmarkClient.main(BenchmarkClient.java:84)
at com.alipay.sofa.jraft.benchmark.BenchmarkBootstrap.main(BenchmarkBootstrap.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
at java.lang.Thread.run(Thread.java:748)
Expected behavior
The client should continue to startBenchmark.
Actual behavior
It blocks at rebalance in main.
Steps to reproduce
Run 3 servers of example on single node, and a client with below maven commands.
mvn -pl jraft-example exec:java -Dexec.mainClass=com.alipay.sofa.jraft.benchmark.server.BenchmarkServer -Dexec.args="server 127.0.0.1:18091,127.0.0.1:18092,127.0.0.1:18093 jraft-example/config/benchmark_server1.yaml"
mvn -pl jraft-example exec:java -Dexec.mainClass=com.alipay.sofa.jraft.benchmark.server.BenchmarkServer -Dexec.args="server 127.0.0.1:18091,127.0.0.1:18092,127.0.0.1:18093 jraft-example/config/benchmark_server2.yaml"
mvn -pl jraft-example exec:java -Dexec.mainClass=com.alipay.sofa.jraft.benchmark.server.BenchmarkServer -Dexec.args="server 127.0.0.1:18091,127.0.0.1:18092,127.0.0.1:18093 jraft-example/config/benchmark_server3.yaml"
mvn -pl jraft-example exec:java -Dexec.mainClass=com.alipay.sofa.jraft.benchmark.client.BenchmarkClient -Dexec.args="client 127.0.0.1:18091,127.0.0.1:18092,127.0.0.1:18093 jraft-example/config/benchmark_client.yaml 1 50 50 1024"
Minimal yet complete reproducer code (or GitHub URL to code)
https://github.com/sofastack/sofa-jraft/blob/f6d2e8053aa0e8e894ef18a988f4ea9812c36f95/jraft-example/src/main/java/com/alipay/sofa/jraft/benchmark/client/BenchmarkClient.java
Environment
java -version
): 1.8.0_231jerry@u19:~/opensources/sofa-jraft$ java -version
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Djava.library.path=/usr/local/lib
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
uname -a
): Linux u19 5.0.0-38-generic Redis protocol compatibility layer based on RheaKV #41-Ubuntu SMP Tue Dec 3 00:27:35 UTC 2019 x86_64 x86_64 x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: