All of lore.kernel.org
 help / color / mirror / Atom feed
* ERROR: Execution of event handler 'run_buildstats' failed on non-local storage
@ 2011-11-28 17:22 Derek Browne
  2011-11-28 17:34 ` Saul Wold
  0 siblings, 1 reply; 3+ messages in thread
From: Derek Browne @ 2011-11-28 17:22 UTC (permalink / raw)
  To: poky

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

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: ERROR: Execution of event handler 'run_buildstats' failed on non-local storage
  2011-11-28 17:22 ERROR: Execution of event handler 'run_buildstats' failed on non-local storage Derek Browne
@ 2011-11-28 17:34 ` Saul Wold
  2011-11-29 17:44   ` Derek Browne
  0 siblings, 1 reply; 3+ messages in thread
From: Saul Wold @ 2011-11-28 17:34 UTC (permalink / raw)
  To: Derek Browne, Joshua Lock; +Cc: poky

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@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ERROR: Execution of event handler 'run_buildstats' failed on non-local storage
  2011-11-28 17:34 ` Saul Wold
@ 2011-11-29 17:44   ` Derek Browne
  0 siblings, 0 replies; 3+ messages in thread
From: Derek Browne @ 2011-11-29 17:44 UTC (permalink / raw)
  To: poky

Saul Wold <sgw@...> writes:

> 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!
> 

OK, great. I must sharpen my search skills, I wasn't able to find that. Thank 
you for your help.

Derek





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-29 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-28 17:22 ERROR: Execution of event handler 'run_buildstats' failed on non-local storage Derek Browne
2011-11-28 17:34 ` Saul Wold
2011-11-29 17:44   ` Derek Browne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.