Skip to contentSkip to conversation

05dbad003f: ltp.getrusage03.fail

dennis-percpu:for-6.11 kernel test robot 3 participants 3 messages May 28, 2024

Subsystems (3)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw

Hello,

kernel test robot noticed "ltp.getrusage03.fail" on:

commit: 05dbad003f2b2ececb1cc7428bfa8f470cc34b95 ("percpu_counter: add a cmpxchg-based _add_batch variant")
https://git.kernel.org/cgit/linux/kernel/git/dennis/percpu.git for-6.11

in testcase: ltp
version: ltp-x86_64-14c1f76-1_20240525
with following parameters:

disk: 1HDD
fs: xfs
test: syscalls-03/getrusage03

compiler: gcc-13
test machine: 4 threads 1 sockets Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz (Ivy Bridge) with 8G memory

(please refer to attached dmesg/kmsg for entire log/backtrace)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-lkp/[email protected]

Running tests.......
<<<test_start>>>
tag=getrusage03 stime=1716734654
cmdline="getrusage03"
contacts=""
analysis=exit
<<<test_output>>>
tst_test.c:1733: TINFO: LTP version: 20240524-4-g22004c7db tst_test.c:1617: TINFO: Timeout per run is 0h 02m 30s getrusage03.c:43: TPASS: initial.self ~= child.self getrusage03.c:59: TFAIL: initial.children = 0, expected 102400 getrusage03.c:66: TPASS: child.children == 0 getrusage03.c:86: TFAIL: child.children = 0, expected 307200 getrusage03.c:104: TPASS: initial.children ~= pre_wait.children getrusage03.c:114: TFAIL: post_wait.children = 0, expected 409600 getrusage03.c:133: TPASS: initial.children ~= after_zombie.children getrusage03_child.c:57: TPASS: initial.self ~= exec.self getrusage03_child.c:62: TPASS: initial.children ~= exec.children

HINT: You _MAY_ be missing kernel fixes:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1f10206cf8e9

Summary:

passed   6
failed   3
broken   0
skipped  0

warnings 0
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=1 termination_type=exited termination_id=1 corefile=no cutime=8 cstime=27
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20240524-4-g22004c7db

       ###############################################################

            Done executing testcases.
            LTP Version:  20240524-4-g22004c7db
       ###############################################################

The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240528/[email protected]

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#1 lore raw
Quoted 27 lines · kernel test robot

Hello,

kernel test robot noticed "ltp.getrusage03.fail" on:

commit: 05dbad003f2b2ececb1cc7428bfa8f470cc34b95 ("percpu_counter: add a cmpxchg-based _add_batch variant")
https://git.kernel.org/cgit/linux/kernel/git/dennis/percpu.git for-6.11

in testcase: ltp
version: ltp-x86_64-14c1f76-1_20240525
with following parameters:

disk: 1HDD
fs: xfs
test: syscalls-03/getrusage03

Running tests.......
<<<test_start>>>
tag=getrusage03 stime=1716734654 cmdline="getrusage03"
contacts=""
analysis=exit
<<<test_output>>>
tst_test.c:1733: TINFO: LTP version: 20240524-4-g22004c7db tst_test.c:1617: TINFO: Timeout per run is 0h 02m 30s getrusage03.c:43: TPASS: initial.self ~= child.self

Quoted 9 lines

getrusage03.c:59: TFAIL: initial.children = 0, expected 102400 getrusage03.c:66: TPASS: child.children == 0 getrusage03.c:86: TFAIL: child.children = 0, expected 307200 getrusage03.c:104: TPASS: initial.children ~= pre_wait.children getrusage03.c:114: TFAIL: post_wait.children = 0, expected 409600 getrusage03.c:133: TPASS: initial.children ~= after_zombie.children getrusage03_child.c:57: TPASS: initial.self ~= exec.self getrusage03_child.c:62: TPASS: initial.children ~= exec.children

I confirm this patch broke things, thanks for the report.

