Bug#1034128: memcached breaks cachelib autopkgtest: TimeoutError

2023-04-10 Thread Chris Lamb
Paul Gevers wrote:

> With a recent upload of memcached the autopkgtest of cachelib fails in 
> testing when that autopkgtest is run with the binary packages of 
> memcached from unstable. It passes when run with only packages from 
> testing. In tabular form:
>
> passfail
> memcached  from testing1.6.19-1
> cachelib   from testing0.9.0-1
> all others from testingfrom testing
[..]
> E   TimeoutError: The provided start pattern server 
> listening could not be matched within the specified 
> time interval of 120 seconds

Not sure what is going on here. However, I am dumping some links that I
came across so far:

* memcached release notes: 
https://github.com/memcached/memcached/wiki/ReleaseNotes1619
* cachelib release notes: https://cachelib.readthedocs.io/en/stable/changes/
* A similar-looking report on cachelib's Issue Page: 
https://github.com/pallets-eco/cachelib/issues/39


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org  chris-lamb.co.uk
   `-



Bug#1034128: memcached breaks cachelib autopkgtest: TimeoutError

2023-04-09 Thread Paul Gevers

Source: memcached, cachelib
Control: found -1 memcached/1.6.19-1
Control: found -1 cachelib/0.9.0-1
Severity: serious
Tags: sid bookworm bookworm-ignore
User: debian...@lists.debian.org
Usertags: breaks needs-update

Dear maintainer(s),

With a recent upload of memcached the autopkgtest of cachelib fails in 
testing when that autopkgtest is run with the binary packages of 
memcached from unstable. It passes when run with only packages from 
testing. In tabular form:


   passfail
memcached  from testing1.6.19-1
cachelib   from testing0.9.0-1
all others from testingfrom testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of memcached to 
testing [1]. Due to the nature of this issue, I filed this bug report 
against both packages. Can you please investigate the situation and 
reassign the bug to the right package? [Release Team member hat on] 
Because we're currently in the hard freeze for bookworm, I have marked 
this bug as bookworm-ignore. Targeted fixes are still welcome.


More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=memcached

https://ci.debian.net/data/autopkgtest/testing/amd64/c/cachelib/32723565/log.gz

=== python3.11 ===
= test session starts 
==

platform linux -- Python 3.11.2, pytest-7.2.1, pluggy-1.0.0+repack
rootdir: /tmp/autopkgtest-lxc.wypz897y/downtmp/autopkgtest_tmp
plugins: xprocess-0.22.2
collected 120 items / 1 skipped

tests/test_base_cache.py  
[ 10%]
tests/test_file_system_cache.py  
[ 43%]
 
[ 50%]
tests/test_interface_uniformity.py E 
[ 50%]
tests/test_memcached_cache.py EEE 
[ 60%]
tests/test_redis_cache.py .. 
[ 78%]
tests/test_simple_cache.py .. 
[100%]


 ERRORS 

__ ERROR at setup of 
TestInterfaceUniformity.test_types_have_all_base_methods __


xprocess = 

@pytest.fixture(scope="class")
def memcached_server(xprocess):
package_name = "pylibmc"
pytest.importorskip(
modname=package_name, reason=f"could not find python 
package {package_name}"

)
class Starter(ProcessStarter):
pattern = "server listening"
args = ["memcached", "-vv"]
def startup_check(self):
out = subprocess.run(["memcached"], stderr=subprocess.PIPE)
return b"Address already" in out.stderr
>   xprocess.ensure(package_name, Starter)

tests/conftest.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3/dist-packages/xprocess/xprocess.py:282: in ensure

if not starter.wait(log_file_handle):
/usr/lib/python3/dist-packages/xprocess/xprocess.py:399: in wait
has_match = any(std.re.search(self.pattern, line) for line in lines)
/usr/lib/python3/dist-packages/xprocess/xprocess.py:399: in 
has_match = any(std.re.search(self.pattern, line) for line in lines)
/usr/lib/python3/dist-packages/xprocess/xprocess.py:405: in 
non_empty_lines = (x for x in lines if x.strip())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _

self = .Starter object at 0x7fe20a7de690>
log_file = <_io.TextIOWrapper 
name='/tmp/autopkgtest-lxc.wypz897y/downtmp/autopkgtest_tmp/.pytest_cache/d/.xprocess/pylibmc/xprocess.log' 
mode='r' encoding='UTF-8'>


def get_lines(self, log_file):
"""Read and yield one line at a time from log_file. Will raise
TimeoutError if pattern is not matched before self.timeout
seconds."""
while True:
line = log_file.readline()
if not line:
std.time.sleep(0.1)
if datetime.now() > self._max_time:

  raise TimeoutError(

"The provided start pattern {} could not be matched \
within the specified time interval of {} 
seconds".format(

self.pattern, self.timeout
)
)
E   TimeoutError: The provided start pattern server 
listening could not be matched within the specified 
time interval of 120 seconds


/usr/lib/python3/dist-packages/xprocess/xprocess.py:422: TimeoutError
 Captured stdout setup 
-
/tmp/autopkgtest-lxc.wypz897y/downtmp/autopkgtest_tmp/.pytest_cache/d/.xprocess/redis$ 
redis-server --port 6360

process 'redis' started pid=2393
2393:C 09 Apr 2023 15:11:50.229 # oO0OoO0OoO0Oo Redis is starting 
oO0OoO0OoO0Oo


2393:C 09 Apr 2023 15:11:50.229 # Redis version=7.0.10, bits=64,