lua-resty-core icon indicating copy to clipboard operation
lua-resty-core copied to clipboard

Random test failures in t/re-gmatch.t

Open xiaocang opened this issue 3 years ago • 3 comments

I'm seeing the following random test failures on ubuntu:trusty x86_64:

$ TEST_NGINX_RANDOMIZE=1 \
    prove -r -j2 -I../test-nginx/lib \
    t/stream/re-gmatch.t

t/stream/re-gmatch.t .. 1/? 
#   Failed test 'TEST 2: matched, no submatch, jit compile, regex cache - pattern "(?^:\[TRACE\s+\d+ content_by_lua\(nginx\.conf:\d+\):4 loop\])" should match a line in error.log (req 0)'
#   at /home/dev/work/org/lua-resty-core/../test-nginx/lib/Test/Nginx/Socket.pm line 1213.

xiaocang avatar Oct 12 '20 09:10 xiaocang

here's my nginx -V output:

# work/nginx/sbin/nginx -V
nginx version: nginx/1.19.3 (no pool)
built by clang 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
built with OpenSSL 1.1.0l  10 Sep 2019
TLS SNI support enabled
configure arguments: --prefix=/home/dev/work/org/lua-resty-core/work/nginx --with-ipv6 --with-http_realip_module --with-http_ssl_module --with-pcre-jit --with-cc-opt='-I/opt/ssl/include -I/opt/pcre/include' --with-ld-opt='-L/opt/ssl/lib -Wl,-rpath,/opt/ssl/lib -L/opt/pcre/lib -Wl,-rpath,/opt/pcre/lib' --add-module=/home/dev/work/org/ndk-nginx-module --add-module=/home/dev/work/org/echo-nginx-module --add-module=/home/dev/work/org/set-misc-nginx-module --add-module=/home/dev/work/org/headers-more-nginx-module --add-module=/home/dev/work/org/lua-nginx-module --with-debug --with-stream_ssl_module --with-stream --with-ipv6 --add-module=/home/dev/work/org/stream-lua-nginx-module --with-poll_module

xiaocang avatar Oct 12 '20 09:10 xiaocang

here's my t/servroot/logs/error.log output when the test pass:

[TRACE   1 lrucache.lua:87 loop]
[TRACE --- regex.lua:524 -- leaving loop in root trace at regex.lua:540]
[TRACE   2 regex.lua:348 return]
[TRACE --- regex.lua:513 -- inner loop in root trace at regex.lua:525]
[TRACE   3 lrucache.lua:123 return]
[TRACE --- content_by_lua(nginx.conf:48):4 -- inner loop in root trace at regex.lua:525]
[TRACE --- regex.lua:742 -- inner loop in root trace at regex.lua:525]
[TRACE --- regex.lua:791 -- leaving loop in root trace at setmetatable]
[TRACE   4 lrucache.lua:182 return]
[TRACE --- regex.lua:524 -- leaving loop in root trace at regex.lua:540]
[TRACE   5 regex.lua:559 return]
[TRACE   6 regex.lua:513 return]
[TRACE   7 content_by_lua(nginx.conf:48):4 loop]

here's my t/servroot/logs/error.log output when the test failed:

[TRACE   1 lrucache.lua:87 loop]
[TRACE --- regex.lua:524 -- leaving loop in root trace at regex.lua:540]
[TRACE --- content_by_lua(nginx.conf:48):4 -- inner loop in root trace at regex.lua:525]
[TRACE --- regex.lua:742 -- inner loop in root trace at regex.lua:525]
[TRACE --- regex.lua:513 -- inner loop in root trace at regex.lua:525]
[TRACE   2 regex.lua:559 return]
[TRACE --- regex.lua:524 -- leaving loop in root trace at regex.lua:540]
[TRACE --- regex.lua:791 -- leaving loop in root trace at setmetatable]
[TRACE   3 regex.lua:742 return]
[TRACE --- regex.lua:791 -- leaving loop in root trace at setmetatable]
[TRACE --- regex.lua:791 -- leaving loop in root trace at setmetatable]
[TRACE --- content_by_lua(nginx.conf:48):4 -- leaving loop in root trace at content_by_lua(nginx.conf:48):9]
6204A0, 6, 0

xiaocang avatar Oct 12 '20 09:10 xiaocang

PS: I ran this test case in a loop until it failed, which took 3m27.332s, but on CI this failure is easily reproducible.

matrix env var on CI:

NGINX_VERSION=1.19.3 OPENSSL_VER=1.1.0l OPENSSL_PATCH_VER=1.1.0d

xiaocang avatar Oct 12 '20 11:10 xiaocang