<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12304</bug_id>
          
          <creation_ts>2017-11-06 15:40:22 +0000</creation_ts>
          <short_desc>nightly-oe-selftest failing on do_image_ext4 step</short_desc>
          <delta_ts>2020-05-20 09:28:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Build Testing</product>
          <component>general</component>
          <version>2.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>8430</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>armccurdy</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>stephano</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>77978</commentid>
    <comment_count>0</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-11-06 15:40:22 +0000</bug_when>
    <thetext>No memory available on the AB&apos;s hard-disk?

This is the log coming from the AB:

-----
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_ext4
| 0&amp;#43;0 records in
| 0&amp;#43;0 records out
| 0 bytes copied, 4.8298e-05 s, 0.0 kB/s
| mke2fs 1.43.5 (04-Aug-2017)
| Discarding device blocks: 1024/8192&amp;#8;&amp;#8;&amp;#8;&amp;#8;&amp;#8;&amp;#8;&amp;#8;&amp;#8;&amp;#8; &amp;#8;&amp;#8;&amp;#8;&amp;#8;&amp;#8;&amp;#8;&amp;#8;&amp;#8;&amp;#8;done
| Creating filesystem with 8192 1k blocks and 2048 inodes
|
| Allocating group tables: 0/1&amp;#8;&amp;#8;&amp;#8; &amp;#8;&amp;#8;&amp;#8;done
| Writing inode tables: 0/1&amp;#8;&amp;#8;&amp;#8; &amp;#8;&amp;#8;&amp;#8;done
| Creating journal (1024 blocks): done
| Copying files into the device: __populate_fs: Could not allocate block in ext2 filesystem while writing file &quot;udevd&quot;
| mkfs.ext4: Could not allocate block in ext2 filesystem while populating file system
| WARNING: /tmp/eSDKQAytysjqod/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/run.do_image_ ext4.837 9:1 exit 1 from &apos;mkfs.$fstype -F $extra_imagecmd /tmp/eSDKQAytysjqod/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20171103192939.rootfs.$fstype -d /tmp/eSDKQAytysjqod/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs&apos;
| ERROR: Function failed: do_image_ext4 (log file is located at /tmp/eSDKQAytysjqod/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_ext4.8379)
ERROR: Task (/tmp/eSDKQAytysjqod/layers/build/meta/recipes-core/images/core-image-minimal.bb:do_image_ext4) failed with exit code &apos;1&apos;
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
-----

AB build details:

Build status: FAILURE Build worker for this Build: opensuse423.yocto.io
Complete logs for all build steps: https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/590
Build Reason: Triggerable(trigger_main-build_nowait)
Build Properties:
• Contents of bblayers.conf (Note. LCONF_VERSION will not show up correctly)
POKY_BBLAYERS_CONF_VERSION =
BBPATH = &quot;${TOPDIR}&quot;
BBFILES ?=&quot;&quot;
BBLAYERS &amp;#43;= &quot; \
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta \
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta-poky \
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta-yocto-bsp \
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta-selftest \
&quot;

• DEST : /srv/autobuilder/autobuilder.yoctoproject.org/pub/nightly/20171103-2
• DISTRO : poky
• Contents of auto.conf (local.conf for autobuilders)
INHERIT &amp;#43;= &quot;report-error&quot;
DISTRO = &quot;poky&quot;
PACKAGE_CLASSES = &quot;package_rpm&quot;
BB_NUMBER_THREADS = &quot;24&quot;
PARALLEL_MAKE = &quot;-j 28&quot;
SDKMACHINE ?= &quot;x86_64&quot;
BB_TASK_NICE_LEVEL = &quot;5&quot;
BB_TASK_NICE_LEVEL_task-testimage = &quot;0&quot;
BB_TASK_IONICE_LEVEL = &quot;2.7&quot;
BB_TASK_IONICE_LEVEL_task-testimage = &quot;2.1&quot;
DL_DIR = &quot;/srv/autobuilder/autobuilder.yoctoproject.org/current_sources&quot;
SSTATE_DIR ?= &quot;/srv/autobuilder/autobuilder.yoctoproject.org/pub/sstate/&quot;
MACHINE = &quot;qemux86-64&quot;
PREMIRRORS = &quot;&quot;
BB_GENERATE_MIRROR_TARBALLS = &quot;1&quot;
ADTREPO = &quot;http://adtrepo.yoctoproject.org//2.4&quot;
QEMU_USE_KVM = &quot;True&quot;
SDK_EXT_TYPE = &quot;minimal&quot;
SDK_INCLUDE_TOOLCHAIN = &quot;1&quot;
SANITY_TESTED_DISTROS = &quot;&quot;
RPM_GPG_SIGN_CHUNK = &quot;1&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78292</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-11-20 23:04:25 +0000</bug_when>
    <thetext>As best as I can tell from the mke2fs output below, we created a ext4 FS that was around 8192K (~8M) and this might have been too small for a core-image-minimal, which I am seeing clock in around 11M right now.

