Bug 14220 - ptest-runner cannot handle large child output
Summary: ptest-runner cannot handle large child output
Status: RESOLVED FIXED
Alias: None
Product: Package Testing (ptest)
Classification: QA/Testing
Component: ptest (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.3 M3
Assignee: Aníbal Limón
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 14170
  Show dependency tree
 
Reported: 2021-02-04 16:46 UTC by Yi Fan Yu
Modified: 2021-04-07 14:20 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
proposed patch (4.70 KB, patch)
2021-02-04 16:46 UTC, Yi Fan Yu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Fan Yu 2021-02-04 16:46:59 UTC
Created attachment 4770 [details]
proposed patch

root cause of  https://bugzilla.yoctoproject.org/show_bug.cgi?id=14170

to reproduce this kind of issue:
make a ptest-run script to output a lot of data
ex: echo {1..1000000}\\n

echo will actually crash if you run it with ptest-runner

i think it is because in the source code of ptest-runner,
the parent process is reading from a non-blocking pipe and writing to a blocking stdout in  a loop. pipe might be full if parent is blocked.

attached is a proposed solution.
Comment 1 Randy MacLeod 2021-02-11 15:37:40 UTC
Put the reader in a separate thread.
Comment 2 Aníbal Limón 2021-03-23 02:18:10 UTC
Patches sent to ML and dev branch,

https://github.com/alimon/ptest-runner2/tree/ptest_fixes