DEP8 failure in mantic with new memcached

Bug #2021994 reported by Andreas Hasenack
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cachelib (Debian)
Fix Released
Unknown
cachelib (Ubuntu)
Fix Released
Low
Andreas Hasenack

Bug Description

Lots of tests are failing:
https://autopkgtest.ubuntu.com/results/autopkgtest-mantic/mantic/amd64/c/cachelib/20230518_094534_ac160@/log.gz

============================= test session starts ==============================
platform linux -- Python 3.11.3, pytest-7.2.1, pluggy-1.0.0+repack
rootdir: /tmp/autopkgtest.rB0PMy/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 EEEEEEEEEEE [ 60%]
tests/test_redis_cache.py ...................... [ 78%]
tests/test_simple_cache.py .......................... [100%]

==================================== ERRORS ====================================

Last time they passed in mantic was with memcached 1.6.16 it seems.

This needs further investigation.

Related branches

tags: added: update-excuse
Changed in cachelib (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

https://github.com/pallets-eco/cachelib/issues/39

upstream report, unfortunately closed too early I think

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The error seems to be "address already in use" when the test that exercises memcached starts:
$ cat /tmp/autopkgtest.UbrNG3/autopkgtest_tmp/.pytest_cache/d/.xprocess/pylibmc/xprocess.log
@@__xproc_block_delimiter__@@
slab class 1: chunk size 96 perslab 10922
(...)
failed to listen on TCP port 11211: Address already in use

There is a memcached running on 127.0.0.1:11211 already, that's the one started by systemd, but that is the case with memcached 1.6.18 too. I haven't figured out yet what changed with 1.6.19 in that regard.

Ah, maybe...

With 1.6.19, memcached is listening on BOTH of these:
tcp LISTEN 0 1024 127.0.0.1:11211 0.0.0.0:* users:(("memcached",pid=2559,fd=22))

tcp LISTEN 0 1024 [::1]:11211 [::]:* users:(("memcached",pid=2559,fd=23))

Whereas with 1.6.18 it's just:
tcp LISTEN 0 1024 127.0.0.1:11211 0.0.0.0:* users:(("memcached",pid=2431,fd=22))

Which allows the memcached from the test suite to start and take the ipv6 slot. Just a theory, let's see...

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Yeah, 1.6.18 is being started with

/usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1 -P /var/run/memcached/memcached.pid

And 1.6.19 is being started with:

/usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1 -l ::1 -P /var/run/memcached/memcached.pid

A simple fix for the DEP8 test would be to stop the system-installed memcached before running the test. But I'll check what else can be done that would not require this test to run as root just because of that.

Changed in cachelib (Debian):
status: Unknown → New
Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ):
tags: added: server-todo
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cachelib - 0.9.0-1ubuntu1

---------------
cachelib (0.9.0-1ubuntu1) mantic; urgency=medium

  * Stop system memcached before running the test, to avoid a port
    conflict (LP: #2021994):
    - d/t/control: add needs-root restriction
    - d/t/upstream: stop the system memcached, and run the test as an
      unprivileged user as before

 -- Andreas Hasenack <email address hidden> Wed, 14 Jun 2023 15:06:55 -0300

Changed in cachelib (Ubuntu):
status: In Progress → Fix Released
Changed in cachelib (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.