No subject

Tim Gardner tim.gardner at canonical.com
Thu Apr 29 18:52:46 UTC 2021


BugLink: https://bugs.launchpad.net/bugs/1926081

[Impact]

Ubuntu 18.04.5 4.15.0 LTS kernels at version 4.15.0-137 and above contain a
memory leak due to the inclusion of patch from the upstream kernel, but not
the fix for that patch which was released later.

Bad patch in bionic:linux 2c17fa778db85644458b52a7df8eacc402cbc1ef ("mm:
memcontrol: fix excessive complexity in memory.stat reporting")

[Test Plan]

See bug report for extended discussion. Test results are positive.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1926081/comments/24

The following is enough to permanently increase the value of `nr_writeback`.

cat > breakme.sh <<EOF
date
grep nr_writeback /proc/vmstat
mkdir -p /docker/testfiles/{1..5}

seq -w 1 100000 | xargs -n1 -I% sh -c 'dd if=/dev/urandom of=/docker/testfiles/1/file.% bs=4k count=10 status=none' &
seq -w 1 100000 | xargs -n1 -I% sh -c 'dd if=/dev/urandom of=/docker/testfiles/2/file.% bs=4k count=10 status=none' &
seq -w 1 100000 | xargs -n1 -I% sh -c 'dd if=/dev/urandom of=/docker/testfiles/3/file.% bs=4k count=10 status=none' &
seq -w 1 100000 | xargs -n1 -I% sh -c 'dd if=/dev/urandom of=/docker/testfiles/4/file.% bs=4k count=10 status=none' &
seq -w 1 100000 | xargs -n1 -I% sh -c 'dd if=/dev/urandom of=/docker/testfiles/5/file.% bs=4k count=10 status=none' &

wait $(jobs -p)
grep nr_writeback /proc/vmstat
date
EOF

[Where problems could occur]

Memory leakage could continue. The new spinlocks could cause some performance degradation.

[Other Info]

All of these patches have been accepted to v4.14.y




More information about the kernel-team mailing list