diff --git a/.github/actions/environment/action.yml b/.github/actions/environment/action.yml index 59d9ac9b89b1726df2aa96a7394f5e2190c28c69..4c978489a23bcdda9a7ed53d531c03b46455cec0 100644 --- a/.github/actions/environment/action.yml +++ b/.github/actions/environment/action.yml @@ -8,4 +8,35 @@ runs: echo TEST_TIMEOUT=310 | tee -a $GITHUB_ENV echo NO_OUTPUT_TIMEOUT=320 | tee -a $GITHUB_ENV echo PRESERVE_ENVVARS=REPLICATION_SYNC_TIMEOUT,TEST_TIMEOUT,NO_OUTPUT_TIMEOUT | tee -a $GITHUB_ENV + # This switching off swap command will not work as github step + # run from inside github 'container' tag. Also it will fail to + # run from it. So running it only outside of docker container. + # Also on local hosts, like that we use for 'freebsd' workflow + # testing, 'sudo' not acceptable outside of 'freebsd' virtual + # machine and to avoid of hangs let's check sudo run ability + # with command like 'timeout 2 sudo ls /sbin/swapoff'. + # NOTE: To switch off swap from inside github 'container' tag + # additional memory flags should be added to its 'options' tag: + # options: '--memory=<some value, like 7G> --memory-swap=<the same value as for memory option>' + if which free ; then + echo "Check initial swap memory values:" + free + fi + if timeout 2 sudo ls /sbin/swapoff ; then + echo "Verified that 'sudo' enabled, switching off swap ..." + sudo /sbin/swapoff -a || echo "'swapoff' command failed, but failure is acceptable from inside the container" + if [ -e /proc/meminfo ] ; then + if [ "$(grep SwapTotal: /proc/meminfo | awk '{ print $2; }')" = "0" ] ; then + echo "Swap disabled" + else + echo "WARNING: swap still exists on the host, limits in container options can resolve it" + fi + else + echo "File '/proc/meminfo' not exists - couldn't check the swap size" + fi + if which free ; then + echo "Check updated swap memory values if 'swapoff' succeded:" + free + fi + fi shell: bash diff --git a/.github/workflows/debug_coverage.yml b/.github/workflows/debug_coverage.yml index 8584633f44a191cddfc150a163bebd1ff733dfca..b42afe58d955655165daffc562e0b354b6816237 100644 --- a/.github/workflows/debug_coverage.yml +++ b/.github/workflows/debug_coverage.yml @@ -29,7 +29,9 @@ jobs: # Our testing expects that the init process (PID 1) will # reap orphan processes. At least the following test leans # on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua. - options: '--init' + # Memory size hard coding will be removed within resolving issue + # http://github.com/tarantool/tarantool-qa/issues/101 + options: '--init --memory=7G --memory-swap=7G' steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db168521ddde45131009b264372bc8ebd9443020..c20ccf6afec0cc0b7cb2f6fb469dc6abd3c496fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,9 @@ jobs: # Our testing expects that the init process (PID 1) will # reap orphan processes. At least the following test leans # on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua. - options: '--init' + # Memory size hard coding will be removed within resolving issue + # http://github.com/tarantool/tarantool-qa/issues/101 + options: '--init --memory=7G --memory-swap=7G' steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/release_asan_clang11.yml b/.github/workflows/release_asan_clang11.yml index 59ec3b7642f9b9a0871a8008203efdd64d46da9a..e540fcdf9f6f71c1ffbfc50ba8b4107c0fe5559d 100644 --- a/.github/workflows/release_asan_clang11.yml +++ b/.github/workflows/release_asan_clang11.yml @@ -29,7 +29,9 @@ jobs: # Our testing expects that the init process (PID 1) will # reap orphan processes. At least the following test leans # on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua. - options: '--init' + # Memory size hard coding will be removed within resolving issue + # http://github.com/tarantool/tarantool-qa/issues/101 + options: '--init --memory=7G --memory-swap=7G' steps: - uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/release_clang.yml b/.github/workflows/release_clang.yml index 53ef9d7c1678c045050b2f251b93d2a4a08f9e25..6d948321e81b29c61ac7ffa21e37c7e3f86b18c9 100644 --- a/.github/workflows/release_clang.yml +++ b/.github/workflows/release_clang.yml @@ -29,7 +29,9 @@ jobs: # Our testing expects that the init process (PID 1) will # reap orphan processes. At least the following test leans # on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua. - options: '--init' + # Memory size hard coding will be removed within resolving issue + # http://github.com/tarantool/tarantool-qa/issues/101 + options: '--init --memory=7G --memory-swap=7G' steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/release_lto.yml b/.github/workflows/release_lto.yml index a6841f4501e8d12687c63f25388b1596ba5f31de..7f7c36687e099a1bb5f96f7fd36827dbfbb7a8eb 100644 --- a/.github/workflows/release_lto.yml +++ b/.github/workflows/release_lto.yml @@ -29,7 +29,9 @@ jobs: # Our testing expects that the init process (PID 1) will # reap orphan processes. At least the following test leans # on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua. - options: '--init' + # Memory size hard coding will be removed within resolving issue + # http://github.com/tarantool/tarantool-qa/issues/101 + options: '--init --memory=7G --memory-swap=7G' steps: - uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/release_lto_clang11.yml b/.github/workflows/release_lto_clang11.yml index 8b06fe82f6dfc2847db63b2b3e30ae2cbfb09161..48cf19c607b37751711033d407f7492d215dac83 100644 --- a/.github/workflows/release_lto_clang11.yml +++ b/.github/workflows/release_lto_clang11.yml @@ -29,7 +29,9 @@ jobs: # Our testing expects that the init process (PID 1) will # reap orphan processes. At least the following test leans # on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua. - options: '--init' + # Memory size hard coding will be removed within resolving issue + # http://github.com/tarantool/tarantool-qa/issues/101 + options: '--init --memory=7G --memory-swap=7G' steps: - uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/static_build.yml b/.github/workflows/static_build.yml index e096e5e4069a8a78a37ed4287dc7516648387d23..a7ab4fc86eafb59ad5983c1f01e2c2b7dba0bf07 100644 --- a/.github/workflows/static_build.yml +++ b/.github/workflows/static_build.yml @@ -29,7 +29,9 @@ jobs: # Our testing expects that the init process (PID 1) will # reap orphan processes. At least the following test leans # on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua. - options: '--init' + # Memory size hard coding will be removed within resolving issue + # http://github.com/tarantool/tarantool-qa/issues/101 + options: '--init --memory=7G --memory-swap=7G' steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/static_build_cmake_linux.yml b/.github/workflows/static_build_cmake_linux.yml index 891908f24d69db12cbf0deec7079fc81702aa731..d7becd172be076e1590febcd75dfc420874c9715 100644 --- a/.github/workflows/static_build_cmake_linux.yml +++ b/.github/workflows/static_build_cmake_linux.yml @@ -29,7 +29,9 @@ jobs: # Our testing expects that the init process (PID 1) will # reap orphan processes. At least the following test leans # on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua. - options: '--init' + # Memory size hard coding will be removed within resolving issue + # http://github.com/tarantool/tarantool-qa/issues/101 + options: '--init --memory=7G --memory-swap=7G' steps: - uses: actions/checkout@v1 diff --git a/.travis.mk b/.travis.mk index 3017cb09ec56a57bbe14dc01ec1752b5748b921c..d5de142073990e2d15ac8e240f09c2f942ec09bb 100644 --- a/.travis.mk +++ b/.travis.mk @@ -325,6 +325,9 @@ deps_osx_github_actions: pip3 install --force-reinstall -r test-run/requirements.txt build_osx: + # due swap disabling should be manualy configured need to + # control it's status + sysctl vm.swapusage cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS} make -j @@ -375,6 +378,9 @@ base_deps_osx_github_actions: # builddir used in this target - is a default build path from cmake # ExternalProject_Add() test_static_build_cmake_osx_no_deps: + # due swap disabling should be manualy configured need to + # control it's status + sysctl vm.swapusage cd static-build && cmake -DCMAKE_TARANTOOL_ARGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo;-DENABLE_WERROR=ON" . && \ make -j && ctest -V # FIXME: Hell with SIP on OSX: Tarantool (and also LuaJIT) @@ -406,6 +412,7 @@ deps_freebsd: python27 py27-yaml py27-six py27-gevent build_freebsd: + if [ "$$(swapctl -l | wc -l)" != "1" ]; then sudo swapoff -a ; fi ; swapctl -l cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS} gmake -j