Bug 14460

Summary: ltp hang in proc01 on arm reading /proc/kmsg
Product: [QA/Testing] Runtime Testing Reporter: Richard Purdie <richard.purdie>
Component: oeqa/runtimeAssignee: Ross Burton <ross.burton>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Medium+ CC: jon.mason, randy.macleod, ross.burton
Version: unspecified   
Target Milestone: 3.4 M3   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Richard Purdie 2021-06-29 10:12:06 UTC
Periodically we see an ltp build for qemuarm64 hang. An example is:

https://autobuilder.yoctoproject.org/typhoon/#/builders/96/builds/1900

where you can see "Bitbake still alive" messages in step 12.

In the case of the above build, I was able to ssh into the image and noticed it was hanging in the proc01 test. You can see it reading from /proc/kmsg from the open files in /proc/<pid>/fd.

In this case, I installed strace into the image and tried to strace the process, that was enough to wake things up and cause the test to stop hanging. The build eventually succeeded in this case. There was so much data from strace sadly the initial output scrolled out my terminal buffer.

We have seen these hangs before, several times and did disable the test at one point: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=b73c484a58dbbde3989393163fc968f06109823c

The proc01 test itself reads from files in /proc in non-blocking mode and has kmsg listed as a file where EAGAIN is an acceptable error code.

https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/fs/proc/proc01.c
Comment 1 Richard Purdie 2021-06-29 14:28:58 UTC
To try and reproduce I did boot a qemuarm64 image with ltp added on my x86 host and run:

"for i in {1..2000}; do echo "foo $i <more strings>" > /dev/kmsg ; done

in one terminal and

for i in {1..200}; do /opt/ltp/testcases/bin/proc01 -m 128 -r /proc/kmsg; done

on another with varying iterations and line lengths but as yet no hang.
Comment 2 Randy MacLeod 2021-08-19 15:05:12 UTC
Hasn't happened in quite a while. Re-open if it happens again.