So we did not run out of space in /tmp, but created an ext4 image that was too small for some reason TBD.  The only way to really understand this is to be able to analyse an actual failure, looking at both the eSDK and the logs of the build. Those logs are long gone now.

Getting the log.do_image_ext4 and run.do_image_ext4 files for a failed build would be extremely helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78293</commentid>
    <comment_count>2</comment_count>
    <who name="Andre McCurdy">armccurdy</who>
    <bug_when>2017-11-21 01:18:24 +0000</bug_when>
    <thetext>The rootfs image file being created is only 8MB and the build should be gracefully stopped if the host&apos;s HDD free space falls below 1GB (according to default BB_DISKMON_DIRS), so it seems unlikely that the host&apos;s HDD free space would be the issue here.

From the error message, it seems that the 8MB rootfs image file is too small to hold all the files from the rootfs (note that the error is &quot;Could not allocate block&quot; rather than &quot;Could not allocate inode&quot;, so it&apos;s the combined size of the files in the rootfs which seems to be the problem - not the number of files).

get_rootfs_size() in image.bbclass tries to ensure that the rootfs image file has sufficient headroom to hold all files + filesystem meta data by measuring the actual size of the files in the rootfs (with &quot;du -ks&quot;) and multiplying by IMAGE_OVERHEAD_FACTOR (1.3 by default). There would seem to be two possible ways that could fail:

1) The IMAGE_OVERHEAD_FACTOR is not sufficient to guarantee enough headroom for ext4 meta data (the journal etc) in all cases.

2) The combined size of the files in the rootfs changes (increases) between the time that set_image_size() runs get_rootfs_size() and sets up ROOTFS_SIZE and the time that oe_mkext234fs() references ROOTFS_SIZE to create the rootfs image file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78294</commentid>
    <comment_count>3</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-11-21 15:30:39 +0000</bug_when>
    <thetext>If we see this bug again, we need to save the workdir to preserve various files, it seems that the get_rootfs_size() might have returned a bad value, but we can&apos;t understand why based on the available output.

I am sending a patch to provide some of this needed information into the log output.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78320</commentid>
    <comment_count>4</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-11-22 16:10:23 +0000</bug_when>
    <thetext>
This patch provides some additional debug info in hopes that we can capture this failure again.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=66a34a7bdb83ad971c8842ea031f1b74e8d78cf3

I am putting this in NEEDINFO as a reminder to track this closer for the next month or so.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78547</commentid>
    <comment_count>5</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-12-06 17:16:51 +0000</bug_when>
    <thetext>
Captured the following failure:

