linux-test-project / ltp

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)
https://linux-test-project.readthedocs.io/
GNU General Public License v2.0
2.28k stars 1k forks source link

Regression with commit 04021637f4 for memcg_subgroup_charge / memcg_max_usage_in_bytes / memcg_usage_in_bytes in controllers test suite #947

Closed Cypresslin closed 1 year ago

Cypresslin commented 2 years ago

Hello,

when trying to update the LTP test suite, I noticed these three tests in the controllers subset:

starts failing with the latest tip (9fb28002bb2c) on Ubuntu Bionic / Focal AMD64 systems with identical error message:

memcg_max_usage_in_bytes_test 1 TINFO: Warming up pid: 21434
memcg_process: mmap(anonymous) failed: Invalid argument
/opt/ltp/testcases/bin/memcg_max_usage_in_bytes_test.sh: 234: kill: No such process

memcg_max_usage_in_bytes_test 1 TFAIL: Process 21434 exited with 1 after warm up

On PowerPC systems with Ubuntu Bionic there will be 2 more failures:

Complete test log on AMD64 system:

COMMAND:    /opt/ltp/bin/ltp-pan   -e -S   -a 21667     -n 21667 -p -f /tmp/ltp-Te5dWgFjzJ/alltests -l /opt/ltp/results/LTP_RUN_ON-2022_06_30-04h_09m_57s.log  -C /opt/ltp/output/LTP_RUN_ON-2022_06_30-04h_09m_57s.failed -T /opt/ltp/output/LTP_RUN_ON-2022_06_30-04h_09m_57s.tconf
LOG File: /opt/ltp/results/LTP_RUN_ON-2022_06_30-04h_09m_57s.log
FAILED COMMAND File: /opt/ltp/output/LTP_RUN_ON-2022_06_30-04h_09m_57s.failed
TCONF COMMAND File: /opt/ltp/output/LTP_RUN_ON-2022_06_30-04h_09m_57s.tconf
Running tests.......
<<<test_start>>>
tag=memcg_subgroup_charge stime=1656562198
cmdline="memcg_subgroup_charge.sh"
contacts=""
analysis=exit
<<<test_output>>>
memcg_subgroup_charge 1 TINFO: timeout per run is 0h 5m 0s
memcg_subgroup_charge 1 TINFO: set /dev/memcg/memory.use_hierarchy to 0 failed
memcg_subgroup_charge 1 TINFO: Test that group and subgroup have no relationship
memcg_subgroup_charge 1 TPASS: echo 0 > subgroup/memory.limit_in_bytes passed as expected
memcg_subgroup_charge 1 TINFO: Running memcg_process --mmap-anon -s 0
memcg_subgroup_charge 1 TINFO: Warming up pid: 21832
memcg_process: mmap(anonymous) failed: Invalid argument
/opt/ltp/testcases/bin/memcg_subgroup_charge.sh: 234: kill: No such process

memcg_subgroup_charge 1 TFAIL: Process 21832 exited with 1 after warm up
rmdir: failed to remove '/dev/memcg/ltp_21798': Device or resource busy
memcg_subgroup_charge 1 TBROK: rmdir /dev/memcg/ltp_21798 failed
memcg_subgroup_charge 1 TINFO: AppArmor enabled, this may affect test results
memcg_subgroup_charge 1 TINFO: it can be disabled with TST_DISABLE_APPARMOR=1 (requires super/root)
memcg_subgroup_charge 1 TINFO: loaded AppArmor profiles: none

Summary:
passed   1
failed   1
broken   1
skipped  0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=1 termination_type=exited termination_id=3 corefile=no
cutime=5 cstime=7
<<<test_end>>>
<<<test_start>>>
tag=memcg_max_usage_in_bytes stime=1656562199
cmdline="memcg_max_usage_in_bytes_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
memcg_max_usage_in_bytes_test 1 TINFO: timeout per run is 0h 5m 0s
memcg_max_usage_in_bytes_test 1 TINFO: set /dev/memcg/memory.use_hierarchy to 0 failed
memcg_max_usage_in_bytes_test 1 TINFO: Test memory.max_usage_in_bytes
memcg_max_usage_in_bytes_test 1 TINFO: Running memcg_process --mmap-anon -s 0
memcg_max_usage_in_bytes_test 1 TINFO: Warming up pid: 21881
memcg_process: mmap(anonymous) failed: Invalid argument
/opt/ltp/testcases/bin/memcg_max_usage_in_bytes_test.sh: 234: kill: No such process

