Help needed: test-qht-par hangs on Travis
I've noticed QEMU Travis builds are failing recently, and they seem to happen only on the --enable-gprof jobs. I have enabled V=1 and noticed that the jobs are hanging inside test-qht-par.
Example here (look for "/qht/parallel/2threads-0%updates-1s"):
https://travis-ci.org/ehabkost/qemu-hacks/jobs/465081311
Does anybody have any idea why?
Signature · 1 line
Eduardo
Quoted 9 lines · Eduardo Habkost
I've noticed QEMU Travis builds are failing recently, and they seem to happen only on the --enable-gprof jobs. I have enabled V=1 and noticed that the jobs are hanging inside test-qht-par.
Example here (look for "/qht/parallel/2threads-0%updates-1s"):
https://travis-ci.org/ehabkost/qemu-hacks/jobs/465081311
Does anybody have any idea why?
So if I read that output correctly, it seems that the second test in qht-par never completes.
Enabling gprof and gcov (as in that build) should just lower the throughput of the benchmark (test-qht-par invokes qht-bench), but the duration should be the same (1 second per test, so no need to wait for 10 minutes).
Can you try re-running the test, after applying the appended patch? (It disables the "resize" thread.)
Also, does it reliably hang on Travis, or are these hangs intermittent?
Thanks,
Emilio
---
tests/test-qht-par.c +1 -1
@@ -6,7 +6,7 @@*/ #include "qemu/osdep.h" -#define TEST_QHT_STRING "tests/qht-bench 1>/dev/null 2>&1 -R -S0.1 -D10000 -N1 " +#define TEST_QHT_STRING "tests/qht-bench 1>/dev/null 2>&1 -R "static void test_qht (int n_threads,int update_rate,int duration) {
Quoted 14 lines · Emilio G. Cota
Quoted 9 lines · Eduardo Habkost
I've noticed QEMU Travis builds are failing recently, and they seem to happen only on the --enable-gprof jobs. I have enabled V=1 and noticed that the jobs are hanging inside test-qht-par.
Example here (look for "/qht/parallel/2threads-0%updates-1s"):
https://travis-ci.org/ehabkost/qemu-hacks/jobs/465081311
Does anybody have any idea why?
So if I read that output correctly, it seems that the second test in qht-par never completes.
Quoted 7 lines
Enabling gprof and gcov (as in that build) should just lower the throughput of the benchmark (test-qht-par invokes qht-bench), but the duration should be the same (1 second per test, so no need to wait for 10 minutes).
Can you try re-running the test, after applying the appended patch? (It disables the "resize" thread.)
It is running right now, here:
https://travis-ci.org/ehabkost/qemu-hacks/jobs/466074591
Quoted 3 lines
Also, does it reliably hang on Travis, or are these hangs intermittent?
It can be reproduced reliably. qemu.git builds are failing since Thursday:
https://travis-ci.org/qemu/qemu/builds
Quoted 19 lines
Thanks,
Emilio
---tests/test-qht-par.c +1
-1@@ -6,7 +6,7 @@*/ #include "qemu/osdep.h" -#define TEST_QHT_STRING "tests/qht-bench 1>/dev/null 2>&1 -R -S0.1 -D10000 -N1 " +#define TEST_QHT_STRING "tests/qht-bench 1>/dev/null 2>&1 -R "static void test_qht (int n_threads,int update_rate,int duration) {
Signature · 1 line
Eduardo
Quoted 8 lines · Eduardo Habkost
Quoted 2 lines · Emilio G. Cota
Can you try re-running the test, after applying the appended patch? (It disables the "resize" thread.)
It is running right now, here:
https://travis-ci.org/ehabkost/qemu-hacks/jobs/466074591Quoted 1 line
Quoted 6 lines
Quoted 2 lines
Also, does it reliably hang on Travis, or are these hangs intermittent?
It can be reproduced reliably. qemu.git builds are failing since Thursday:
https://travis-ci.org/qemu/qemu/builds
I see the build you launched timed out. Can you try the following patch (after discarding the previous one)? Let's see if just by disabling the second test we can get the build to move ahead.
Thanks,
E.
---
tests/test-qht-par.c +0 -1
@@ -46,7 +46,6 @@ int main(int argc, char *argv[])if (g_test_quick ()) {g_test_add_func ("/qht/parallel/2threads-0%updates-1s" , test_2th0u1s); -g_test_add_func ("/qht/parallel/2threads-20%updates-1s" , test_2th20u1s); }else {g_test_add_func ("/qht/parallel/2threads-0%updates-5s" , test_2th0u5s);g_test_add_func ("/qht/parallel/2threads-20%updates-5s" , test_2th20u5s);
Quoted 12 lines · Emilio G. Cota
Quoted 11 lines · Eduardo Habkost
Quoted 2 lines · Emilio G. Cota
Can you try re-running the test, after applying the appended patch? (It disables the "resize" thread.)
It is running right now, here:
https://travis-ci.org/ehabkost/qemu-hacks/jobs/466074591Quoted 3 lines
Also, does it reliably hang on Travis, or are these hangs intermittent?
Quoted 7 lines
Quoted 3 lines
It can be reproduced reliably. qemu.git builds are failing since Thursday:
https://travis-ci.org/qemu/qemu/buildsI see the build you launched timed out. Can you try the following patch (after discarding the previous one)? Let's see if just by disabling the second test we can get the build to move ahead.
I will try it. I'm not sure yet if it's the first or the second test case timing out. Maybe the "OK\n" we see in the log file is from another process running in parallel.
Quoted 17 lines
Thanks,
E.---
tests/test-qht-par.c +0
-1@@ -46,7 +46,6 @@ int main(int argc, char *argv[])if (g_test_quick ()) {g_test_add_func ("/qht/parallel/2threads-0%updates-1s" , test_2th0u1s); -g_test_add_func ("/qht/parallel/2threads-20%updates-1s" , test_2th20u1s); }else {g_test_add_func ("/qht/parallel/2threads-0%updates-5s" , test_2th0u5s);g_test_add_func ("/qht/parallel/2threads-20%updates-5s" , test_2th20u5s);
Signature · 1 line
Eduardo
Quoted 9 lines · Emilio G. Cota
Quoted 8 lines · Eduardo Habkost
I've noticed QEMU Travis builds are failing recently, and they seem to happen only on the --enable-gprof jobs. I have enabled V=1 and noticed that the jobs are hanging inside test-qht-par.
Example here (look for "/qht/parallel/2threads-0%updates-1s"):
Quoted 7 lines
Quoted 1 line
Does anybody have any idea why?
So if I read that output correctly, it seems that the second test in qht-par never completes.
Enabling gprof and gcov (as in that build) should just lower the throughput of the benchmark (test-qht-par invokes qht-bench),
[...]
Unrelated question: is there a specific reason why test-qht-par is written in C using gtest, instead of being just a shell script that runs qht-bench?
Signature · 1 line
Eduardo
Quoted 17 lines · Eduardo Habkost
Quoted 16 lines · Emilio G. Cota
Quoted 14 lines · Eduardo Habkost
Quoted 2 lines · Emilio G. Cota
Can you try re-running the test, after applying the appended patch? (It disables the "resize" thread.)
It is running right now, here:
https://travis-ci.org/ehabkost/qemu-hacks/jobs/466074591Quoted 3 lines
Also, does it reliably hang on Travis, or are these hangs intermittent?
It can be reproduced reliably. qemu.git builds are failing since Thursday:
https://travis-ci.org/qemu/qemu/builds
Quoted 7 lines
Quoted 3 lines
I see the build you launched timed out. Can you try the following patch (after discarding the previous one)? Let's see if just by disabling the second test we can get the build to move ahead.
I will try it. I'm not sure yet if it's the first or the second test case timing out. Maybe the "OK\n" we see in the log file is from another process running in parallel.
Yeah, I think the first test case is the one hanging:
https://travis-ci.org/ehabkost/qemu-hacks/jobs/466074591#L7741
Quoted 22 lines
Quoted 19 lines
Thanks,
E.---
tests/test-qht-par.c +0
-1@@ -46,7 +46,6 @@ int main(int argc, char *argv[])if (g_test_quick ()) {g_test_add_func ("/qht/parallel/2threads-0%updates-1s" , test_2th0u1s); -g_test_add_func ("/qht/parallel/2threads-20%updates-1s" , test_2th20u1s); }else {g_test_add_func ("/qht/parallel/2threads-0%updates-5s" , test_2th0u5s);g_test_add_func ("/qht/parallel/2threads-20%updates-5s" , test_2th20u5s);Signature · 1 line
Eduardo
Signature · 1 line
Eduardo
Quoted 15 lines · Eduardo Habkost
Quoted 14 lines · Emilio G. Cota
Quoted 9 lines · Eduardo Habkost
I've noticed QEMU Travis builds are failing recently, and they seem to happen only on the --enable-gprof jobs. I have enabled V=1 and noticed that the jobs are hanging inside test-qht-par.
Example here (look for "/qht/parallel/2threads-0%updates-1s"):
https://travis-ci.org/ehabkost/qemu-hacks/jobs/465081311
Does anybody have any idea why?
So if I read that output correctly, it seems that the second test in qht-par never completes.
Quoted 7 lines
Quoted 2 lines
Enabling gprof and gcov (as in that build) should just lower the throughput of the benchmark (test-qht-par invokes qht-bench),
[...]
Unrelated question: is there a specific reason why test-qht-par is written in C using gtest, instead of being just a shell script that runs qht-bench?
I didn't know how to integrate a shell script with gtester, so I went with a C program.
There's a possibility that the use of system(3) here is what's causing the problem. Can you try running the following branch on travis?
https://github.com/cota/qemu/tree/test-qht-par
I moved most of qht-bench into qht-bench.inc.c, so that both qht-bench.c and test-qht-par.c can use it. This gets rid of the use of system(3) in test-qht-par.c.
Thanks,
Emilio
Quoted 22 lines · Eduardo Habkost
Quoted 21 lines · Eduardo Habkost
Quoted 19 lines · Emilio G. Cota
Quoted 8 lines · Eduardo Habkost
Quoted 2 lines · Emilio G. Cota
Can you try re-running the test, after applying the appended patch? (It disables the "resize" thread.)
It is running right now, here:
https://travis-ci.org/ehabkost/qemu-hacks/jobs/466074591Quoted 1 line
Quoted 6 lines
Quoted 2 lines
Also, does it reliably hang on Travis, or are these hangs intermittent?
It can be reproduced reliably. qemu.git builds are failing since Thursday:
https://travis-ci.org/qemu/qemu/buildsI see the build you launched timed out. Can you try the following patch (after discarding the previous one)? Let's see if just by disabling the second test we can get the build to move ahead.
Quoted 7 lines
Quoted 3 lines
I will try it. I'm not sure yet if it's the first or the second test case timing out. Maybe the "OK\n" we see in the log file is from another process running in parallel.
Yeah, I think the first test case is the one hanging:
https://travis-ci.org/ehabkost/qemu-hacks/jobs/466074591#L7741
Finally found out what's happening:
https://travis-ci.org/ehabkost/qemu-hacks/builds/478025908
sleep(1) is being interrupted before 1 second has elapsed, and never exits the loop:
do {
remaining = sleep(duration);
} while (remaining);Signature · 1 line
Eduardo
Quoted 33 lines · Eduardo Habkost
Quoted 22 lines · Eduardo Habkost
Quoted 21 lines · Eduardo Habkost
Quoted 19 lines · Emilio G. Cota
Quoted 8 lines · Eduardo Habkost
Quoted 2 lines · Emilio G. Cota
Can you try re-running the test, after applying the appended patch? (It disables the "resize" thread.)
It is running right now, here:
https://travis-ci.org/ehabkost/qemu-hacks/jobs/466074591Quoted 1 line
Quoted 6 lines
Quoted 2 lines
Also, does it reliably hang on Travis, or are these hangs intermittent?
It can be reproduced reliably. qemu.git builds are failing since Thursday:
https://travis-ci.org/qemu/qemu/buildsI see the build you launched timed out. Can you try the following patch (after discarding the previous one)? Let's see if just by disabling the second test we can get the build to move ahead.
Quoted 7 lines
Quoted 3 lines
I will try it. I'm not sure yet if it's the first or the second test case timing out. Maybe the "OK\n" we see in the log file is from another process running in parallel.
Yeah, I think the first test case is the one hanging:
https://travis-ci.org/ehabkost/qemu-hacks/jobs/466074591#L7741
Finally found out what's happening:
Quoted 9 lines
https://travis-ci.org/ehabkost/qemu-hacks/builds/478025908
sleep(1) is being interrupted before 1 second has elapsed, and never exits the loop:
do { remaining = sleep(duration); } while (remaining);
Great, then the solution is simply to switch to g_usleep!
Paolo