| DEBUG: Executing shell function do_image_ext4
| DEBUG: Executing dd if=/dev/zero of=/tmp/eSDKQAg8rsb68n/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20171206143645.rootfs.ext4 seek=8192 count=0 bs=1024
| 0+0 records in
| 0+0 records out
| 0 bytes copied, 7.7844e-05 s, 0.0 kB/s
| DEBUG: Actual Rootfs size:  10572	/tmp/eSDKQAg8rsb68n/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
| DEBUG: Actual Partion size: 0 /tmp/eSDKQAg8rsb68n/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20171206143645.rootfs.ext4
| DEBUG: Executing mkfs.ext4 -F -i 4096 /tmp/eSDKQAg8rsb68n/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20171206143645.rootfs.ext4 -d /tmp/eSDKQAg8rsb68n/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
| mke2fs 1.43.7 (16-Oct-2017)
| Discarding device blocks: 1024/8192         done
| Creating filesystem with 8192 1k blocks and 2048 inodes
| 
| Allocating group tables: 0/1   done
| Writing inode tables: 0/1   done
| Creating journal (1024 blocks): done
| Copying files into the device: __populate_fs: Could not allocate block in ext2 filesystem while writing file &quot;udevd&quot;
| mkfs.ext4: Could not allocate block in ext2 filesystem while populating file system
| WARNING: /tmp/eSDKQAg8rsb68n/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/run.do_image_ext4.27837:1 exit 1 from &apos;mkfs.$fstype -F $extra_imagecmd /tmp/eSDKQAg8rsb68n/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20171206143645.rootfs.$fstype -d /tmp/eSDKQAg8rsb68n/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs&apos;
| ERROR: Function failed: do_image_ext4 (log file is located at /tmp/eSDKQAg8rsb68n/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_ext4.27837)
NOTE: recipe core-image-minimal-1.0-r0: task do_image_ext4: Failed


A couple of important items to note:
1) The dd command is a sparse file creation and is creating of size 8M
2) The actual rootfs size as noted is more like 10M
3) The actual rootfs.ext4 file size of 0 is correct for a sparse file

The key issue seems to be that the ROOTFS_SIZE is not getting computed correctly, but having the 10M size should help test the computation better.

get_rootfs_size() in image.bbclass needs some debug, I will investigate this further.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78761</commentid>
    <comment_count>6</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-12-19 18:20:58 +0000</bug_when>
    <thetext>