memcg_max_usage_in_bytes_test 1 TFAIL: Process 21881 exited with 1 after warm up
memcg_max_usage_in_bytes_test 2 TINFO: Test memory.memsw.max_usage_in_bytes
memcg_max_usage_in_bytes_test 2 TCONF: mem+swap is not enabled
memcg_max_usage_in_bytes_test 2 TINFO: AppArmor enabled, this may affect test results
memcg_max_usage_in_bytes_test 2 TINFO: it can be disabled with TST_DISABLE_APPARMOR=1 (requires super/root)
memcg_max_usage_in_bytes_test 2 TINFO: loaded AppArmor profiles: none

Summary:
passed   0
failed   1
broken   0
skipped  1
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=1 termination_type=exited termination_id=33 corefile=no
cutime=5 cstime=7
<<<test_end>>>
<<<test_start>>>
tag=memcg_usage_in_bytes stime=1656562200
cmdline="memcg_usage_in_bytes_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
memcg_usage_in_bytes_test 1 TINFO: timeout per run is 0h 5m 0s
memcg_usage_in_bytes_test 1 TINFO: set /dev/memcg/memory.use_hierarchy to 0 failed
memcg_usage_in_bytes_test 1 TINFO: Test memory.usage_in_bytes
memcg_usage_in_bytes_test 1 TINFO: Running memcg_process --mmap-anon -s 0
memcg_usage_in_bytes_test 1 TINFO: Warming up pid: 21933
memcg_process: mmap(anonymous) failed: Invalid argument
/opt/ltp/testcases/bin/memcg_usage_in_bytes_test.sh: 234: kill: No such process

memcg_usage_in_bytes_test 1 TFAIL: Process 21933 exited with 1 after warm up
memcg_usage_in_bytes_test 2 TINFO: Test memory.memsw.usage_in_bytes
memcg_usage_in_bytes_test 2 TCONF: mem+swap is not enabled
memcg_usage_in_bytes_test 2 TINFO: AppArmor enabled, this may affect test results
memcg_usage_in_bytes_test 2 TINFO: it can be disabled with TST_DISABLE_APPARMOR=1 (requires super/root)
memcg_usage_in_bytes_test 2 TINFO: loaded AppArmor profiles: none

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

Bisect shows commit 04021637f4749 is the cause, revert that change can make this green again, bisect log:

$ git bisect log
git bisect start
# bad: [9fb28002bb2ce988b99d1756ff7b902f76e3472a] syscalls/migrate_pages03: restore runtime to 5m
git bisect bad 9fb28002bb2ce988b99d1756ff7b902f76e3472a
# good: [e246b2edc15ea286342ac056caaa71de34bae479] waitid10: Fix when coredumps are piped
git bisect good e246b2edc15ea286342ac056caaa71de34bae479
# bad: [fd5c29e71fdd20e4d6a97b93fba5f5d9b78ae83a] kvm: Allow running multiple iterations of a test
git bisect bad fd5c29e71fdd20e4d6a97b93fba5f5d9b78ae83a
# good: [e51ddc2d3291e82c6ab833c9fccbad69915c423f] Fix wqueue09 according with 5.17 kernel updates
git bisect good e51ddc2d3291e82c6ab833c9fccbad69915c423f
# good: [bad8be4f17105f9858111e393382a1da05532eda] syscalls/fchmodat_01: Convert to new API
git bisect good bad8be4f17105f9858111e393382a1da05532eda
# bad: [58d8bf9c79933561c74327978cd6487011595960] syscalls/recvmsg01: wait for server to finish
git bisect bad 58d8bf9c79933561c74327978cd6487011595960
# good: [0f67c9851a9043d0ad68cef4648d103ba7908480] Remove syslog shell tests
git bisect good 0f67c9851a9043d0ad68cef4648d103ba7908480
# bad: [04021637f4749a4797bf105862c45fe07374a161] tst_test.sh: Cleanup getopts usage
git bisect bad 04021637f4749a4797bf105862c45fe07374a161
# good: [c9fb618388e42395095429da1a2a6f8fab5a45d6] doc: Update library API doc
git bisect good c9fb618388e42395095429da1a2a6f8fab5a45d6
# first bad commit: [04021637f4749a4797bf105862c45fe07374a161] tst_test.sh: Cleanup getopts usage
Cypresslin commented 1 year ago

This issue has been fixed with commit bda92ad659a52d38 Thanks!