From: Hongxu Jia <hongxu.jia@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: bitbake-devel@lists.openembedded.org, Zhangle.Yang@windriver.com
Subject: Re: [PATCH 1/1] bitbake: runqueue: catch hashvalidate error in RunQueueExecuteScenequeue
Date: Wed, 27 Aug 2014 22:16:18 +0800 [thread overview]
Message-ID: <53FDE832.8060207@windriver.com> (raw)
In-Reply-To: <1409148322.5772.52.camel@ted>
On 08/27/2014 10:05 PM, Richard Purdie wrote:
> On Wed, 2014-08-27 at 21:57 +0800, Hongxu Jia wrote:
>> We need to catch the failure of self.rq.hashvalidate which invoked
>> in RunQueueExecuteScenequeue, and exit in a normal build.
>>
>> So we raise and except bb.BBHandledException for this specific error.
>>
>> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
>> ---
>> bitbake/lib/bb/runqueue.py | 16 +++++++++++++---
>> 1 file changed, 13 insertions(+), 3 deletions(-)
>>
>> diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
>> index e13dc57..59e4188 100644
>> --- a/bitbake/lib/bb/runqueue.py
>> +++ b/bitbake/lib/bb/runqueue.py
>> @@ -1046,7 +1046,14 @@ class RunQueue:
>> self.state = runQueueComplete
>> else:
>> self.start_worker()
>> - self.rqexe = RunQueueExecuteScenequeue(self)
>> + try:
>> + self.rqexe = RunQueueExecuteScenequeue(self)
>> + except bb.BBHandledException:
>> + # While hashvalidate failed, we need exit the normal build.
>> + self.state = runQueueComplete
>> + except:
>> + logger.error("RunQueueExecuteScenequeue init failed")
>> + raise
> Do you still need to do this with the change below? runqueue didn't
> complete, it failed so the state doesn't seem right...
I want to exit the build peacefully, without too much break messages
if we don't assign the above complete status, we have messages like this:
...
ERROR: Hash validation failed in RunQueueExecuteScenequeue
ERROR: An uncaught exception occured in runqueue, please see the failure
below:
ERROR: Running idle function
Traceback (most recent call last):
try:
> retval = function(self, data, False)
if retval is False:
try:
> retval = rq.execute_runqueue()
except runqueue.TaskFailure as exc:
File "/home/jiahongxu/yocto/poky/bitbake/lib/bb/runqueue.py", line
1103, in RunQueue.execute_runqueue():
try:
> return self._execute_runqueue()
except bb.runqueue.TaskFailure:
File "/home/jiahongxu/yocto/poky/bitbake/lib/bb/runqueue.py", line
1049, in RunQueue._execute_runqueue():
self.start_worker()
> self.rqexe = RunQueueExecuteScenequeue(self)
'''
File "/home/jiahongxu/yocto/poky/bitbake/lib/bb/runqueue.py", line
1838, in RunQueueExecuteScenequeue.__init__(rq=<bb.runqueue.RunQueue
instance at 0x7f509f4bd950>):
logger.error("Hash validation failed in
RunQueueExecuteScenequeue %s" % str(e))
> raise bb.BBHandledException()
BBHandledException
...
Do you have ang ideas about how to exit the build peacefully?
//Hongxu
> Cheers,
>
> Richard
>
>> if self.state in [runQueueSceneRun, runQueueRunning, runQueueCleanUp]:
>> self.dm.check(self)
>> @@ -1821,7 +1828,11 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
>> sq_task.append(task)
>> call = self.rq.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, d)"
>> locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.data }
>> - valid = bb.utils.better_eval(call, locs)
>> + try:
>> + valid = bb.utils.better_eval(call, locs)
>> + except Exception as e:
>> + logger.error("Hash validation failed in RunQueueExecuteScenequeue %s" % str(e))
>> + raise bb.BBHandledException()
>>
>> valid_new = stamppresent
>> for v in valid:
>> @@ -2003,7 +2014,6 @@ class TaskFailure(Exception):
>> def __init__(self, x):
>> self.args = x
>>
>> -
>> class runQueueExitWait(bb.event.Event):
>> """
>> Event when waiting for task processes to exit
>
next prev parent reply other threads:[~2014-08-27 14:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 13:57 [PATCH V4 0/1] bitbake: runqueue: catch hashvalidate error in RunQueueExecuteScenequeue Hongxu Jia
2014-08-27 13:57 ` [PATCH 1/1] " Hongxu Jia
2014-08-27 14:05 ` Richard Purdie
2014-08-27 14:16 ` Hongxu Jia [this message]
2014-08-27 14:35 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53FDE832.8060207@windriver.com \
--to=hongxu.jia@windriver.com \
--cc=Zhangle.Yang@windriver.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox