Bug 3609 - Space monitoring isn't accurate when using btrfs
Summary: Space monitoring isn't accurate when using btrfs
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4 M5
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-12-15 14:18 UTC by Otavio Salvador
Modified: 2013-04-15 15:23 UTC (History)
10 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
Proposed patch to avoid spamming the console about disabled inode check (1.76 KB, patch)
2013-04-03 14:19 UTC, Reinhard Tartler
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Otavio Salvador 2012-12-15 14:18:38 UTC
My build fails to start with:

WARNING: The free inode of rootfs is running low (0.000K left)
ERROR: Immediately abort since the disk space monitor action is "ABORT"!
ERROR: Unknown event: <bb.event.DiskFull object at 0x5835890>

While this is the information provided by btrfs:

#: btrfs fi show
Label: none  uuid: 7cb93c73-10d0-4e8a-8842-faf9acc36723
	Total devices 1 FS bytes used 43.76GB
	devid    1 size 104.59GB used 60.13GB path /dev/dm-0

#: btrfs fi df /
Data: total=54.00GB, used=42.76GB
System, DUP: total=64.00MB, used=16.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=3.00GB, used=1.00GB
Comment 1 Michael Halstead 2013-02-10 15:23:51 UTC
I ran into this as well when testing Fedora 18.

In bitbake/lib/bb/monitordisk.py os.statvfs() returns something like this
posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=1463552256, f_bfree=1462581245, f_bavail=1403968441, f_files=0, f_ffree=0, f_favail=0, f_flag=4096, f_namemax=255)

Which leads to the build being aborted.

NOTE: Executing SetScene Tasks
WARNING: The free inode of /dev/sda4 is running low (0.000K left)
ERROR: Immediately abort since the disk space monitor action is "ABORT"!
ERROR: Unknown event: <bb.event.DiskFull object at 0x15fb710>
Comment 3 Robert Yang 2013-02-18 02:35:13 UTC
(In reply to comment #2)
> Merged into master:
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> ?id=86ac3b53b5ea9d74edab975adad9c831055da0ed

Fix the url:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b0587077a47b2af0d88e17613fb48787e4c11716
Comment 4 Otavio Salvador 2013-02-18 11:40:13 UTC
I understand you should warn the user about this but I'd expect it to be done once and not ask user to remove the inode checking by him/herself.
Comment 5 Robert Yang 2013-03-08 03:14:31 UTC
(In reply to comment #4)
> I understand you should warn the user about this but I'd expect it to be
> done once and not ask user to remove the inode checking by him/herself.


Sorry for the late reponse, yes, the inode checking will be warned once and removed automatically , since the fs like btrs create the inode dynamically.
Comment 6 Yi Zhao 2013-03-12 09:07:25 UTC
Verified with master branch: 365eb9b5d22208c967dcd91d8ab52faed20f04b5

##############
[yocto@yocto-linux build]$ bitbake man
Pseudo is not present but is required, building this first before the main build
Parsing recipes: 100% |##################################################################################################################################################| Time: 00:00:12
Parsing of 810 .bb files complete (0 cached, 810 parsed). 1118 targets, 27 skipped, 0 masked, 0 errors.

Build Configuration:
BB_VERSION        = "1.17.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Unknown"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.3+snapshot-20130312"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "master:365eb9b5d22208c967dcd91d8ab52faed20f04b5"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
WARNING: The free space of /dev/sdb1 is running low (17.354GB left)
ERROR: Immediately abort since the disk space monitor action is "ABORT"!
WARNING: Inode check for /dev/sdb1 is unavaliable, remove it from disk monitor
NOTE: Tasks Summary: Attempted 9 tasks of which 9 didn't need to be rerun and all succeeded.
################
Comment 7 Stefan Stanacar 2013-03-28 09:57:44 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > I understand you should warn the user about this but I'd expect it to be
> > done once and not ask user to remove the inode checking by him/herself.
> 
> 
> Sorry for the late reponse, yes, the inode checking will be warned once and
> removed automatically , since the fs like btrs create the inode dynamically.

I'm sorry to reopen this, but the warning stuff it's broken again on latest master (cbdbc54e5743944fd24f497b46b3c54ad966d8eb) or the 1.4_M5 branch (
On the commit Yi checked (cbdbc54e5743944fd24f497b46b3c54ad966d8eb) it does show only one warning but now it shows again too many warnings for each task when using btrfs.

Default local.conf btw:

Build Configuration:
BB_VERSION        = "1.17.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "openSUSE-project-12.3"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.3+snapshot-20130328"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "1.4_M5:860e758b7b7f27fbb47c645770593206c7453c1b"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
WARNING: Inode check for /home/stefans/poky/build/sstate-cache is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/downloads is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/tmp is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/sstate-cache is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/downloads is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/tmp is unavaliable, will remove it from disk monitor
NOTE: Executing RunQueue Tasks
WARNING: Inode check for /home/stefans/poky/build/sstate-cache is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/downloads is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/tmp is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/sstate-cache is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/downloads is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/tmp is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/sstate-cache is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/downloads is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/tmp is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/sstate-cache is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/downloads is unavaliable, will remove it from disk monitor
WARNING: Inode check for /home/stefans/poky/build/tmp is unavaliable, will remove it from disk monitor
Comment 8 Reinhard Tartler 2013-04-03 14:19:06 UTC
Created attachment 1154 [details]
Proposed patch to avoid spamming the console about disabled inode check

In order to avoid spamming the console with warnings, make it print at most once
Comment 9 Robert Yang 2013-04-15 09:05:09 UTC
(In reply to comment #8)
> Created attachment 1154 [details]
> Proposed patch to avoid spamming the console about disabled inode check
> 
> In order to avoid spamming the console with warnings, make it print at most
> once

Thanks, I've sent a patch to bitbake-devel:

http://lists.linuxtogo.org/pipermail/bitbake-devel/2013-April/004292.html
Comment 10 Richard Purdie 2013-04-15 15:23:28 UTC
Robert's patch merged to master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=612c25c59718d3b7a259ae72430544c2f6e369fc