Bug 1464 - multiple bitbake processes sharing some global data
Summary: multiple bitbake processes sharing some global data
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.2
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-09-09 01:04 UTC by Martin Jansa
Modified: 2011-11-10 04:22 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.