| DEBUG: Executing python function set_image_size
| DEBUG: 10004.800000 = 7696 * 1.300000
| DEBUG: 10004.800000 = max(10004.800000, 8192)[10004.800000] + 1
| DEBUG: 10005.000000 = int(10004.800000)
| DEBUG: 10005 = aligned(10005)
| DEBUG: returning 10005
| DEBUG: Python function set_image_size finished
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [&apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.7.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-extended/pigz/pigz_2.3.4.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-devtools/prelink/prelink_git.bb:do_populate_sysroot&apos;, &apos;/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-devtools/dnf/dnf_2.7.5.bb:do_populate_sysroot&apos;, &apos;/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-devtools/rpm/rpm_4.14.0.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-devtools/opkg/opkg_0.3.5.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot&apos;, &apos;/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb:do_populate_sysroot&apos;, &apos;/tmp/eSDKQAxo8eh9wo/layers/build/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb:do_populate_sysroot&apos;]
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: [&apos;e2fsprogs-native&apos;, &apos;createrepo-c-native&apos;, &apos;pigz-native&apos;, &apos;makedevs-native&apos;, &apos;prelink-native&apos;, &apos;qemuwrapper-cross&apos;, &apos;dnf-native&apos;, &apos;mklibs-native&apos;, &apos;rpm-native&apos;, &apos;pbzip2-native&apos;, &apos;opkg-native&apos;, &apos;pseudo-native&apos;, &apos;depmodwrapper-cross&apos;, &apos;opkg-utils-native&apos;, &apos;update-rc.d-native&apos;, &apos;ldconfig-native&apos;, &apos;file-native&apos;, &apos;glib-2.0-native&apos;, &apos;expat-native&apos;, &apos;python3-native&apos;, &apos;openssl-native&apos;, &apos;libxml2-native&apos;, &apos;curl-native&apos;, &apos;pkgconfig-native&apos;, &apos;quilt-native&apos;, &apos;sqlite3-native&apos;, &apos;zlib-native&apos;, &apos;cmake-native&apos;, &apos;xz-native&apos;, &apos;elfutils-native&apos;, &apos;gnu-config-native&apos;, &apos;autoconf-native&apos;, &apos;automake-native&apos;, &apos;libtool-native&apos;, &apos;binutils-native&apos;, &apos;shadow-native&apos;, &apos;bzip2-native&apos;, &apos;libarchive-native&apos;, &apos;libsolv-native&apos;, &apos;gettext-minimal-native&apos;, &apos;texinfo-dummy-native&apos;, &apos;util-linux-native&apos;, &apos;attr-native&apos;, &apos;qemu-native&apos;, &apos;python3-iniparse-native&apos;, &apos;librepo-native&apos;, &apos;libcomps-native&apos;, &apos;libdnf-native&apos;, &apos;db-native&apos;, &apos;dbus-native&apos;, &apos;popt-native&apos;, &apos;nss-native&apos;, &apos;kmod-native&apos;, &apos;libpcre-native&apos;, &apos;gtk-doc-native&apos;, &apos;gettext-native&apos;, &apos;libffi-native&apos;, &apos;readline-native&apos;, &apos;makedepend-native&apos;, &apos;cryptodev-linux-native&apos;, &apos;m4-native&apos;, &apos;flex-native&apos;, &apos;bison-native&apos;, &apos;ncurses-native&apos;, &apos;lzo-native&apos;, &apos;pixman-native&apos;, &apos;libsdl-native&apos;, &apos;alsa-lib-native&apos;, &apos;dtc-native&apos;, &apos;python3-six-native&apos;, &apos;gpgme-native&apos;, &apos;libcheck-native&apos;, &apos;gobject-introspection-native&apos;, &apos;autoconf-archive-native&apos;, &apos;nspr-native&apos;, &apos;util-macros-native&apos;, &apos;xproto-native&apos;, &apos;libpng-native&apos;, &apos;libxrender-native&apos;, &apos;libxext-native&apos;, &apos;libxrandr-native&apos;, &apos;libx11-native&apos;, &apos;python3-setuptools-native&apos;, &apos;libassuan-native&apos;, &apos;libgpg-error-native&apos;, &apos;swig-native&apos;, &apos;renderproto-native&apos;, &apos;xextproto-native&apos;, &apos;randrproto-native&apos;, &apos;kbproto-native&apos;, &apos;libxcb-native&apos;, &apos;xtrans-native&apos;, &apos;inputproto-native&apos;, &apos;unzip-native&apos;, &apos;libxau-native&apos;, &apos;xcb-proto-native&apos;, &apos;libxdmcp-native&apos;, &apos;libpthread-stubs-native&apos;]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_ext4
| DEBUG: Executing dd if=/dev/zero of=/tmp/eSDKQAxo8eh9wo/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20171219020250.rootfs.ext4 seek=10005 count=0 bs=1024
| 0+0 records in
| 0+0 records out
| 0 bytes copied, 9.7432e-05 s, 0.0 kB/s
| DEBUG: Actual Rootfs size:  7696	/tmp/eSDKQAxo8eh9wo/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
| DEBUG: Actual Partion size: 0 /tmp/eSDKQAxo8eh9wo/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20171219020250.rootfs.ext4
| DEBUG: Executing mkfs.ext4 -F -i 4096 /tmp/eSDKQAxo8eh9wo/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20171219020250.rootfs.ext4 -d /tmp/eSDKQAxo8eh9wo/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
| mke2fs 1.43.7 (16-Oct-2017)
| Discarding device blocks:  1024/10004           done
| Creating filesystem with 10004 1k blocks and 2512 inodes
| Filesystem UUID: 35a71905-9615-4f74-befb-4bffe35249f9
| Superblock backups stored on blocks:
| 	8193
| 
| Allocating group tables: 0/2   done
| Writing inode tables: 0/2   done
| Creating journal (1024 blocks): done
| Copying files into the device: __populate_fs: Could not allocate block in ext2 filesystem while writing file &quot;bzImage-4.12.16-yocto-standard&quot;
| mkfs.ext4: Could not allocate block in ext2 filesystem while populating file system
| WARNING: /tmp/eSDKQAxo8eh9wo/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/run.do_image_ext4.42054:1 exit 1 from &apos;mkfs.$fstype -F $extra_imagecmd /tmp/eSDKQAxo8eh9wo/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20171219020250.rootfs.$fstype -d /tmp/eSDKQAxo8eh9wo/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs&apos;
| ERROR: Function failed: do_image_ext4 (log file is located at /tmp/eSDKQAxo8eh9wo/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_ext4.42054)
NOTE: recipe core-image-minimal-1.0-r0: task do_image_ext4: Failed

This latest failure seems a little different, as the computed rootfs size is correct at 10005 (~10M) for a rootfs about 7.6M.

This seems to point more to the e2fs tools for mkfs.ext*
(adding Robert).

