Bug 11674

Summary: core-image-sato-sdk-ptest build error for cpio image
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Juro Bystricky <juro.bystricky>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, randy.macleod, ross.burton, sgw, shashwatx.pandey
Version: 2.4   
Target Milestone: 5.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
log.do_image_cpio.22223 none

Description Juro Bystricky 2017-06-15 19:39:37 UTC
Created attachment 3824 [details]
log.do_image_cpio.22223

with local.conf:
MACHINE = "qemux86-64"
IMAGE_FSTYPES += " cpio"

the following build fails:

juro@juro-Precision-T5610:/data/master-master/poky/build-bug-11661$ bitbake core-image-sato-sdk-ptest
Parsing recipes: 100% |#####################################################################################################################################| Time: 0:00:04
Parsing of 826 .bb files complete (0 cached, 826 parsed). 1293 targets, 48 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.34.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "qemux86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "2.3"
TUNE_FEATURES     = "m64 core2"
TARGET_FPU        = ""
meta              
meta-poky         
meta-yocto-bsp    = "HEAD:bd61cb3d900d1c36667f1bb8f403ee4dbbedd468"

Initialising tasks: 100% |##################################################################################################################################| Time: 0:00:19
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: core-image-sato-sdk-ptest-1.0-r0 do_image_cpio: Function failed: do_image_cpio (log file is located at /data/master-master/poky/build-bug-11661/tmp/work/qemux86_64-poky-linux/core-image-sato-sdk-ptest/1.0-r0/temp/log.do_image_cpio.22223)
ERROR: Logfile of failure stored in: /data/master-master/poky/build-bug-11661/tmp/work/qemux86_64-poky-linux/core-image-sato-sdk-ptest/1.0-r0/temp/log.do_image_cpio.22223
Log data follows:
| DEBUG: Executing python function set_image_size
| DEBUG: Python function set_image_size finished
| DEBUG: Executing shell function do_image_cpio
| 4796864 blocks
| cpio: cannot seek on output: Invalid argument
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_image_cpio (log file is located at /data/master-master/poky/build-bug-11661/tmp/work/qemux86_64-poky-linux/core-image-sato-sdk-ptest/1.0-r0/temp/log.do_image_cpio.22223)
ERROR: Task (/data/master-master/poky/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb:do_image_cpio) failed with exit code '1'
NOTE: Tasks Summary: Attempted 7117 tasks of which 5977 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /data/master-master/poky/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb:do_image_cpio



ROOTFS size issue?
Comment 1 Ross Burton 2017-06-22 14:38:19 UTC
"The cpio utility was standardized in POSIX.1-1988, but it was omitted from POSIX.1-2001 because of its file size (and other) limitations. For example, the GNU version offers various output format options, such as "bin" (default, and obsolete) and "ustar", having a file size limitations of 2,147,483,647 bytes (2 GB) and 8,589,934,591 bytes (8 GB), respectively.[3]"

Very much looks like file size is the problem.  If we're not using ustar format we should, and if possible we should verify the size.
Comment 2 Shashwat Pandey 2017-11-14 06:25:19 UTC
Submitted into mailing list for merging:

http://lists.openembedded.org/pipermail/openembedded-core/2017-November/144315.html
Comment 3 Ross Burton 2019-10-24 23:03:29 UTC
Submitted patch would break initramfs:

> Do recent kernels actually support ustar for initramfs? I thought it only
> supported newc? My 4.9 kernel certainly still only mentions newc...

Also note that the sizes being referred to are actually the "file size
limits for individual files" not the total cpio archive size.

  https://www.gnu.org/software/cpio/manual/cpio.html

What's the case where > 4GB files are needed in an initramfs?
Comment 4 Randy MacLeod 2021-10-28 15:22:50 UTC
We should sanity check cpio targets to be less than the 2 GB limit.
Comment 5 Ross Burton 2023-05-10 15:42:38 UTC
Amusingly I had a look at this, figured out what the combination that breaks it is, looked at upstream git and found a commit less than two weeks ago:

https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=0987d63384f0419b4b14aecdc6a61729b75ce86a
Comment 6 Ross Burton 2023-05-10 17:00:54 UTC
Patches for cpio on the list. Only took six years...
Comment 7 Randy MacLeod 2023-10-24 14:24:46 UTC
Bulk move from 4.99 or 0.00 to 5.99
Comment 8 Ross Burton 2024-11-19 13:01:36 UTC
Fixed in oe-core 84619c2eb2574d808d52d1862ad3b5e099e4dbf7.