@@ -965,6 +965,9 @@ jobs:
965965 - name : unittest
966966 if : true && !contains(github.event.inputs.skiptests, 'unittest')
967967 run : ./src/unit/valkey-unit-gtests
968+ # Large-memory tests with sanitizers require 10-14GB RAM due to ASAN/UBSAN overhead.
969+ # GitHub-hosted runners for public repos provide 16GB (ubuntu-latest).
970+ # These tests are borderline - monitoring memory usage to determine if they can run reliably.
968971 test-sanitizer-address-large-memory :
969972 runs-on : ubuntu-latest
970973 if : |
@@ -990,6 +993,8 @@ jobs:
990993 echo "skiptests: ${{github.event.inputs.skiptests}}"
991994 echo "test_args: ${{github.event.inputs.test_args}}"
992995 echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}"
996+ - name : Log runner memory
997+ run : free -h
993998 - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
994999 with :
9951000 repository : ${{ ((github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && (inputs.use_repo || github.event.inputs.use_repo)) || github.repository }}
@@ -1002,15 +1007,34 @@ jobs:
10021007 run : |
10031008 sudo apt-get update
10041009 sudo apt-get install tcl8.6 tclx -y
1010+ - name : Start memory monitor
1011+ run : |
1012+ # Track minimum free memory to detect OOM risk
1013+ (while true; do
1014+ FREE=$(awk '/MemAvailable/ {print $2}' /proc/meminfo)
1015+ echo "$FREE" >> /tmp/memfree.log
1016+ sleep 5
1017+ done) &
1018+ echo $! > /tmp/memmon.pid
10051019 - name : unittest
10061020 if : true && !contains(github.event.inputs.skiptests, 'unittest')
10071021 run : ./src/unit/valkey-unit-gtests --large-memory
10081022 - name : large memory tests
10091023 if : true && !contains(github.event.inputs.skiptests, 'valkey')
1010- run : ./runtest --accurate --verbose --dump-logs --clients 5 --large-memory --tags large-memory ${{github.event.inputs.test_args}}
1024+ run : ./runtest --accurate --verbose --dump-logs --clients 1 --large-memory --tags large-memory ${{github.event.inputs.test_args}}
10111025 - name : large memory module api tests
10121026 if : true && !contains(github.event.inputs.skiptests, 'modules')
1013- run : CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --clients 5 --large-memory --tags large-memory ${{github.event.inputs.test_args}}
1027+ run : CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --clients 1 --large-memory --tags large-memory ${{github.event.inputs.test_args}}
1028+ - name : Memory usage summary
1029+ if : always()
1030+ run : |
1031+ kill $(cat /tmp/memmon.pid) 2>/dev/null || true
1032+ echo "=== Memory Summary ==="
1033+ printf "Total RAM: %.1fGB\n" $(awk '/MemTotal/ {print $2/1024/1024}' /proc/meminfo)
1034+ if [ -f /tmp/memfree.log ]; then
1035+ MIN_FREE=$(sort -n /tmp/memfree.log | head -1)
1036+ printf "Minimum free memory: %.1fGB\n" $(echo "$MIN_FREE/1024/1024" | bc -l)
1037+ fi
10141038 test-sanitizer-undefined :
10151039 runs-on : ubuntu-latest
10161040 if : |
@@ -1069,6 +1093,9 @@ jobs:
10691093 - name : unittest
10701094 if : true && !contains(github.event.inputs.skiptests, 'unittest')
10711095 run : ./src/unit/valkey-unit-gtests --accurate
1096+ # Large-memory tests with sanitizers require 10-14GB RAM due to ASAN/UBSAN overhead.
1097+ # GitHub-hosted runners for public repos provide 16GB (ubuntu-latest).
1098+ # These tests are borderline - monitoring memory usage to determine if they can run reliably.
10721099 test-sanitizer-undefined-large-memory :
10731100 runs-on : ubuntu-latest
10741101 if : |
@@ -1094,6 +1121,8 @@ jobs:
10941121 echo "skiptests: ${{github.event.inputs.skiptests}}"
10951122 echo "test_args: ${{github.event.inputs.test_args}}"
10961123 echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}"
1124+ - name : Log runner memory
1125+ run : free -h
10971126 - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
10981127 with :
10991128 repository : ${{ ((github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && (inputs.use_repo || github.event.inputs.use_repo)) || github.repository }}
@@ -1106,15 +1135,34 @@ jobs:
11061135 run : |
11071136 sudo apt-get update
11081137 sudo apt-get install tcl8.6 tclx -y
1138+ - name : Start memory monitor
1139+ run : |
1140+ # Track minimum free memory to detect OOM risk
1141+ (while true; do
1142+ FREE=$(awk '/MemAvailable/ {print $2}' /proc/meminfo)
1143+ echo "$FREE" >> /tmp/memfree.log
1144+ sleep 5
1145+ done) &
1146+ echo $! > /tmp/memmon.pid
11091147 - name : unittest
11101148 if : true && !contains(github.event.inputs.skiptests, 'unittest')
11111149 run : ./src/unit/valkey-unit-gtests --accurate --large-memory
11121150 - name : large memory tests
11131151 if : true && !contains(github.event.inputs.skiptests, 'valkey')
1114- run : ./runtest --accurate --verbose --dump-logs --clients 5 --large-memory --tags large-memory ${{github.event.inputs.test_args}}
1152+ run : ./runtest --accurate --verbose --dump-logs --clients 1 --large-memory --tags large-memory ${{github.event.inputs.test_args}}
11151153 - name : large memory module api tests
11161154 if : true && !contains(github.event.inputs.skiptests, 'modules')
1117- run : CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --clients 5 --large-memory --tags large-memory ${{github.event.inputs.test_args}}
1155+ run : CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs --clients 1 --large-memory --tags large-memory ${{github.event.inputs.test_args}}
1156+ - name : Memory usage summary
1157+ if : always()
1158+ run : |
1159+ kill $(cat /tmp/memmon.pid) 2>/dev/null || true
1160+ echo "=== Memory Summary ==="
1161+ printf "Total RAM: %.1fGB\n" $(awk '/MemTotal/ {print $2/1024/1024}' /proc/meminfo)
1162+ if [ -f /tmp/memfree.log ]; then
1163+ MIN_FREE=$(sort -n /tmp/memfree.log | head -1)
1164+ printf "Minimum free memory: %.1fGB\n" $(echo "$MIN_FREE/1024/1024" | bc -l)
1165+ fi
11181166 test-sanitizer-force-defrag :
11191167 runs-on : ubuntu-latest
11201168 if : |
0 commit comments