We really need a way to preserve the failing rootfs files to see if this can be reproduced.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78768</commentid>
    <comment_count>7</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2017-12-20 09:13:38 +0000</bug_when>
    <thetext>The error message shows:

| Copying files into the device: __populate_fs: Could not allocate block in ext2 filesystem while writing file &quot;bzImage-4.12.16-yocto-standard&quot;
| mkfs.ext4: Could not allocate block in ext2 filesystem while populating file system

Look at the &quot;bzImage-4.12.16-yocto-standard&quot;, there should be no this file
in rootfs when dev build-image core-image-minimal, and I think that it wasn&apos;t
there when &quot;du -sh rootfs&quot;, I must be some process add it to rootfs between
&quot;du -sh rootfs&quot; and &quot;mkfs.ext4 rootfs -d rootfs.img&quot;, I checked
meta/lib/oeqa/selftest/cases, the only one that I suspected is
devtool.DevtoolTests.test_devtool_virtual_kernel_modify, but the failed
one is eSDK.oeSDKExtSelfTest.test_image_generation_binary_feeds,
totally different modules and working directory. Maybe there are still
other cases that I didn&apos;t find.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81167</commentid>
    <comment_count>8</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2018-07-23 14:00:33 +0000</bug_when>
    <thetext>This is still occurring. https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/1210/steps/Running%20oe-selftest/logs/stdio :

ERROR: Logfile of failure stored in: /tmp/eSDKQAl7_jtpps/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_ext4.28624
Log data follows:
| DEBUG: Executing python function set_image_size
| DEBUG: 5678.400000 = 4368 * 1.300000
| DEBUG: 8192.000000 = max(5678.400000, 8192)[8192.000000] + 1
| DEBUG: 8192.000000 = int(8192.000000)
| DEBUG: 8192 = aligned(8192)
| DEBUG: returning 8192
| DEBUG: Python function set_image_size finished
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [&apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-extended/pigz/pigz_2.4.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-devtools/rpm/rpm_4.14.1.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb:do_populate_sysroot&apos;, &apos;/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot&apos;, &apos;/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb:do_populate_sysroot&apos;, &apos;/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb:do_populate_sysroot&apos;, &apos;/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.2.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-devtools/opkg/opkg_0.3.6.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-devtools/dnf/dnf_2.7.5.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQAl7_jtpps/layers/build/meta/recipes-devtools/prelink/prelink_git.bb:do_populate_sysroot&apos;]
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: [&apos;update-rc.d-native&apos;, &apos;pigz-native&apos;, &apos;rpm-native&apos;, &apos;makedevs-native&apos;, &apos;qemuwrapper-cross&apos;, &apos;pseudo-native&apos;, &apos;mklibs-native&apos;, &apos;depmodwrapper-cross&apos;, &apos;createrepo-c-native&apos;, &apos;pbzip2-native&apos;, &apos;ldconfig-native&apos;, &apos;e2fsprogs-native&apos;, &apos;opkg-native&apos;, &apos;opkg-utils-native&apos;, &apos;dnf-native&apos;, &apos;prelink-native&apos;, &apos;quilt-native&apos;, &apos;zlib-native&apos;, &apos;dbus-native&apos;, &apos;autoconf-native&apos;, &apos;python3-native&apos;, &apos;db-native&apos;, &apos;file-native&apos;, &apos;gnu-config-native&apos;, &apos;popt-native&apos;, &apos;elfutils-native&apos;, &apos;xz-native&apos;, &apos;automake-native&apos;, &apos;gettext-minimal-native&apos;, &apos;pkgconfig-native&apos;, &apos;nss-native&apos;, &apos;bzip2-native&apos;, &apos;libarchive-native&apos;, &apos;libtool-native&apos;, &apos;qemu-native&apos;, &apos;kmod-native&apos;, &apos;curl-native&apos;, &apos;libxml2-native&apos;, &apos;sqlite3-native&apos;, &apos;cmake-native&apos;, &apos;openssl-native&apos;, &apos;glib-2.0-native&apos;, &apos;ninja-native&apos;, &apos;expat-native&apos;, &apos;shadow-native&apos;, &apos;util-linux-native&apos;, &apos;attr-native&apos;, &apos;texinfo-dummy-native&apos;, &apos;libsolv-native&apos;, &apos;librepo-native&apos;, &apos;libdnf-native&apos;, &apos;libcomps-native&apos;, &apos;python3-iniparse-native&apos;, &apos;binutils-native&apos;, &apos;autoconf-archive-native&apos;, &apos;m4-native&apos;, &apos;gdbm-native&apos;, &apos;readline-native&apos;, &apos;nspr-native&apos;, &apos;lzo-native&apos;, &apos;alsa-lib-native&apos;, &apos;pixman-native&apos;, &apos;libsdl2-native&apos;, &apos;dtc-native&apos;, &apos;gtk-doc-native&apos;, &apos;makedepend-native&apos;, &apos;cryptodev-linux-native&apos;, &apos;libffi-native&apos;, &apos;libpcre-native&apos;, &apos;re2c-native&apos;, &apos;ncurses-native&apos;, &apos;gpgme-native&apos;, &apos;gobject-introspection-native&apos;, &apos;libcheck-native&apos;, &apos;python3-six-native&apos;, &apos;bison-native&apos;, &apos;flex-native&apos;, &apos;util-macros-native&apos;, &apos;libpng-native&apos;, &apos;libxext-native&apos;, &apos;libxrandr-native&apos;, &apos;libx11-native&apos;, &apos;libxrender-native&apos;, &apos;xorgproto-native&apos;, &apos;libassuan-native&apos;, &apos;libgpg-error-native&apos;, &apos;swig-native&apos;, &apos;python3-setuptools-native&apos;, &apos;libxcb-native&apos;, &apos;xtrans-native&apos;, &apos;unzip-native&apos;, &apos;libxdmcp-native&apos;, &apos;libpthread-stubs-native&apos;, &apos;xcb-proto-native&apos;, &apos;libxau-native&apos;]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_ext4
| DEBUG: Executing dd if=/dev/zero of=/tmp/eSDKQAl7_jtpps/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20180721093433.rootfs.ext4 seek=8192 count=0 bs=1024
| 0+0 records in
| 0+0 records out
| 0 bytes copied, 5.434e-05 s, 0.0 kB/s
| DEBUG: Actual Rootfs size:  10504	/tmp/eSDKQAl7_jtpps/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
| DEBUG: Actual Partion size: 8388608
| DEBUG: Executing mkfs.ext4 -F -i 4096 /tmp/eSDKQAl7_jtpps/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20180721093433.rootfs.ext4 -d /tmp/eSDKQAl7_jtpps/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
| mke2fs 1.44.2 (14-May-2018)

