Bug 5146 - btrfs image build fails at do_rootfs
Summary: btrfs image build fails at do_rootfs
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5.1
Assignee: Saul Wold
QA Contact:
URL:
Whiteboard:
: 5578 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-09 13:39 UTC by Alexandru Palalau
Modified: 2014-04-15 12:54 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Full do_rootfs log file (41.18 KB, application/octet-stream)
2013-09-09 13:39 UTC, Alexandru Palalau
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Palalau 2013-09-09 13:39:32 UTC
Created attachment 1478 [details]
Full do_rootfs log file

BUILD: 1.5 M4 RC3:ed3ef0823fde89371a473d20c0127c0bd16d062b

Build Configuration:
BB_VERSION        = "1.19.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-17"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "qemux86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4+snapshot-20130909"
TUNE_FEATURES     = "m64"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "(nobranch):ed3ef0823fde89371a473d20c0127c0bd16d062b"


STEPS TO REPRODUCE:
 1. set IMAGE_FSTYPES = "btrfs"
        KERNEL_FEATURES_append = " cfg/fs/btrfs "
    in local.conf
2. build core-image-minimal image and boot up it

The image could not be built.
Bitbake output:
| Size after prelinking 8364.
| Error: error checking /home/zeeblex/tests_poky/poky/build/tmp/deploy/images/core-image-minimal-qemux86-64-SMALL VOLUME: forcing mixed metadata/data groups
| WARNING: /home/zeeblex/tests_poky/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/run.do_rootfs.21989:1 exit 1 from
|   mkfs.btrfs -b `expr ${ROOTFS_SIZE} \* 1024` -r /home/zeeblex/tests_poky/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs /home/zeeblex/tests_poky/poky/build/tmp/deploy/images/core-image-minimal-qemux86-64-20130909105140.rootfs.btrfs
| ERROR: Function failed: do_rootfs (log file is located at /home/zeeblex/tests_poky/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.21989)
ERROR: Task 7 (/home/zeeblex/tests_poky/poky/meta/recipes-core/images/core-image-minimal.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1674 tasks of which 1673 didn't need to be rerun and 1 failed.


Attached you can find the complete log file.
Comment 1 Saul Wold 2013-09-25 22:16:04 UTC
I have been in touch with Chris Mason, even sent him a rootfs tarball that was 
failing, I will ping him tomorrow, there appears to be a couple of issues right 
now with the tools, first is the file needs to exist first, that's the failure 
we see here, but once we go beyond that, it seems pseudo provides the wrong 
size info with ftw and then there is the asstertion failure which I am working 
with Chris mason on.
Comment 3 Saul Wold 2013-11-21 23:20:25 UTC
*** Bug 5578 has been marked as a duplicate of this bug. ***
Comment 4 Ionut Chisanovici 2013-11-26 16:03:01 UTC
It seems that this issue is not solved.

Clean environment, latest master commit, bitbake core-image-minimal
Local.conf: 
IMAGE_FSTYPES = "btrfs"
KERNEL_FEATURES_append = " cfg/fs/btrfs "

Build Configuration:
BB_VERSION        = "1.21.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-19"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.5+snapshot-20131126"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "master:1e084f9d755e3458d2f9863382fa3bb7877a146d"


Errors encountered:

| Running intercept scripts:
| WARNING: The license listed MIT was not in the licenses collected for packagegroup-core-boot
| log_check: Using /home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.12607 as logfile
| Logfile is clean
|  Removing any system startup links for run-postinsts ...
|   /home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/rcS.d/S99run-postinsts
|  Removing any system startup links for run-postinsts ...
| Building feeds for [poky]..
| executing: ldconfig -r /home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs -c new -v
| /lib:
| 	libpthread.so.0 -> libpthread-2.18.so
| 	libnss_dns.so.2 -> libnss_dns-2.18.so
| 	libutil.so.1 -> libutil-2.18.so
| 	libnss_files.so.2 -> libnss_files-2.18.so
| 	libdl.so.2 -> libdl-2.18.so
| 	libcrypt.so.1 -> libcrypt-2.18.so
| 	librt.so.1 -> librt-2.18.so
| 	ld-linux.so.2 -> ld-2.18.so
| 	libBrokenLocale.so.1 -> libBrokenLocale-2.18.so
| 	libc.so.6 -> libc-2.18.so
| 	libresolv.so.2 -> libresolv-2.18.so
| 	libm.so.6 -> libm-2.18.so
| 	libnss_compat.so.2 -> libnss_compat-2.18.so
| 	libnsl.so.1 -> libnsl-2.18.so
| 	libanl.so.1 -> libanl-2.18.so
| 	libz.so.1 -> libz.so.1.2.8
| 	libblkid.so.1 -> libblkid.so.1.1.0
| 	libuuid.so.1 -> libuuid.so.1.3.0
| /usr/lib:
| 	libkmod.so.2 -> libkmod.so.2.2.5
| saving cache in little endian encoding
| Size before prelinking 6112.
| Size after prelinking 6192.
| Turning ON incompat feature 'mixed-bg': mixed data and metadata block groups
| Turning ON incompat feature 'extref': increased hardlink limit per file to 65536
| mkfs.btrfs: extent-tree.c:2682: btrfs_reserve_extent: Assertion `!(ret)' failed.
| SMALL VOLUME: forcing mixed metadata/data groups
| SMALL VOLUME: forcing mixed metadata/data groups
| 
| WARNING! - Btrfs v0.20-rc1-596-ge9ac73b-dirty IS EXPERIMENTAL
| WARNING! - see http://btrfs.wiki.kernel.org before using
| 
| Created a data/metadata chunk of size 3735552
| fs created label (null) on /home/ionut/work/poky/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86-20131126152124.rootfs.btrfs
| 	nodesize 4096 leafsize 4096 sectorsize 4096 size 36.00MiB
| Btrfs v0.20-rc1-596-ge9ac73b-dirty
| /home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/run.do_rootfs.12607: line 104: 19288 Aborted                 (core dumped) mkfs.btrfs -b `expr ${ROOTFS_SIZE} \* 1024` -r /home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs /home/ionut/work/poky/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86-20131126152124.rootfs.btrfs
| WARNING: /home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/run.do_rootfs.12607:1 exit 134 from
|   mkfs.btrfs -b `expr ${ROOTFS_SIZE} \* 1024` -r /home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs /home/ionut/work/poky/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86-20131126152124.rootfs.btrfs
| ERROR: Function failed: do_rootfs (log file is located at /home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.12607)
ERROR: Task 7 (/home/ionut/work/poky/meta/recipes-core/images/core-image-minimal.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2230 tasks of which 297 didn't need to be rerun and 1 failed.
No currently running tasks (2230 of 2231)

Summary: 1 task failed:
  /home/ionut/work/poky/meta/recipes-core/images/core-image-minimal.bb, do_rootfs
Summary: There were 2 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Cheers,
Ionut C
Comment 5 Saul Wold 2013-12-05 20:26:30 UTC
Can you confirm this on a machine other than the F-19, I am wondering if it's 
related to that.  I am able to build on my machines and can not reproduce this, 
and really this should be a new bug as the failure is different than the 
orignal failure.
Comment 6 Ionut Chisanovici 2013-12-06 08:24:32 UTC
This is happening on Ubuntu 13 as well.

Ionut C
Comment 7 Saul Wold 2014-02-20 21:24:35 UTC
Is this still an issue in the latest M3 rc* images?  I am able to build and 
boot core-image-minimal as of today.
Comment 8 Ionut Chisanovici 2014-02-21 07:24:01 UTC
(In reply to comment #7)
> Is this still an issue in the latest M3 rc* images?  I am able to build and 
> boot core-image-minimal as of today.

Hi Saul,

Yes, the issue is still present.
Just tried the build yesterday during the full pass, using 54562006c1327c5b99daa4cc05a3ba7e38412da1 commit for poky (the 1.6_M3.rc2 commit) and it was failing with the same error.

Cheers,
Ionut C
Comment 9 Ionut Chisanovici 2014-02-21 08:00:45 UTC
(In reply to comment #7)
> Is this still an issue in the latest M3 rc* images?  I am able to build and 
> boot core-image-minimal as of today.

Hi Saul,

As we speak,

Local.conf with: 
MACHINE ?? = "qemux86"
IMAGE_FSTYPES = "btrfs"
KERNEL_FEATURES_append = " cfg/fs/btrfs "
SRCREV_pn-btrfs-tools = "${AUTOREV}"


$ bitbake core-image-minimal
Parsing recipes: 100% |#######################################################################################################| Time: 00:00:11
Parsing of 853 .bb files complete (0 cached, 853 parsed). 1214 targets, 35 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.21.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-13.10"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.5+snapshot-20140221"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-yocto
meta-yocto-bsp    = "master:54562006c1327c5b99daa4cc05a3ba7e38412da1"

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Error: The image creation script '/home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/create_image.btrfs' returned 134:
SMALL VOLUME: forcing mixed metadata/data groups
SMALL VOLUME: forcing mixed metadata/data groups

WARNING! - Btrfs v3.12-dirty IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

Created a data/metadata chunk of size 3735552
fs created label (null) on /home/ionut/work/poky/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86-20140221074254.rootfs.btrfs
        nodesize 4096 leafsize 4096 sectorsize 4096 size 36.00MiB
Btrfs v3.12-dirty
WARNING: exit code 134 from a shell command.

ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.16000
ERROR: Task 7 (/home/ionut/work/poky/meta/recipes-core/images/core-image-minimal.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1895 tasks of which 1634 didn't need to be rerun and 1 failed.
No currently running tasks (1895 of 1896)

Summary: 1 task failed:
  /home/ionut/work/poky/meta/recipes-core/images/core-image-minimal.bb, do_rootfs
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.


Local.conf with: 
MACHINE ?? = "qemux86"
IMAGE_FSTYPES = "btrfs"
KERNEL_FEATURES_append = " cfg/fs/btrfs "


$ bitbake core-image-minimal
Parsing recipes: 100% |#######################################################################################################| Time: 00:00:10
Parsing of 853 .bb files complete (0 cached, 853 parsed). 1214 targets, 35 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.21.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-13.10"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.5+snapshot-20140221"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta
meta-yocto
meta-yocto-bsp    = "master:54562006c1327c5b99daa4cc05a3ba7e38412da1"

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Error: The image creation script '/home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/create_image.btrfs' returned 134:
SMALL VOLUME: forcing mixed metadata/data groups
SMALL VOLUME: forcing mixed metadata/data groups

WARNING! - Btrfs v3.12-dirty IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

Created a data/metadata chunk of size 3735552
fs created label (null) on /home/ionut/work/poky/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86-20140221075507.rootfs.btrfs
        nodesize 4096 leafsize 4096 sectorsize 4096 size 36.00MiB
Btrfs v3.12-dirty
WARNING: exit code 134 from a shell command.

ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/ionut/work/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.29588
ERROR: Task 7 (/home/ionut/work/poky/meta/recipes-core/images/core-image-minimal.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1895 tasks of which 1644 didn't need to be rerun and 1 failed.
No currently running tasks (1894 of 1896)

Summary: 1 task failed:
  /home/ionut/work/poky/meta/recipes-core/images/core-image-minimal.bb, do_rootfs
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.


ENV:

$ env
LC_PAPER=ro_RO.UTF-8
LC_ADDRESS=ro_RO.UTF-8
XDG_SESSION_ID=3
LC_MONETARY=ro_RO.UTF-8
TERM=xterm
SHELL=/bin/bash
XDG_SESSION_COOKIE=79c5e4f6b4d426d70611d1f757b59c5a-1392968263.300837-1549040288
SSH_CLIENT=10.252.25.129 64089 22
LC_NUMERIC=ro_RO.UTF-8
OLDPWD=/home/ionut/work/poky
SSH_TTY=/dev/pts/1
http_proxy=http://proxy-ir.intel.com:911/
USER=ionut
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
LC_TELEPHONE=ro_RO.UTF-8
ftp_proxy=http://proxy-ir.intel.com:911/
MAIL=/var/mail/ionut
PATH=/home/ionut/work/poky/scripts:/home/ionut/work/poky/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
LC_IDENTIFICATION=ro_RO.UTF-8
PWD=/home/ionut/work/poky/build
socks_proxy=http://proxy-ir.intel.com:1080/
LANG=en_US.UTF-8
LC_MEASUREMENT=ro_RO.UTF-8
https_proxy=http://proxy-ir.intel.com:911/
BUILDDIR=/home/ionut/work/poky/build
SHLVL=1
HOME=/home/ionut
no_proxy=127.0.0.1,localhost,10.237.112.100,10.237.112.202,intel.com
LOGNAME=ionut
SSH_CONNECTION=10.252.25.129 64089 10.237.105.66 22
LESSOPEN=| /usr/bin/lesspipe %s
XDG_RUNTIME_DIR=/run/user/1000
LESSCLOSE=/usr/bin/lesspipe %s %s
LC_TIME=ro_RO.UTF-8
BB_ENV_EXTRAWHITE=MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR
LC_NAME=ro_RO.UTF-8
_=/usr/bin/env

$ cat /etc/issue
Ubuntu 13.10 \n \l

$ uname -a
Linux ionut-ubuntu 3.11.0-17-generic #31-Ubuntu SMP Mon Feb 3 21:52:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Cheers,
Ionut C
Comment 10 Saul Wold 2014-02-27 13:44:25 UTC
We may have finally tracked this down, it seems that with images smaller than 
70M btrfs just failes with the assert abive, between 70 and 100, and image is 
created, but unuseable.  Any image with 100M or larger seems to work correclty.
Comment 12 Ionut Chisanovici 2014-04-15 12:54:26 UTC
This is fixed and verified.

Ionut C