Doing a clean build (new build directory created) of an image for x86, I get the following: NOTE: Started PRServer with DBfile: /home/user/git/poky/build/cache/prserv.sql ite3, IP: 127.0.0.1, PORT: 33824, PID: 1702 ERROR: PRservice 127.0.0.1:33824 not available Summary: There was 1 ERROR message shown, returning a non-zero exit code. timed out conf/local.conf contains the following relevant additional options: BB_NUMBER_THREADS = "8" PARALLEL_MAKE = "-j 8" PRSERV_HOST = "localhost:0" Using poky master 4fd453ef7cd2e7e2b1d72284440dac574603ed27.
I have git bisected the error to http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=da6260f95f4adcca22da9b0d5fb26e93c0a2517f: commit da6260f95f4adcca22da9b0d5fb26e93c0a2517f Author: Jason Wessel <jason.wessel@windriver.com> Date: Tue Aug 27 15:12:55 2013 -0500 bitbake: serv.py: Fix hang when spawned dynamically with bitbake
Is there any data in the cache/prserv.log? If there is a traceback, that is the problem.
diff --git a/lib/prserv/serv.py b/lib/prserv/serv.py index 8a32122..2533782 100644 --- a/lib/prserv/serv.py +++ b/lib/prserv/serv.py @@ -146,7 +146,7 @@ class PRServer(SimpleXMLRPCServer): # Clear out all log handlers prior to the fork() to avoid calling # event handlers not part of the PRserver for logger_iter in logging.Logger.manager.loggerDict.keys(): - logger_iter.handlers = [] + logging.getLogger(logger_iter).handlers = [] # Ensure logging makes it to the logfile streamhandler = logging.StreamHandler()
(In reply to comment #2) > Is there any data in the cache/prserv.log? > > If there is a traceback, that is the problem. cache/prserve.log contains: Process ProcessServer-1: Traceback (most recent call last): File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/home/user/git/poky/bitbake/lib/bb/server/process.py", line 96, in run bb.cooker.server_main(self.cooker, self.main) File "/home/user/git/poky/bitbake/lib/bb/cooker.py", line 1261, in server_main cooker.pre_serve() File "/home/user/git/poky/bitbake/lib/bb/cooker.py", line 1237, in pre_serve self.prhost = prserv.serv.auto_start(self.data) File "/home/user/git/poky/bitbake/lib/prserv/serv.py", line 296, in auto_start singleton.start() File "/home/user/git/poky/bitbake/lib/prserv/serv.py", line 178, in start self.prserv.start() File "/home/user/git/poky/bitbake/lib/prserv/serv.py", line 101, in start pid = self.daemonize() File "/home/user/git/poky/bitbake/lib/prserv/serv.py", line 149, in daemonize logger_iter.handlers = [] AttributeError: 'str' object has no attribute 'handlers'
(In reply to comment #3) > diff --git a/lib/prserv/serv.py b/lib/prserv/serv.py > index 8a32122..2533782 100644 > --- a/lib/prserv/serv.py > +++ b/lib/prserv/serv.py > @@ -146,7 +146,7 @@ class PRServer(SimpleXMLRPCServer): > # Clear out all log handlers prior to the fork() to avoid calling > # event handlers not part of the PRserver > for logger_iter in logging.Logger.manager.loggerDict.keys(): > - logger_iter.handlers = [] > + logging.getLogger(logger_iter).handlers = [] > > # Ensure logging makes it to the logfile > streamhandler = logging.StreamHandler() That patch fixes it.
Resolved with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=84708a45247fcdd08212b479a0b051281bd41204
Verified with: poky:84708a45247fcdd08212b479a0b051281bd41204 . I have run bitbake many times and each time a different port is open (e.g. localhost:51879, localhost:50064, localhost:50361), PRSERVICE being available everytime.