test_ulimit_stack_small from ubuntu_qrt_kernel_security fails on I/J/M arm64k

Bug #1949645 reported by Kelsey Steele
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QA Regression Testing
New
Undecided
Unassigned
ubuntu-kernel-tests
New
Undecided
Unassigned

Bug Description

Note: I decided to split this report into two, let's track the test_030_mmap_min failure in bug 1931393 - PHLin

Test test_ulimit_stack_small from ubuntu_qrt_kernel_security is failing on Impish / Jammy ARM64k with:

  FAIL: test_ulimit_stack_small (__main__.KernelNonSecurityTest)
  Ensure small stack limits are enforced
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "./test-kernel-security.py", line 3020, in test_ulimit_stack_small
      self.assertShellExitIn(expected, self._unpriv_cmd(["sh", "-c", "ulimit -s 1 && /bin/true"]))
    File "/home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/testlib.py", line 1218, in assertShellExitIn
      self.assertIn(rc, expected, msg + result + report)
  AssertionError: Got exit code 0, expected one of 139
  Command: 'sudo', '-u', 'ubuntu', 'sh', '-c', 'ulimit -s 1 && /bin/true'
  Output:

  ----------------------------------------------------------------------
  Ran 1 test in 0.016s

This is not failing on ARM64, but failing with generic-64k flavour instead.

[Original Bug Report]
Finding two failures in test-kernel-security.py from ubuntu_qrt_kernel_security fails on impish (test_ulimit_stack_small / test_030_mmap_min). These are found on previous kernels from Impish, so not considered a regression.

hosts: generic-64k dazzle and helo-kernel

test_ulimit_stack_small (__main__.KernelNonSecurityTest)
Ensure small stack limits are enforced ... FAIL

.....

test_030_mmap_min (__main__.KernelSecurityTest)
10/22 01:49:47 ERROR| utils:0153| [stderr] Low memory allocation respects mmap_min_addr ... (arm kernel with 64K pages configured (LP:#1931393) (65536) FAIL

.....

======================================================================
FAIL: test_ulimit_stack_small (__main__.KernelNonSecurityTest)
Ensure small stack limits are enforced
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./test-kernel-security.py", line 3014, in test_ulimit_stack_small
    self.assertShellExitIn(expected, self._unpriv_cmd(["sh", "-c", "ulimit -s 1 && /bin/true"]))
  File "/home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/testlib.py", line 1218, in assertShellExitIn
    self.assertIn(rc, expected, msg + result + report)
AssertionError: Got exit code 0, expected one of 139
Command: 'sudo', '-u', 'ubuntu', 'sh', '-c', 'ulimit -s 1 && /bin/true'
Output:

======================================================================
FAIL: test_030_mmap_min (__main__.KernelSecurityTest)
Low memory allocation respects mmap_min_addr
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./test-kernel-security.py", line 285, in test_030_mmap_min
    mmap_limit = self._test_sysctl_value('vm/mmap_min_addr', wanted, "is wine or qemu-kvm-extras-static installed?")
  File "/home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/testlib.py", line 1269, in _test_sysctl_value
    self.assertEqual(value, expected, report)
AssertionError: /proc/sys/vm/mmap_min_addr is not 65536: 32768 (is wine or qemu-kvm-extras-static installed?)

----------------------------------------------------------------------
Ran 125 tests in 26.120s

FAILED (failures=2)

Po-Hsu Lin (cypressyew)
summary: - test-kernel-security.py from ubuntu_qrt_kernel_security fails on impish
- (test_ulimit_stack_small / test_030_mmap_min)
+ test_ulimit_stack_small from ubuntu_qrt_kernel_security fails on I/J
+ arm64k
Po-Hsu Lin (cypressyew)
description: updated
description: updated
Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote : Re: test_ulimit_stack_small from ubuntu_qrt_kernel_security fails on I/J arm64k
Po-Hsu Lin (cypressyew)
Changed in qa-regression-testing:
status: New → Fix Committed
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Throw this back to new, as the fix above is introducing regression to older kernels and reverted.

Changed in qa-regression-testing:
status: Fix Committed → New
Po-Hsu Lin (cypressyew)
tags: added: sru-20230320
Revision history for this message
Andrei Gherzan (agherzan) wrote :

I have hit this on focal:linux-hwe-5.15 and hinted referencing this bug.

https://code.launchpad.net/~canonical-kernel-team/+git/rt-hints/+merge/441339

SRU Cycle: 2023.03.20
Series: focal
Package: linux-hwe-5.15
Version: 5.15.0-70.77~20.04.1
Cloud: openstack
Instance: cpu4-ram4-disk20

tags: added: sru-20230417
tags: added: sru-20230515
Po-Hsu Lin (cypressyew)
tags: added: sru-20230612
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Found with j-lowlatency-hwe-6.5.0-14.14.1~22.04.1 on lowlatency-64k ARM64 openstack instance.

tags: added: sru-20231030
summary: - test_ulimit_stack_small from ubuntu_qrt_kernel_security fails on I/J
+ test_ulimit_stack_small from ubuntu_qrt_kernel_security fails on I/J/M
arm64k
tags: added: 6.5
Po-Hsu Lin (cypressyew)
tags: added: jammy oracle sru-s20240205
Po-Hsu Lin (cypressyew)
tags: added: noble
tags: added: 6.8
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.