rerunning this manually on the same AB:

DEBUG: Executing python function set_image_size
DEBUG: 13806.000000 = 10620 * 1.300000
DEBUG: 13806.000000 = max(13806.000000, 8192)[13806.000000] + 1
DEBUG: 13806.000000 = int(13806.000000)
DEBUG: 13806 = aligned(13806)
DEBUG: returning 13806
DEBUG: Python function set_image_size finished
DEBUG: Executing python function extend_recipe_sysroot
NOTE: Direct dependencies are [&apos;/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb:do_populate_sysroot&apos;, &apos;/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb:do_populate_sysroot&apos;, &apos;/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-devtools/rpm/rpm_4.14.1.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-devtools/dnf/dnf_2.7.5.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-extended/pigz/pigz_2.4.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.44.2.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-devtools/opkg/opkg_0.3.6.bb:do_populate_sysroot&apos;, &apos;virtual:native:/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-devtools/prelink/prelink_git.bb:do_populate_sysroot&apos;, &apos;/tmp/eSDKQApsq4f5fc/layers/build/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb:do_populate_sysroot&apos;]
NOTE: Installed into sysroot: []
NOTE: Skipping as already exists in sysroot: [&apos;depmodwrapper-cross&apos;, &apos;opkg-utils-native&apos;, &apos;makedevs-native&apos;, &apos;ldconfig-native&apos;, &apos;update-rc.d-native&apos;, &apos;pbzip2-native&apos;, &apos;mklibs-native&apos;, &apos;pseudo-native&apos;, &apos;rpm-native&apos;, &apos;dnf-native&apos;, &apos;createrepo-c-native&apos;, &apos;pigz-native&apos;, &apos;e2fsprogs-native&apos;, &apos;opkg-native&apos;, &apos;prelink-native&apos;, &apos;qemuwrapper-cross&apos;, &apos;quilt-native&apos;, &apos;bzip2-native&apos;, &apos;libtool-native&apos;, &apos;gettext-minimal-native&apos;, &apos;xz-native&apos;, &apos;automake-native&apos;, &apos;autoconf-native&apos;, &apos;gnu-config-native&apos;, &apos;pkgconfig-native&apos;, &apos;dbus-native&apos;, &apos;python3-native&apos;, &apos;db-native&apos;, &apos;file-native&apos;, &apos;elfutils-native&apos;, &apos;nss-native&apos;, &apos;libarchive-native&apos;, &apos;popt-native&apos;, &apos;attr-native&apos;, &apos;texinfo-dummy-native&apos;, &apos;util-linux-native&apos;, &apos;binutils-native&apos;, &apos;qemu-native&apos;, &apos;kmod-native&apos;, &apos;libcomps-native&apos;, &apos;python3-iniparse-native&apos;, &apos;cmake-native&apos;, &apos;ninja-native&apos;, &apos;librepo-native&apos;, &apos;libdnf-native&apos;, &apos;openssl-native&apos;, &apos;glib-2.0-native&apos;, &apos;curl-native&apos;, &apos;expat-native&apos;, &apos;libxml2-native&apos;, &apos;zlib-native&apos;, &apos;sqlite3-native&apos;, &apos;shadow-native&apos;, &apos;libsolv-native&apos;, &apos;m4-native&apos;, &apos;autoconf-archive-native&apos;, &apos;gdbm-native&apos;, &apos;readline-native&apos;, &apos;nspr-native&apos;, &apos;lzo-native&apos;, &apos;ncurses-native&apos;, &apos;bison-native&apos;, &apos;flex-native&apos;, &apos;dtc-native&apos;, &apos;libsdl2-native&apos;, &apos;pixman-native&apos;, &apos;alsa-lib-native&apos;, &apos;gtk-doc-native&apos;, &apos;libcheck-native&apos;, &apos;python3-six-native&apos;, &apos;re2c-native&apos;, &apos;gpgme-native&apos;, &apos;gobject-introspection-native&apos;, &apos;makedepend-native&apos;, &apos;cryptodev-linux-native&apos;, &apos;libpcre-native&apos;, &apos;libffi-native&apos;, &apos;libx11-native&apos;, &apos;libxrandr-native&apos;, &apos;libxext-native&apos;, &apos;libxrender-native&apos;, &apos;util-macros-native&apos;, &apos;libpng-native&apos;, &apos;python3-setuptools-native&apos;, &apos;swig-native&apos;, &apos;libassuan-native&apos;, &apos;libgpg-error-native&apos;, &apos;xorgproto-native&apos;, &apos;xtrans-native&apos;, &apos;libxcb-native&apos;, &apos;unzip-native&apos;, &apos;libxdmcp-native&apos;, &apos;xcb-proto-native&apos;, &apos;libpthread-stubs-native&apos;, &apos;libxau-native&apos;]
DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_image_ext4
DEBUG: Executing dd if=/dev/zero of=/tmp/eSDKQApsq4f5fc/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20180723132439.rootfs.ext4 seek=13806 count=0 bs=1024
0+0 records in
0+0 records out
0 bytes copied, 5.5835e-05 s, 0.0 kB/s
DEBUG: Actual Rootfs size:  10620   /tmp/eSDKQApsq4f5fc/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
DEBUG: Actual Partion size: 14137344
DEBUG: Executing mkfs.ext4 -F -i 4096 /tmp/eSDKQApsq4f5fc/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64-20180723132439.rootfs.ext4 -d /tmp/eSDKQApsq4f5fc/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs

so somehow the first du call is not getting the real image size. The second one seems to be right.

Not sure why...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81168</commentid>
    <comment_count>9</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2018-07-23 14:07:41 +0000</bug_when>
    <thetext>Note this on a machine with:

/dev/sda3 on /tmp type btrfs (rw,relatime,space_cache,subvolid=264,subvol=/@/tmp)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87260</commentid>
    <comment_count>10</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2020-05-20 09:28:38 +0000</bug_when>
    <thetext>Pretty sure this is just #8430.

*** This bug has been marked as a duplicate of bug 8430 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>