google / gtest-parallel

Run Google Test suites in parallel.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It hangs on ubuntu

weidonglian opened this issue · comments

I am running on Ubuntu 20.04. The main python process seems to hang there waiting for some signals. see my process below, I can see all the 7 tests finished correctly, I can see their log in the log folder. However, see below

0  1000  128529  119191  20   0 614472 13988 futex_ Sl+  pts/1      0:00 python ../ext/gtest-parallel/gtest_parallel.py --output_dir=. ./distr/syb-test
0  1000  128539  128529  20   0      0     0 -      Zl+  pts/1      0:02 [test] <defunct>
0  1000  128540  128529  20   0      0     0 -      Zl+  pts/1      0:03 [test] <defunct>
0  1000  128541  128529  20   0      0     0 -      Zl+  pts/1      0:04 [test] <defunct>
0  1000  128543  128529  20   0      0     0 -      Zl+  pts/1      0:04 [test] <defunct>
0  1000  128544  128529  20   0      0     0 -      Zl+  pts/1      0:00 [test] <defunct>
0  1000  128545  128529  20   0      0     0 -      Zl+  pts/1      0:02 [test] <defunct>
0  1000  128546  128529  20   0      0     0 -      Zl+  pts/1      0:00 [test] <defunct>

128529 is the main process id and those associated processes hang there.

How to debug this?

No idea, my Python debugging skills are really weak. For posterity, does it happen all the time or intermittently?

The repeat is stable. I have a google test executable that contains 50 tests.

  1. If I run them directly without using gtest_parallel, then it works like a charm.
  2. Five of them in one suite will hang if I run in gtest_parallel, even I run them sequentially using gtest_parallel. The other 45 tests just work fine with gtest_parallel. This is ubuntu.
  3. All tests work well with gtest_parallel on MacOsx and Windows.

The only problem is to run five of those 50 tests on Ubuntu with gtest_parallel no matter sequentially or not. I found a workaround by accident. I create a shell script

#!/bin/bash
./distr/syb-test "$@"

instead of calling ./distr/syb-test, I call this bash script. Magically, everything works well like a charm.
I suspect it could be something wrong with Linux process signal (SIGILL, SIGABRT, SIGTERM, etc..) though I do not do anything in my google test.

This is really mysterious.