[OE-core] [RFC][PATCHv2] cmake.bbclass, perf: don't re-create ${B}

Martin Jansa martin.jansa at gmail.com
Tue Sep 22 05:44:40 UTC 2015


On Mon, Sep 21, 2015 at 09:55:56PM +0100, Burton, Ross wrote:
> On 21 September 2015 at 21:33, Martin Jansa <martin.jansa at gmail.com> wrote:
> 
> > * otherwise there is race-condition between do_configure rm+mkdir and
> >   bitbake trying to use it as CWD for do_populate_lic task, which
> >   results in errors like this:
> >
> 
> It took me a few minutes to understand this race:
> 
> Task A executing perf:do_configure and deleting ${B}
> Task B finishing perf:do_populate_lic and so running the sstate generation
> logic and the functions listed in SSTATEPOSTINSTFUNCS, which get executed
> with the default cwd of ${B}.

Thanks for more detailed explanation, sorry if I wasn't clear on this
one in my previous e-mails.

> I'll note that autotools.bbclass also does rmdir/mkdir ${B} so I'm curious
> why you see it more in perf and cmake and not everything else.

perf for some reason shows this most often, most our internal components are
using cmake, that's probably cmake was easier to find in our logs, but
I didn't grep all of them, maybe there are similar exceptions in
autotools based components. I'll send v3 with autotools.bbclass fix as
well.

> Would a better long-term fix be to pass cwd=${WORKDIR} to exec_func in the
> sstate code to stop the functions being executed in ${B} (after vetting the
> functions, obviously).  FWIW I'm the owner of the bug to stop bitbake
> knowing about ${B} which is leading to exactly this sort of problem.

Yes, I agree it would be better, but as you said, such change is too
late even for master branch and I need to fix this long-standing issue
even in fido and dizzy, so smaller, simpler change will be easier to get
backported.

My for cycle finished 469 iterations over night and no exception since
this fix:
OE @ ~/build/oe-core $ grep "ERROR: Task" log.perf.00*
log.perf.0003:ERROR: Task 7 (/OE/build/oe-core/openembedded-core/meta/recipes-kernel/perf/perf.bb, do_populate_lic) failed with exit code '1'
log.perf.0004:ERROR: Task 7 (/OE/build/oe-core/openembedded-core/meta/recipes-kernel/perf/perf.bb, do_populate_lic) failed with exit code '1'
log.perf.0031:ERROR: Task 7 (/OE/build/oe-core/openembedded-core/meta/recipes-kernel/perf/perf.bb, do_populate_lic) failed with exit code '1'
log.perf.0055:ERROR: Task 7 (/OE/build/oe-core/openembedded-core/meta/recipes-kernel/perf/perf.bb, do_populate_lic) failed with exit code '1'
log.perf.0062:ERROR: Task 7 (/OE/build/oe-core/openembedded-core/meta/recipes-kernel/perf/perf.bb, do_populate_lic) failed with exit code '1'

Regards,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150922/2dab3339/attachment-0002.sig>


More information about the Openembedded-core mailing list