mtest06 from mm in ubuntu_ltp failed on B-AWS-5.0 B-AWS-4.15

Bug #1854722 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Thadeu Lima de Souza Cascardo
linux-aws (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Kernel: 5.0.0-1022.25~18.04.1

Issue found on instance t2.small
The test failed with ENOMEM

 startup='Wed Nov 20 10:40:07 2019'
 tst_test.c:1217: INFO: Timeout per run is 0h 05m 00s
 mmap1.c:205: BROK: mmap((nil),2147483648,3,34,-1,0) failed: ENOMEM (12)

 Summary:
 passed 0
 failed 0
 skipped 0
 warnings 0
 tag=mtest06 stime=1574246407 dur=0 exit=exited stat=2 core=no cu=0 cs=0

Po-Hsu Lin (cypressyew)
tags: added: 5.0 amd64 aws bionic sru-20191111 ubuntu-ltp
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Issue found on E-AWS ARM64 instance a1.medium. Passed on the other 2 ARM64 instances.

tags: added: sru-20191202
Sean Feole (sfeole)
Changed in ubuntu-kernel-tests:
status: New → Triaged
Po-Hsu Lin (cypressyew)
summary: - mtest06 from mm in ubuntu_ltp failed on B-AWS-5.0
+ mtest06 from mm in ubuntu_ltp failed on B-AWS-5.0 B-4.15
summary: - mtest06 from mm in ubuntu_ltp failed on B-AWS-5.0 B-4.15
+ mtest06 from mm in ubuntu_ltp failed on B-AWS-5.0 B-AWS-4.15
tags: added: sru-20200406
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Found on B-AWS-4.15 (4.15.0-1066.70)
with a1.medium and t2.small

Revision history for this message
Kelsey Steele (kelsey-steele) wrote :

found on Focal aws : 5.4.0-1026.26 : arm64 a1.medium

tags: added: 5.4 focal sru-20200921
Revision history for this message
Kelsey Steele (kelsey-steele) wrote :

Spotted on Focal/azure : 5.4.0-1029.29 : amd64

tags: added: azure
Revision history for this message
Kelsey Steele (kelsey-steele) wrote :

failed on Bionic/azure-4.15 : 4.15.0-1097.107 : amd64

tags: added: 4.15
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Still visible on AWS t2.small 4.15.0-1103.110-aws

tags: added: sru-20210510
Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

commit 4021854176a1f84d0990c51e88ddd6b2d901a7fe
Author: Bogdan Lezhepekov <email address hidden>
Date: Wed Dec 30 19:36:15 2020 +0300

    mtest06/mmap1: Limit distant mmap size

    Limit the distant mmap size by a total memory value.

    Signed-off-by: Bogdan Lezhepekov <email address hidden>
    Acked-by: Li Wang <email address hidden>

This should have been fixed by this LTP commit. Tested on t2.small with a 5.4 kernel. I'll try with a 4.15 kernel.

Cascardo.

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

mmap1.c:257: TPASS: System survived.

Summary:
passed 1
failed 0
broken 0
skipped 0
warnings 0

$ head -1 /proc/meminfo
MemTotal: 2032728 kB

$ uname -r
5.4.0-1048-aws

On a t2.small instance. But, hey, this is a 5.4 kernel. Will install a 4.15 kernel on this bionic instance.

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

OK. It fails on 4.15. The overcommit logic has changed between 5.1 and 5.2-rc1 with the following commit:

8c7829b04c523cdc732cb77f59f03320e09f3386 ("mm: fix false-positive OVERCOMMIT_GUESS failures").

Compared to the new logic, the old one is overly complicated, and not easy to account on the test itself. Allocating half the memory should probably be enough for the test purpose.

Cascardo.

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

https://lists.linux.it/pipermail/ltp/2021-May/022765.html

It was tested to work after that change.

Cascardo.

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

Marking the linux-aws task as invalid because this is not a bug in the kernel, but the test. Though we could consider backporting the overcommit change, that should be on a different bug.

Cascardo.

Changed in linux-aws (Ubuntu):
status: New → Invalid
Changed in ubuntu-kernel-tests:
status: Triaged → In Progress
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

That's awesome Thadeu,
thanks for the patch, I noticed that this has been applied upstream.
I will give this a retry on Bionic 4.15 / 4.15 FIPS AWS t2.small

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Retested with the following instances, test passed as expected:
bionic-linux-aws-aws-amd64-4.15.0-t2.small-ubuntu_ltp
bionic-linux-aws-fips-aws-fips-amd64-4.15.0-t2.small-ubuntu_ltp

https://github.com/linux-test-project/ltp/commit/9dcbf4e96a41ac69842e705d4dea51fc8e7b0860

Thank you!

Changed in ubuntu-kernel-tests:
assignee: nobody → Thadeu Lima de Souza Cascardo (cascardo)
status: In Progress → 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.