After some testing of both ubuntu kernels and mainline kernels, the bug
has been introduced between v6.11 and v6.12-rc1 upstream.

---

# PLUCKY: 6.14.0-13-generic (ubuntu)
$ ./reproducer.sh 
Before, memory.max:
max 
After, memory.max:
4997120
Ready to kill...
Starting memory consumption in 1.00 MiB steps to maximum 42.0 TiB.
...
Allocated 1.88 GiB.
Allocated 1.88 GiB.
Allocated 1.89 GiB.
./reproducer.sh: line 8:  1340 Killed                  leak-memory

# PLUCKY: 6.12.0-061200rc3-generic (mainline)
$ ./reproducer.sh 
Before, memory.max:
max
After, memory.max:
4997120
Ready to kill...
Starting memory consumption in 1.00 MiB steps to maximum 42.0 TiB.
...
Allocated 1.85 GiB.
Allocated 1.86 GiB.
Allocated 1.87 GiB.
./reproducer.sh: line 8:  6148 Killed                  leak-memory

# PLUCKY: 6.12.0-061200rc2-generic (mainline)
$ ./reproducer.sh 
Before, memory.max:
max
After, memory.max:
4997120
Ready to kill...
Starting memory consumption in 1.00 MiB steps to maximum 42.0 TiB.
...
Allocated 1.91 GiB.
Allocated 1.92 GiB.
Allocated 1.93 GiB.
./reproducer.sh: line 8:  6168 Killed                  leak-memory

# PLUCKY: 6.12.0-061200rc1-generic (mainline)
$ ./reproducer.sh 
Before, memory.max:
max
After, memory.max:
4997120
Ready to kill...
Starting memory consumption in 1.00 MiB steps to maximum 42.0 TiB.
...
Allocated 1.82 GiB.
Allocated 1.83 GiB.
Allocated 1.84 GiB.
./reproducer.sh: line 8:  6164 Killed                  leak-memory

# PLUCKY: 6.11.0-061100-generic (mainline)
$ ./reproducer.sh 
Before, memory.max:
max
After, memory.max:
4997120
Ready to kill...
Starting memory consumption in 1.00 MiB steps to maximum 42.0 TiB
[   87.908094] 
oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/user.slice/user-1000.slice/session-1.scope,task_memcg=/user.slice/user-1000.slice/session-1.scope,task=leak-memory,pid=6159,uid=1000
[   87.908122] Memory cgroup out of memory: Killed process 6159 (leak-memory) 
total-vm:8924kB, anon-rss:3968kB, file-rss:1468kB, shmem-rss:0kB, UID:1000 
pgtables:64kB oom_score_adj:0

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2105866

Title:
  cgroup: weird calculation for memory limit

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2105866/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to