ACK: [PATCH 0/1][bionic:linux] nr_writeback memory leak in kernel 4.15.0-137+

Guilherme Piccoli gpiccoli at canonical.com
Wed Apr 28 12:35:35 UTC 2021


On Wed, Apr 28, 2021 at 8:59 AM Tim Gardner <tim.gardner at canonical.com> wrote:
>
> 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.
>
> 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
> or even deadlock.
>
> [Other Info]
>
> These patches have been accepted to v4.14.y
>
>

Thanks Tim! LGTM:
Acked-by: Guilherme G. Piccoli <gpiccoli at canonical.com>



More information about the kernel-team mailing list