Make sure to sit before you take a look at the fix:

commit 6e8b4caf667fb6fad1c63b061e303faab6d917ef

Author: Mateusz Guzik <[email protected]>
Date:   Tue May 28 04:52:10 2024 -0400

lol

lib/percpu_counter.c +1 -1
index c3140276bb36..51bc5246986d 100644
@@ -97,7 +97,7 @@ void percpu_counter_add_batch(struct percpu_counter *fbc, s64 amount, s32 batch)
 
        count = this_cpu_read(*fbc->counters);
        do {
-               if (unlikely(abs(count + amount)) >= batch) {
+               if (unlikely(abs(count + amount) >= batch)) {
                        raw_spin_lock_irqsave(&fbc->lock, flags);
                        /*
                         * Note: by now we might have migrated to another CPU

Dennis, do I need to submit a v4? Given that this is a trivial one line fixup perhaps it would be handier if you massaged the stuff on your branch. I'm fine either way.

That said this really should have been reported by something.

maintainer
#2 lore raw
Quoted 63 lines · Mateusz Guzik
Quoted 27 lines · kernel test robot

Hello,

kernel test robot noticed "ltp.getrusage03.fail" on:

commit: 05dbad003f2b2ececb1cc7428bfa8f470cc34b95 ("percpu_counter: add a cmpxchg-based _add_batch variant")
https://git.kernel.org/cgit/linux/kernel/git/dennis/percpu.git for-6.11

in testcase: ltp
version: ltp-x86_64-14c1f76-1_20240525
with following parameters:

disk: 1HDD
fs: xfs
test: syscalls-03/getrusage03

Running tests.......
<<<test_start>>>
tag=getrusage03 stime=1716734654 cmdline="getrusage03"
contacts=""
analysis=exit
<<<test_output>>>
tst_test.c:1733: TINFO: LTP version: 20240524-4-g22004c7db tst_test.c:1617: TINFO: Timeout per run is 0h 02m 30s getrusage03.c:43: TPASS: initial.self ~= child.self

Quoted 9 lines

getrusage03.c:59: TFAIL: initial.children = 0, expected 102400 getrusage03.c:66: TPASS: child.children == 0 getrusage03.c:86: TFAIL: child.children = 0, expected 307200 getrusage03.c:104: TPASS: initial.children ~= pre_wait.children getrusage03.c:114: TFAIL: post_wait.children = 0, expected 409600 getrusage03.c:133: TPASS: initial.children ~= after_zombie.children getrusage03_child.c:57: TPASS: initial.self ~= exec.self getrusage03_child.c:62: TPASS: initial.children ~= exec.children

I confirm this patch broke things, thanks for the report.

Make sure to sit before you take a look at the fix:

commit 6e8b4caf667fb6fad1c63b061e303faab6d917ef

Author: Mateusz Guzik <[email protected]>
Date:   Tue May 28 04:52:10 2024 -0400

lol

lib/percpu_counter.c +1 -1
index c3140276bb36..51bc5246986d 100644
@@ -97,7 +97,7 @@ void percpu_counter_add_batch(struct percpu_counter *fbc, s64 amount, s32 batch)
 
        count = this_cpu_read(*fbc->counters);
        do {
-               if (unlikely(abs(count + amount)) >= batch) {
+               if (unlikely(abs(count + amount) >= batch)) {
                        raw_spin_lock_irqsave(&fbc->lock, flags);
                        /*
                         * Note: by now we might have migrated to another CPU
Quoted 4 lines

Dennis, do I need to submit a v4? Given that this is a trivial one line fixup perhaps it would be handier if you massaged the stuff on your branch. I'm fine either way.

Well that's awkward.. Can you please send a v4?

Quoted 1 line

That said this really should have been reported by something.

That's fair. I think I starred at parenthesis for too long that day so I missed it too. The nice thing is these branches get longer running CI so we can track these things.

Thanks,
Dennis