Bug 1464

Summary: multiple bitbake processes sharing some global data
Product: [Build System, Metadata & Runtime] BitBake Reporter: Martin Jansa <Martin.Jansa>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 1.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Martin Jansa 2011-09-09 01:04:40 UTC
Hi, with older bitbake and openembedded it was possible to keep image build running and start another bitbake process (ie to resolve fetch issue of some recipe and it worked OK even with different MACHINE/DISTRO for each process).

Now it fails like this:

1st term: bitbake -k core-image-core
Now when I try to execute another bitbake process
2nd term: bitbake -c fetch -b /OE/shr-core/meta-openembedded/meta-oe/recipes-devtools/klibc/klibc_1.5.25.bb

then image build on 1st terminal fails like this:

NOTE: Running task 4609 of 5278 (ID: 4347, /OE/shr-core/openembedded-core/meta/recipes-devtools/gcc/gcc_4.6.bb, do_compile)
NOTE: package gcc-4.6.1+svnr175454-r12: task do_compile: Started
ERROR: Execution of event handler 'run_buildstats' failed
Traceback (most recent call last):
  File "run_buildstats(e)", line 86, in run_buildstats(e=<bb.build.TaskSucceeded object at 0xbcd1f10>)
  File "buildstats.bbclass", line 5, in write_task_data(status='passed', logfile='/OE/shr-core/tmp/buildstats/klibc-spitz/201109090954/gcc-runtime-4.6.1+svnr175454-r12/do_package', dev='md4', e=<bb.build.TaskSucceeded object at 0xbcd1f10>)
IOError: [Errno 2] No such file or directory: '/OE/shr-core/tmp/buildstats/klibc-spitz/201109090954/gcc-runtime-4.6.1+svnr175454-r12/do_package'

Or some other weird error.

If you cannot run multiple bitbake processes by design then it would be great if 2nd bitbake checks that another bitbake process is already executed and fails to start.

I haven't tried it with different users, but if it fails also with different users then it would make bitbake hard to use on some multiuser build machine.
Comment 1 Richard Purdie 2011-09-09 06:25:01 UTC
You shouldn't be running more than one copy of bitbake within a given build directory. We need to add some locking to prevent that.