Bug 13061

Summary: oe-selftest imagefeatures.ImageFeatures.test_image_fstypes (ubifs)
Product: [QA/Testing] Functional (self) Testing Reporter: Richard Purdie <richard.purdie>
Component: oe-selftestAssignee: Chen Qi <Qi.Chen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: hongxu.jia, mhalstead, randy.macleod
Version: 2.7   
Target Milestone: 2.8 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Richard Purdie 2018-12-05 14:03:41 UTC
2018-12-04 16:53:33,449 - oe-selftest - INFO - ======================================================================
2018-12-04 16:53:33,449 - oe-selftest - INFO - FAIL: imagefeatures.ImageFeatures.test_image_fstypes (subunit.RemotedTestCase)
2018-12-04 16:53:33,449 - oe-selftest - INFO - ----------------------------------------------------------------------
2018-12-04 16:53:33,449 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
    return func(*args, **kwargs)
  File "/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/imagefeatures.py", line 220, in test_image_fstypes
    bitbake(image_name)
  File "/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/utils/commands.py", line 216, in bitbake
    return runCmd(cmd, ignore_status, timeout, output_log=output_log, **options)
  File "/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/utils/commands.py", line 194, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, exc_output))
AssertionError: Command 'bitbake  core-image-minimal' returned non-zero exit status 1:
Parsing recipes...done.
[...]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_ubi
| libubigen: error!: cannot read 129024 bytes from the input file
|            error 0 (Success)
| ubinize: error!: cannot write volume for section "ubifs"
| ubinize: volume size was not specified in section "ubifs", assume minimum to fit image "/home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-33983/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20181204163446.rootfs.ubifs"6838272 bytes (6.5 MiB)
| WARNING: exit code 255 from a shell command.
| ERROR: Function failed: do_image_ubi (log file is located at /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-33983/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_ubi.48637)
NOTE: recipe core-image-minimal-1.0-r0: task do_image_ubi: Failed
ERROR: Task (/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/recipes-core/images/core-image-minimal.bb:do_image_ubi) failed with exit code '1'
NOTE: recipe core-image-minimal-1.0-r0: task do_image_ext3: Succeeded
NOTE: recipe core-image-minimal-1.0-r0: task do_image_btrfs: Succeeded
NOTE: recipe core-image-minimal-1.0-r0: task do_image_squashfs: Succeeded
NOTE: recipe core-image-minimal-1.0-r0: task do_image_tar: Succeeded
NOTE: recipe core-image-minimal-1.0-r0: task do_image_ext2: Succeeded
NOTE: recipe core-image-minimal-1.0-r0: task do_image_ubifs: Succeeded
NOTE: recipe core-image-minimal-1.0-r0: task do_image_cpio: Succeeded
NOTE: recipe core-image-minimal-1.0-r0: task do_bootimg: Succeeded
NOTE: recipe core-image-minimal-1.0-r0: task do_image_wic: Succeeded
NOTE: Tasks Summary: Attempted 2905 tasks of which 2868 didn't need to be rerun and 1 failed.
NOTE: The errors for this build are stored in /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-33983/tmp/log/error-report/error_report_20181204163446.txt
You can send the errors to a reports server by running:
  send-error-report /home/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-33983/tmp/log/error-report/error_report_20181204163446.txt [-s server]
NOTE: The contents of these logs will be posted in public if you use the above command with the default server. Please ensure you remove any identifying or proprietary information when prompted before sending.

Summary: 1 task failed:
  /home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/recipes-core/images/core-image-minimal.bb:do_image_ubi
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Comment 2 Chen Qi 2019-05-28 01:13:18 UTC
Hongxu,

I seem to recall that you once handled similar error?
Comment 3 Hongxu Jia 2019-07-12 08:23:10 UTC
commit 03cc7d03efa08a31776f19e4f93f5517c1f5147c
Author: Hongxu Jia <hongxu.jia@windriver.com>
Date:   Fri Apr 12 05:10:38 2019 -0400

    image_types.bbclass: fix a race between the ubi and ubifs FSTYPES
    
    The ubi, ubifs and multiubi FSTYPES calls `mkfs.ubifs' to create UBIFS
    images.
    
    In do_image_ubi, $vname is empty, the name of UBIFS image conflicts with
    the one in do_image_ubifs, and it's a race risk.
    [do_image_ubi]
    mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args}
    [do_image_ubi]
    
    [do_image_ubifs]
    mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}
    [do_image_ubifs]
    
    In do_image_multiubi, $vname is not empty, the UBIFS image name does
    not conflict with others.
    
    So do not call mkfs.ubifs in do_image_ubi and depend on do_image_ubifs
    to create UBIFS images.
    
    The fix does not affect do_image_multiubi which still call mkfs.ubifs to
    create multiple UBIFS images and symlinks.
    
    [YOCTO #13272]
    
    (From OE-Core rev: 3e5f075184d91dd99cf25cfe84bba1c946ed0c7c)
    
    Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Comment 4 Chen Qi 2019-07-12 08:23:53 UTC
It should be fixed by Hongxu's patch.