Activity log for bug #1793451

Date Who What changed Old value New value Message
2018-09-20 06:45:56 Po-Hsu Lin bug added bug
2018-10-17 06:22:27 Po-Hsu Lin bug task added linux (Ubuntu)
2018-10-17 06:22:55 Po-Hsu Lin bug task added ubuntu-kernel-tests
2018-10-17 06:30:06 Ubuntu Kernel Bot linux (Ubuntu): status New Incomplete
2018-10-23 06:24:07 Po-Hsu Lin summary mlock203 test in ubuntu_ltp_syscalls failed with X-AWS mlock203 test in ubuntu_ltp_syscalls failed with Xenial kernel
2018-10-23 06:24:17 Po-Hsu Lin ubuntu-kernel-tests: assignee Po-Hsu Lin (cypressyew)
2018-10-23 06:24:19 Po-Hsu Lin ubuntu-kernel-tests: status New In Progress
2018-10-23 06:24:22 Po-Hsu Lin linux (Ubuntu): status Incomplete In Progress
2018-10-23 06:24:31 Po-Hsu Lin bug task deleted ubuntu-kernel-tests
2018-10-23 06:24:37 Po-Hsu Lin nominated for series Ubuntu Xenial
2018-10-23 06:24:47 Po-Hsu Lin bug task added ubuntu-kernel-tests
2018-10-23 06:24:58 Po-Hsu Lin ubuntu-kernel-tests: assignee Po-Hsu Lin (cypressyew)
2018-10-23 06:25:00 Po-Hsu Lin ubuntu-kernel-tests: status New In Progress
2018-10-23 06:25:03 Po-Hsu Lin linux (Ubuntu): assignee Po-Hsu Lin (cypressyew)
2018-10-23 07:39:07 Po-Hsu Lin description 15:11:31 DEBUG| [stdout] <<<test_start>>> 15:11:31 DEBUG| [stdout] tag=mlock203 stime=1537369891 15:11:31 DEBUG| [stdout] cmdline="mlock203" 15:11:31 DEBUG| [stdout] contacts="" 15:11:31 DEBUG| [stdout] analysis=exit 15:11:31 DEBUG| [stdout] <<<test_output>>> 15:11:31 DEBUG| [stdout] tst_test.c:1063: INFO: Timeout per run is 0h 05m 00s 15:11:31 DEBUG| [stdout] mlock203.c:63: FAIL: Locking one memory again increased VmLck 15:11:31 DEBUG| [stdout] 15:11:31 DEBUG| [stdout] Summary: 15:11:31 DEBUG| [stdout] passed 0 15:11:31 DEBUG| [stdout] failed 1 15:11:31 DEBUG| [stdout] skipped 0 15:11:31 DEBUG| [stdout] warnings 0 15:11:31 DEBUG| [stdout] <<<execution_status>>> 15:11:31 DEBUG| [stdout] initiation_status="ok" 15:11:31 DEBUG| [stdout] duration=0 termination_type=exited termination_id=1 corefile=no 15:11:31 DEBUG| [stdout] cutime=0 cstime=0 15:11:31 DEBUG| [stdout] <<<test_end>>> ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: linux-image-4.4.0-1068-aws 4.4.0-1068.78 ProcVersionSignature: User Name 4.4.0-1068.78-aws 4.4.144 Uname: Linux 4.4.0-1068-aws x86_64 ApportVersion: 2.20.1-0ubuntu2.18 Architecture: amd64 Date: Thu Sep 20 06:44:13 2018 Ec2AMI: ami-0e32ec5bc225539f5 Ec2AMIManifest: (unknown) Ec2AvailabilityZone: us-west-2b Ec2InstanceType: c3.large Ec2Kernel: unavailable Ec2Ramdisk: unavailable SourcePackage: linux-aws UpgradeStatus: No upgrade log present (probably fresh install) == Justification == When one vma was with flag VM_LOCKED|VM_LOCKONFAULT (by invoking mlock2(,MLOCK_ONFAULT)), it can again be populated with mlock() with VM_LOCKED flag only. There is a hole in mlock_fixup() which increase mm->locked_vm twice even the two operations are on the same vma and both with VM_LOCKED flags. The issue can be reproduced by following code: mlock2(p, 1024 * 64, MLOCK_ONFAULT); //VM_LOCKED|VM_LOCKONFAULT mlock(p, 1024 * 64); //VM_LOCKED Then check the increase VmLck field in /proc/pid/status(to 128k). When vma is set with different vm_flags, and the new vm_flags is with VM_LOCKED, it is not necessarily be a "new locked" vma. There is a dedicated reproducer called "mlock203" test in ubuntu_ltp_syscalls, you can see the failure for all the Ubuntu 4.4 kernel: <<<test_start>>> tag=mlock203 stime=1537369891 cmdline="mlock203" contacts="" analysis=exit <<<test_output>>> tst_test.c:1063: INFO: Timeout per run is 0h 05m 00s mlock203.c:63: FAIL: Locking one memory again increased VmLck Summary: passed 0 failed 1 skipped 0 warnings 0 == Fix == b155b4fd (mm: mlock: avoid increase mm->locked_vm on mlock() when already mlock2(,MLOCK_ONFAULT)) A test kernel for Xenial / Xenial-KVM could be found here: http://people.canonical.com/~phlin/kernel/lp-1793451-mlock203/ == Regression Potential == Low, this patch prevents mm->locked_vm from increment just by adding an extra check to see if the old vm_flags is already VM_LOCKED. == Test Case == Run the mlock203 test in ubuntu_ltp_syscalls test suite. And it will pass with the patched kernel. ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: linux-image-4.4.0-1068-aws 4.4.0-1068.78 ProcVersionSignature: User Name 4.4.0-1068.78-aws 4.4.144 Uname: Linux 4.4.0-1068-aws x86_64 ApportVersion: 2.20.1-0ubuntu2.18 Architecture: amd64 Date: Thu Sep 20 06:44:13 2018 Ec2AMI: ami-0e32ec5bc225539f5 Ec2AMIManifest: (unknown) Ec2AvailabilityZone: us-west-2b Ec2InstanceType: c3.large Ec2Kernel: unavailable Ec2Ramdisk: unavailable SourcePackage: linux-aws UpgradeStatus: No upgrade log present (probably fresh install)
2018-10-23 08:39:24 Po-Hsu Lin description == Justification == When one vma was with flag VM_LOCKED|VM_LOCKONFAULT (by invoking mlock2(,MLOCK_ONFAULT)), it can again be populated with mlock() with VM_LOCKED flag only. There is a hole in mlock_fixup() which increase mm->locked_vm twice even the two operations are on the same vma and both with VM_LOCKED flags. The issue can be reproduced by following code: mlock2(p, 1024 * 64, MLOCK_ONFAULT); //VM_LOCKED|VM_LOCKONFAULT mlock(p, 1024 * 64); //VM_LOCKED Then check the increase VmLck field in /proc/pid/status(to 128k). When vma is set with different vm_flags, and the new vm_flags is with VM_LOCKED, it is not necessarily be a "new locked" vma. There is a dedicated reproducer called "mlock203" test in ubuntu_ltp_syscalls, you can see the failure for all the Ubuntu 4.4 kernel: <<<test_start>>> tag=mlock203 stime=1537369891 cmdline="mlock203" contacts="" analysis=exit <<<test_output>>> tst_test.c:1063: INFO: Timeout per run is 0h 05m 00s mlock203.c:63: FAIL: Locking one memory again increased VmLck Summary: passed 0 failed 1 skipped 0 warnings 0 == Fix == b155b4fd (mm: mlock: avoid increase mm->locked_vm on mlock() when already mlock2(,MLOCK_ONFAULT)) A test kernel for Xenial / Xenial-KVM could be found here: http://people.canonical.com/~phlin/kernel/lp-1793451-mlock203/ == Regression Potential == Low, this patch prevents mm->locked_vm from increment just by adding an extra check to see if the old vm_flags is already VM_LOCKED. == Test Case == Run the mlock203 test in ubuntu_ltp_syscalls test suite. And it will pass with the patched kernel. ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: linux-image-4.4.0-1068-aws 4.4.0-1068.78 ProcVersionSignature: User Name 4.4.0-1068.78-aws 4.4.144 Uname: Linux 4.4.0-1068-aws x86_64 ApportVersion: 2.20.1-0ubuntu2.18 Architecture: amd64 Date: Thu Sep 20 06:44:13 2018 Ec2AMI: ami-0e32ec5bc225539f5 Ec2AMIManifest: (unknown) Ec2AvailabilityZone: us-west-2b Ec2InstanceType: c3.large Ec2Kernel: unavailable Ec2Ramdisk: unavailable SourcePackage: linux-aws UpgradeStatus: No upgrade log present (probably fresh install) == Justification == When one vma was with flag VM_LOCKED|VM_LOCKONFAULT (by invoking mlock2(,MLOCK_ONFAULT)), it can again be populated with mlock() with VM_LOCKED flag only. There is a hole in mlock_fixup() which increase mm->locked_vm twice even the two operations are on the same vma and both with VM_LOCKED flags. The issue can be reproduced by following code:   mlock2(p, 1024 * 64, MLOCK_ONFAULT); //VM_LOCKED|VM_LOCKONFAULT   mlock(p, 1024 * 64); //VM_LOCKED Then check the increase VmLck field in /proc/pid/status(to 128k). When vma is set with different vm_flags, and the new vm_flags is with VM_LOCKED, it is not necessarily be a "new locked" vma. There is a dedicated reproducer, the "mlock203" test in ubuntu_ltp_syscalls, you can see the failure for all the Ubuntu 4.4 kernel:  <<<test_start>>>  tag=mlock203 stime=1537369891  cmdline="mlock203"  contacts=""  analysis=exit  <<<test_output>>>  tst_test.c:1063: INFO: Timeout per run is 0h 05m 00s  mlock203.c:63: FAIL: Locking one memory again increased VmLck  Summary:  passed 0  failed 1  skipped 0  warnings 0 == Fix == b155b4fd (mm: mlock: avoid increase mm->locked_vm on mlock() when already mlock2(,MLOCK_ONFAULT)) A test kernel for Xenial / Xenial-KVM could be found here: http://people.canonical.com/~phlin/kernel/lp-1793451-mlock203/ == Regression Potential == Low, this patch prevents mm->locked_vm from increment just by adding an extra check to see if the old vm_flags is already VM_LOCKED. == Test Case == Run the mlock203 test in ubuntu_ltp_syscalls test suite. And it will pass with the patched kernel. ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: linux-image-4.4.0-1068-aws 4.4.0-1068.78 ProcVersionSignature: User Name 4.4.0-1068.78-aws 4.4.144 Uname: Linux 4.4.0-1068-aws x86_64 ApportVersion: 2.20.1-0ubuntu2.18 Architecture: amd64 Date: Thu Sep 20 06:44:13 2018 Ec2AMI: ami-0e32ec5bc225539f5 Ec2AMIManifest: (unknown) Ec2AvailabilityZone: us-west-2b Ec2InstanceType: c3.large Ec2Kernel: unavailable Ec2Ramdisk: unavailable SourcePackage: linux-aws UpgradeStatus: No upgrade log present (probably fresh install)
2018-11-05 14:07:03 Stefan Bader bug task added linux (Ubuntu Xenial)
2018-11-05 14:07:03 Stefan Bader bug task added linux-aws (Ubuntu Xenial)
2018-11-05 14:07:39 Stefan Bader bug task deleted linux-aws (Ubuntu)
2018-11-05 14:07:47 Stefan Bader bug task deleted linux-aws (Ubuntu Xenial)
2018-11-08 06:49:56 Khaled El Mously linux (Ubuntu Xenial): status New Fix Committed
2018-11-16 16:36:15 Brad Figg tags amd64 apport-bug ec2-images package-from-proposed xenial amd64 apport-bug ec2-images package-from-proposed verification-needed-xenial xenial
2018-11-20 03:41:23 Po-Hsu Lin tags amd64 apport-bug ec2-images package-from-proposed verification-needed-xenial xenial amd64 apport-bug ec2-images package-from-proposed verification-done-xenial xenial
2018-11-20 04:10:50 Po-Hsu Lin linux (Ubuntu Xenial): assignee Po-Hsu Lin (cypressyew)
2018-11-20 04:10:53 Po-Hsu Lin linux (Ubuntu): assignee Po-Hsu Lin (cypressyew)
2018-11-20 04:10:58 Po-Hsu Lin ubuntu-kernel-tests: status In Progress Fix Released
2018-12-03 14:59:47 Launchpad Janitor linux (Ubuntu Xenial): status Fix Committed Fix Released
2018-12-05 06:10:56 Po-Hsu Lin linux (Ubuntu): status In Progress Fix Released