Bug 15884

Summary: AB-INT PTEST RISCV64: tar ptest failure
Product: [QA/Testing] Package Testing (ptest) Reporter: João Marcos Costa <joaomarcos.costa>
Component: ptestAssignee: Unassigned <unassigned>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: randy.macleod, richard.purdie, skandigraun
Version: unspecified   
Target Milestone: 5.3   
Hardware: Other   
OS: other   
Whiteboard: AB-INT
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description João Marcos Costa 2025-06-02 15:04:53 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/6/steps/13/logs/stdio

Failed ptests:
{'tar': 'START: ptest-runner\n'        '2025-05-15T11:12\n'
'## ------------------------ ##\n'        '## GNU tar 1.35 test suite. ##\n'
'## ------------------------ ##\n'        'PASS: tar version\n'        'PASS:
decompressing from stdin\n'

(...)

'devtmpfs                499876         0    499876   0% /dev\n'
'tmpfs                   501024        72    500952   0% /run\n'
'tmpfs                   501024        80    500944   0% '
'/var/volatile\n'        '              total        used        free
shared  buff/cache   '        'available\n'        'Mem:        1002052
46956       38528         152      '        '916568      938628\n'
'Swap:             0           0           0\n'        '\n'
'ERROR: Exited from signal Killed (9)\n'
'DURATION: 796\n'}

Looks like a timeout.

qemuriscv64-ptest opensuse155-vk-1
Comment 1 Randy MacLeod 2025-06-05 14:35:44 UTC
Let's see how often this happens in the autobuilder.
Comment 2 Randy MacLeod 2025-06-05 14:47:13 UTC
*** Bug 15890 has been marked as a duplicate of this bug. ***
Comment 3 João Marcos Costa 2025-06-09 06:58:05 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/87/steps/12/logs/stdio

qemuriscv64-ptest rocky9-vk-1
Comment 4 João Marcos Costa 2025-07-08 09:09:47 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/160/steps/12/logs/stdio

qemuriscv64-ptest ubuntu2404-vk-1
Comment 5 João Marcos Costa 2025-09-22 07:43:53 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/512/steps/12/logs/stdio

qemuriscv64-ptest fedora42-vk-1
Comment 6 João Marcos Costa 2025-10-06 08:29:13 UTC
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/578/steps/14/logs/stdio

qemuriscv64-ptest opensuse156-vk-1
Comment 7 Gyorgy Sarvari 2025-10-21 17:46:37 UTC
I was able to reproduce this on my machine (with qemuriscv64), thought the repro rate is around only 5%, and I don't have the slightest idea about the cause yet...


    cd /usr/lib/tar/ptest/tests
    for i in `seq 20`; do
      time ./testsuite -k sparse03
    done


This test generates an 8GB sparse file, full of 0s. Then tars it, extracts it, and compares it with the original, using cmp.
One round usually takes 150 seconds on my machine, but every once in a while, without any apparent reason, it takes more than double this time - that's seems to be also when ptest-runner times out.
Comment 8 Gyorgy Sarvari 2025-10-22 19:49:04 UTC
This test looks sensitive to the overall machine load - I'm a bit surprised that it shows only on qemuriscv64 on AB. On my machine I see this on qemuarm64 too (though it is noticeably faster on arm64 compared to riscv64, it times out much less frequently than on riscv64).

The test generates an 8GB sparse file, tars it, untars it, and then it compares the original and extracted versions with cmp - it chews through 16GB of imaginary zeros. It is using a single thread to do so, and when running in qemu without kvm, it does need every CPU cycle it can get to finish in time.

I have submitted a patch[1] to use the full version of cmp instead of busybox. In my tests the speedup is noticable: on idle machine it went from 150 seconds to 55. And the test doesn't time out even if I compile clang-native on all CPU cores during execution. (Using the busybox version always timed out with high load, and mid-load caused timeouts occasionally too)

[1]: https://lists.openembedded.org/g/openembedded-core/message/225209
Comment 9 Richard Purdie 2026-03-12 16:58:13 UTC
Thanks Gyorgy, this does seem to have resolved the issue as we've not seen it since. I think we can therefore close this now, thanks!
https://git.openembedded.org/openembedded-core/commit/?id=81f7b60fb1c5096bbc233f632040d1ea9ec5bb21