[poky] ERROR: Execution of event handler 'run_buildstats' failed on non-local storage

Saul Wold sgw at linux.intel.com
Mon Nov 28 09:34:54 PST 2011


On 11/28/2011 09:22 AM, Derek Browne wrote:
> Hi all,
>
> I have run into an issue completing a build on non-local storage(NFS).
>
> Current configuration:
> Poky Edison branch with commit revision :
> c5bdef56175c0b6863e3d588a5a2c23cbea7b568
> Using the default local.conf configuration(qemux86) with a build
> target of core-image-minimal.
>
> An error is thrown at the beginning of the build:
>
> ERROR: Execution of event handler 'run_buildstats' failed
> Traceback (most recent call last):
>    File "run_buildstats(e)", line 18, in
> run_buildstats(e=<bb.event.BuildStarted object at 0x11c3450>)
>    File "buildstats.bbclass", line 21, in
> set_device(e=<bb.event.BuildStarted object at 0x11c3450>)
> UnboundLocalError: local variable 'rdev' referenced before assignment
>
This has been fixed in Master see

  http://bugzilla.pokylinux.org/show_bug.cgi?id=1700

This should be a candidate for the 1.1.1 stable branch being worked on 
currently also.

The fix should apply to your version of buildstats.bbclass.

Sau!

> The build then continues with the initial 126 host dependency build
> tasks, which makes it very easy to miss the error output. The build
> then stops when the 126 initial build tasks are completed and does not
> continue.
>
> Due to the build being performed on non-local storage as apposed to a
> physical drive, the build cannot access the disk statistics via
> /proc/diskstats.
>
> To make the build continue, a hack had to be introduced to the
> /poky/meta/classes/buildstats.bbclass .The disk device(rdev) was hard
> coded to an available physical drive sda1. As shown below:
>
> diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
> index 55cbb3c..8718e79 100644
> --- a/meta/classes/buildstats.bbclass
> +++ b/meta/classes/buildstats.bbclass
> @@ -52,6 +52,7 @@ def set_device(e):
>       device=os.stat(tmpdir)
>       majordev=os.major(device.st_dev)
>       minordev=os.minor(device.st_dev)
> +    rdev = "sda1"
>       for line in open("/proc/diskstats", "r"):
>           if majordev == int(line.split()[0]) and minordev ==
> int(line.split()[1]):
>              rdev=line.split()[2]
>
>
> This allows the build to run to completion. Should I report this as a
> bug via bugzilla ?
>
> Thanks,
> Derek
> _______________________________________________
> poky mailing list
> poky at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>



More information about the poky mailing list