Hash Equiv rehash problems
We have a small problem with hash equiv. I've spent quite a lot of time staring at broken builds trying to figure out what is happening and its not even easy to explain. The easiest example I have is perhaps this:
https://autobuilder.yoctoproject.org/typhoon/#/builders/59/builds/1260
where the eSDK is failing as meta-extsdk-toolchain can't be installed into the eDSK.
Its easy enough to reproduce from the build artefacts:
pokybuild@debian8-ty-1:/tmp$ ~/yocto-worker/qemux86/build/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-32-qemux86-toolchain-ext-3.0.sh Poky (Yocto Project Reference Distro) Extensible SDK installer version 3.0 ========================================================================== Enter target directory for SDK (default: ~/poky_sdk): /tmp/rptest [...] pokybuild@debian8-ty-1:/tmp$ . /tmp/rptest/environment-setup-core2-32-poky-linux SDK environment now set up; additionally you may now run devtool to perform development tasks. Run devtool --help for further details. pokybuild@debian8-ty-1:/tmp$ devtool sdk-install meta-extsdk-toolchain NOTE: Starting bitbake server... Loading cache: 100% |###############################################################################################################################| Time: 0:00:00 Loaded 1302 entries from dependency cache. INFO: Installing meta-extsdk-toolchain... Loading cache: 100% |###############################################################################################################################| Time: 0:00:00 Loaded 1302 entries from dependency cache. NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |##########################################################################################################################| Time: 0:00:00 Checking sstate mirror object availability: 100% |##################################################################################################| Time: 0:00:00 Sstate summary: Wanted 53 Found 50 Missed 3 Current 133 (94% match, 98% complete) NOTE: Executing Tasks NOTE: Setscene tasks completed NOTE: Tasks Summary: Attempted 0 tasks of which 0 didn't need to be rerun and all succeeded. ERROR: Failed to install meta-extsdk-toolchain - unavailable
[adding -s allows it to work, it doesn't build much]
The interesting bit is to look back at the original build logs:
[meta-extsdk-toolchain comes from the sstate cache]
NOTE: Task /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-devtools/gdb/gdb-cross_8.3.1.bb:do_populate_sysroot unihash changed to 577ad44bb0150016da775bda4d1eadbad665a3714e9ad9c4a2b3d28d0f20a28b
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_package_qa so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_packagedata so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_package so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_package_write_ipk so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_package_write_deb so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_package_write_rpm so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_populate_sysroot so ignoring rehash
NOTE: Running task 8970 of 8974 (/home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_locked_sigs)
NOTE: Running task 8971 of 8974 (/home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/images/core-image-minimal.bb:do_sdk_depends)
NOTE: Running task 8972 of 8974 (/home/pokybuild/yocto-worker/qemux86/build/meta/recipes-sato/images/core-image-sato.bb:do_sdk_depends)
NOTE: recipe meta-extsdk-toolchain-1.0-r0: task do_locked_sigs: Started
NOTE: recipe core-image-minimal-1.0-r0: task do_sdk_depends: Started
NOTE: recipe meta-extsdk-toolchain-1.0-r0: task do_locked_sigs: Succeeded
NOTE: recipe core-image-sato-1.0-r0: task do_sdk_depends: Started
NOTE: recipe core-image-minimal-1.0-r0: task do_sdk_depends: Succeeded
NOTE: recipe core-image-sato-1.0-r0: task do_sdk_depends: Succeeded
NOTE: recipe buildtools-tarball-1.0-r0: task do_populate_sdk: Succeeded
NOTE: Running task 8973 of 8974 (/home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/images/core-image-minimal.bb:do_populate_sdk_ext)
NOTE: Running task 8974 of 8974 (/home/pokybuild/yocto-worker/qemux86/build/meta/recipes-sato/images/core-image-sato.bb:do_populate_sdk_ext)
NOTE: recipe core-image-minimal-1.0-r0: task do_populate_sdk_ext: Started
NOTE: recipe core-image-sato-1.0-r0: task do_populate_sdk_ext: Started
NOTE: recipe core-image-sato-1.0-r0: task do_populate_sdk: Succeeded
NOTE: recipe core-image-sato-1.0-r0: task do_populate_sdk_ext: Succeeded
NOTE: recipe core-image-minimal-1.0-r0: task do_populate_sdk_ext: Succeeded
NOTE: Tasks Summary: Attempted 8974 tasks of which 8939 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 6 seconds
What this means is that gdb-cross changes the sstate hash of meta- extsdk-toolchain:do_* as it found an equiv match but those artefacts were never generated. That hash was written into the eSDK sigs but it isn't present in sstate.
I did put a comment in runqueue.py a while back:
# Potentially risky, should we report this hash as a match? logger.info("Already covered setscene for %s so ignoring rehash" % (tid))
and it does re-raise this question.
There may be two possible fixes:
a) We force setscene tasks which have already run to rerun if this kind of rehash happens. We did previously do this but runqueue *really* doesn't like rerunning setscene tasks.
b) We report these 'additional' equivalences to the server
We are seeing other symptoms of this "rehashing" in builds where "bitbake X; bitbake X" will suddenly rebuild a load of stuff in the second build as it didn't build it originally due to the "ignoring rehash" messages. This is very counter-intuitive and effectively a different representation of the same bug. Its less problematic since we just rebuild things (eSDK can't).
If we decide b) is correct, it also raises an interesting scope question. Should we:
a) only report things we've run into in real builds
b) report all hashes (there'd be loads)
c) report all hashes which are present in sstate
?
I think I need to sit and think about this for a while. Ccing Joshua in case he has any insights into this...
We can't enable hashequiv by default until we get this fixed somehow.
Cheers,
Richard
Quoted 14 lines · Richard Purdie
There may be two possible fixes:
a) We force setscene tasks which have already run to rerun if this kind of rehash happens. We did previously do this but runqueue *really* doesn't like rerunning setscene tasks.
b) We report these 'additional' equivalences to the serverWe are seeing other symptoms of this "rehashing" in builds where "bitbake X; bitbake X" will suddenly rebuild a load of stuff in the second build as it didn't build it originally due to the "ignoring rehash" messages. This is very counter-intuitive and effectively a different representation of the same bug. Its less problematic since we just rebuild things (eSDK can't).
Quoted 6 lines
If we decide b) is correct, it also raises an interesting scope question. Should we:
a) only report things we've run into in real builds
b) report all hashes (there'd be loads)
c) report all hashes which are present in sstate
With some of the things I've been thinking of, specifically a combination PR, sstate-cache server and hash equivalency server, (C) is what I was thinking of.
I've already talked to you about this, but for others who might not know why.
PR Service and sstate-cache files need to be in sync otherwise the packages that are produced (new builds) and re-used together otherwise image installs can and will fail.
With the new hash equivalency, determining which of the hashes to use for any particular part of the system, all three really need to be in sync.
This is also useful for a binary distribution -> eSDK (DevTool) -> full Yocto Project supported system. You need all three sets of artifacts collected together to make a transition from one to another in order to change the configuration or add more stuff.
(Additionally you could actually validate the contents of the sstate-cache and hash/hash-equivalency. Multiple builds can feed into it, and the system can validate the artifacts are actually the same or blacklist certain hashes as non-deterministic.)
-Mark
Quoted 15 lines
?
I think I need to sit and think about this for a while. Ccing Joshua in case he has any insights into this...
We can't enable hashequiv by default until we get this fixed somehow.
Cheers,
Richard
Quoted 70 lines · Richard Purdie
We have a small problem with hash equiv. I've spent quite a lot of time staring at broken builds trying to figure out what is happening and its not even easy to explain. The easiest example I have is perhaps this:
https://autobuilder.yoctoproject.org/typhoon/#/builders/59/builds/1260
where the eSDK is failing as meta-extsdk-toolchain can't be installed into the eDSK.
Its easy enough to reproduce from the build artefacts:
pokybuild@debian8-ty-1:/tmp$ ~/yocto-worker/qemux86/build/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-32-qemux86-toolchain-ext-3.0.sh Poky (Yocto Project Reference Distro) Extensible SDK installer version 3.0 ========================================================================== Enter target directory for SDK (default: ~/poky_sdk): /tmp/rptest [...] pokybuild@debian8-ty-1:/tmp$ . /tmp/rptest/environment-setup-core2-32-poky-linux SDK environment now set up; additionally you may now run devtool to perform development tasks. Run devtool --help for further details. pokybuild@debian8-ty-1:/tmp$ devtool sdk-install meta-extsdk-toolchain NOTE: Starting bitbake server... Loading cache: 100% |###############################################################################################################################| Time: 0:00:00 Loaded 1302 entries from dependency cache. INFO: Installing meta-extsdk-toolchain... Loading cache: 100% |###############################################################################################################################| Time: 0:00:00 Loaded 1302 entries from dependency cache. NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |##########################################################################################################################| Time: 0:00:00 Checking sstate mirror object availability: 100% |##################################################################################################| Time: 0:00:00 Sstate summary: Wanted 53 Found 50 Missed 3 Current 133 (94% match, 98% complete) NOTE: Executing Tasks NOTE: Setscene tasks completed NOTE: Tasks Summary: Attempted 0 tasks of which 0 didn't need to be rerun and all succeeded. ERROR: Failed to install meta-extsdk-toolchain - unavailable[adding -s allows it to work, it doesn't build much]
The interesting bit is to look back at the original build logs:
[meta-extsdk-toolchain comes from the sstate cache]
NOTE: Task /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-devtools/gdb/gdb-cross_8.3.1.bb:do_populate_sysroot unihash changed to577ad44bb0150016da775bda4d1eadbad665a3714e9ad9c4a2b3d28d0f20a28b
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_package_qa so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_packagedata so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_package so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_package_write_ipk so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_package_write_deb so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_package_write_rpm so ignoring rehash
NOTE: Already covered setscene for /home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_populate_sysroot so ignoring rehash
NOTE: Running task 8970 of 8974 (/home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/meta/meta-extsdk-toolchain.bb:do_locked_sigs)
NOTE: Running task 8971 of 8974 (/home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/images/core-image-minimal.bb:do_sdk_depends)
NOTE: Running task 8972 of 8974 (/home/pokybuild/yocto-worker/qemux86/build/meta/recipes-sato/images/core-image-sato.bb:do_sdk_depends)
NOTE: recipe meta-extsdk-toolchain-1.0-r0: taskdo_locked_sigs: Started
NOTE: recipe core-image-minimal-1.0-r0: taskdo_sdk_depends: Started
NOTE: recipe meta-extsdk-toolchain-1.0-r0: taskdo_locked_sigs: Succeeded
NOTE: recipe core-image-sato-1.0-r0: taskdo_sdk_depends: Started
NOTE: recipe core-image-minimal-1.0-r0: taskdo_sdk_depends: Succeeded
NOTE: recipe core-image-sato-1.0-r0: taskdo_sdk_depends: Succeeded
NOTE: recipe buildtools-tarball-1.0-r0: taskdo_populate_sdk: Succeeded
NOTE: Running task 8973 of 8974 (/home/pokybuild/yocto-worker/qemux86/build/meta/recipes-core/images/core-image-minimal.bb:do_populate_sdk_ext)
NOTE: Running task 8974 of 8974 (/home/pokybuild/yocto-worker/qemux86/build/meta/recipes-sato/images/core-image-sato.bb:do_populate_sdk_ext)
NOTE: recipe core-image-minimal-1.0-r0: taskdo_populate_sdk_ext: Started
NOTE: recipe core-image-sato-1.0-r0: taskdo_populate_sdk_ext: Started
NOTE: recipe core-image-sato-1.0-r0: taskdo_populate_sdk: Succeeded
NOTE: recipe core-image-sato-1.0-r0: taskdo_populate_sdk_ext: Succeeded
NOTE: recipe core-image-minimal-1.0-r0: taskdo_populate_sdk_ext: Succeeded
NOTE: Tasks Summary: Attempted 8974 tasks of which 8939 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 6 seconds
Quoted 4 lines
What this means is that gdb-cross changes the sstate hash of meta- extsdk-toolchain:do_* as it found an equiv match but those artefacts were never generated. That hash was written into the eSDK sigs but it isn't present in sstate.
So, to summarize and make sure I understand: The eSDK built with hash equivalence enabled doesn't function because it is looking for sstate object that do not exist?
I'm not very familiar with the eSDK, but it doesn't surprise me too much; the locking mechanism used by the eSDK (at least the little I understand), has some overlap with hash equivalence, so it seems like they might not play nice together.
Quoted 6 lines
I did put a comment in
runqueue.pya while back:# Potentially risky, should we report this hash as a match?
logger.info("Already covered setscene for %s so ignoring rehash" % (tid))
Quoted 7 lines
and it does re-raise this question.
There may be two possible fixes:
a) We force setscene tasks which have already run to rerun if this kind of rehash happens. We did previously do this but runqueue *really* doesn't like rerunning setscene tasks.
Do we remember why this is the case? I know we've talked about it off and on, but I don't think we've ever listed out the specific reasons why this doesn't work.
I do know that one of the reasons was that it isn't possible to transition a task from being covered by sstate to being uncovered, because there might be dependent tasks that were completely skipped when the task was restored from sstate (e.g. do_fetch, do_unpack, do_compile, do_install might all get skipped if do_package_setscene is run).
Are there other reasons?
Quoted 1 line
b) We report these 'additional' equivalences to the server
I'll admit, this never sat well with me. I couldn't ever prove why this was "correct" (or, it has been shown to me and I didn't understand :/ ). From a theoretical standpoint, it seems like reporting these hashes as equivalent would be wrong since I'm not necessarily sure we can say that the task would reproduce in an equivalent manner. The implementation of this would, I think, agree with me since the best mechanisms I can think of to implement this on the server side aren't particularly pretty :(.
However, I do think it's possible I'm just missing something, and this isn't as bad as I think.
Quoted 8 lines
We are seeing other symptoms of this "rehashing" in builds where "bitbake X; bitbake X" will suddenly rebuild a load of stuff in the second build as it didn't build it originally due to the "ignoring rehash" messages. This is very counter-intuitive and effectively a different representation of the same bug. Its less problematic since we just rebuild things (eSDK can't).
Quoted 4 lines
If we decide b) is correct, it also raises an interesting scope question. Should we:
a) only report things we've run into in real builds
This would effectively mean only reporting equivalence when we would print the log message "Already covered setscene..."?
Quoted 1 line
b) report all hashes (there'd be loads)
I'm not quite clear on how this would work, can you elaborate?
Quoted 1 line
c) report all hashes which are present in sstate
I'm also not sure how this one would work, can your provide more detail?
Quoted 16 lines
?
I think I need to sit and think about this for a while. Ccing Joshua in case he has any insights into this...
We can't enable hashequiv by default until we get this fixed somehow.
Cheers,
Richard
Quoted 10 lines · Joshua Watt
What this means is that gdb-cross changes the sstate hash of meta-
Quoted 5 lines
extsdk-toolchain:do_* as it found an equiv match but those artefacts
were never generated. That hash was written into the eSDK sigs but it
isn't present in sstate.So, to summarize and make sure I understand: The eSDK built with hash equivalence enabled doesn't function because it is looking for sstate object that do not exist?
Correct.
Its easy to say "that is an SDK problem" however the other case I mentioned "bitbake X; bitbake X" rebuilding a load of things bothers me a lot more.
Quoted 4 lines
I'm not very familiar with the eSDK, but it doesn't surprise me too much; the locking mechanism used by the eSDK (at least the little I understand), has some overlap with hash equivalence, so it seems like they might not play nice together.
Its only a symptom of the bigger problem though and just an easier way to see what is breaking.
Quoted 27 lines
Quoted 6 lines
I did put a comment in
runqueue.pya while back:# Potentially risky, should we report this hash as a match?
logger.info("Already covered setscene for %s so ignoring rehash" % (tid))Quoted 8 lines
and it does re-raise this question.
There may be two possible fixes:
a) We force setscene tasks which have already run to rerun if this kind
of rehash happens. We did previously do this but runqueue *really* doesn't like rerunning setscene tasks.Do we remember why this is the case? I know we've talked about it off and on, but I don't think we've ever listed out the specific reasons why this doesn't work.
I do know that one of the reasons was that it isn't possible to transition a task from being covered by sstate to being uncovered, because there might be dependent tasks that were completely skipped when the task was restored from sstate (e.g.
do_fetch,do_unpack,do_compile,do_installmight all get skipped ifdo_package_setsceneis
run).
Quoted 1 line
Are there other reasons?
I have to admit I don't fully remember the reasons why we went this way but it was something along the lines of rerunning a setscene multiple times in a given build got ugly. Once a setscene has run, other things can run which depend on it and if we then go back and re-run it, what else do we have to rerun.
Put another way, we execute the two different task graphs in opposite directions. Rerunning setscenes that already executed just complicates the graph to the point you can't figure out what to execute.
Quoted 8 lines
Quoted 1 line
b) We report these 'additional' equivalences to the server
I'll admit, this never sat well with me. I couldn't ever prove why this was "correct" (or, it has been shown to me and I didn't understand :/ ). From a theoretical standpoint, it seems like reporting these hashes as equivalent would be wrong since I'm not necessarily sure we can say that the task would reproduce in an equivalent manner.
First, I think I should explain exactly how this is breaking as it was a puzzle to me until I just worked it out.
meta-extsdk-toochain depends on gdb-cross.
gdb-cross runs on the native architecture. On an x86 worker its an x86 binary, on an arm server its an arm binary. We have both servers in our cluster.
sstate handles this fine by having the arch in the artefact name.
This means you have the same input hash generating two different binary artefacts depending upon which arch it was built upon. When you realise that, you start to see where/why this breaks.
meta-extsdk-toolchain builds on one kind of server and hashes go into hash equiv, artefacts to sstate.
When the next build happens on a different native architecture, the sstate artefacts are valid for meta-extsdk-toolchain but the gdb-cross are not. gdb-cross therefore rebuilds which then gets a new hash which then changes the hashes for meta-extsdk-toolchain, invalidating the original artefacts.
The outhash for native binaries on two different arches will never match. sstate assumes we can make the hashes match though.
Quoted 3 lines
The implementation of this would, I think, agree
with me since the best mechanisms I can think of to implement this on the server side aren't particularly pretty :(.
I tried mocking up a patch, included at the end below. Its wrong in that it tries to inject duplicate entries, it needs to check and just return if it would do that. I've run out of time/energy to fix it further tonight but it shows what I'm thinking.
Quoted 2 lines
However, I do think it's possible I'm just missing something, and this isn't as bad as I think.
Maybe, maybe not.
Quoted 8 lines
Quoted 8 lines
We are seeing other symptoms of this "rehashing" in builds where "bitbake X; bitbake X" will suddenly rebuild a load of stuff in the second build as it didn't build it originally due to the "ignoring rehash" messages. This is very counter-intuitive and effectively a different representation of the same bug. Its less problematic since we
just rebuild things (eSDK can't).
Quoted 7 lines
Quoted 4 lines
If we decide b) is correct, it also raises an interesting scope question. Should we:
a) only report things we've run into in real builds
This would effectively mean only reporting equivalence when we would print the log message "Already covered setscene..."?
Yes, see the patch below as this implements that.
Quoted 3 lines
Quoted 1 line
b) report all hashes (there'd be loads)
I'm not quite clear on how this would work, can you elaborate?
Every time the server rehashes there are new hash combinations found. We could argue many are equivalent. We don't want to pollute the database with all of them though.
Quoted 4 lines
Quoted 1 line
c) report all hashes which are present in sstate
I'm also not sure how this one would work, can your provide more detail?
In light of my above analysis this doesn't make so much sense.
Quoted 8 lines
Quoted 8 lines
?
I think I need to sit and think about this for a while. Ccing Joshua in
case he has any insights into this...We can't enable hashequiv by default until we get this fixed somehow.
Patch for adding equiv mapping support to the server follows. Its currently broken as I mention above but shows its at least possible.
Basic idea is to search on the old hash to get the outhash, then mark the new hash as equivalent to that outhash.
Cheers,
Richard
bitbake/lib/bb/runqueue.py +5 -2
@@ -1718,6 +1718,7 @@ class RunQueueExecute: self.sq_deferred = {} self.stampcache = {} + self.rehashes = {} self.holdoff_tasks = set() self.holdoff_need_update = True
@@ -2286,7 +2287,8 @@ class RunQueueExecute: self.rqdata.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(tid, procdep, self.rqdata.dataCaches[mc_from_tid(tid)]) origuni = self.rqdata.runtaskentries[tid].unihash self.rqdata.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(tid) - logger.debug(1, "Task %s hash changes: %s->%s %s->%s" % (tid, orighash, self.rqdata.runtaskentries[tid].hash, origuni, self.rqdata.runtaskentries[tid].unihash)) + self.rehashes[tid] = origuni + #logger.info("Task %s hash changes: %s->%s %s->%s" % (tid, orighash, self.rqdata.runtaskentries[tid].hash, origuni, self.rqdata.runtaskentries[tid].unihash)) next |= self.rqdata.runtaskentries[tid].revdeps changed.add(tid) total.remove(tid)
@@ -2314,7 +2320,8 @@ class RunQueueExecute: if tid in self.scenequeue_covered or tid in self.sq_live: # Already ran this setscene task or it running - # Potentially risky, should we report this hash as a match? + # Potentially risky, should we report this hash as a match + bb.parse.siggen.report_unihash_equiv(tid, self.rehashes[tid], self.rqdata.runtaskentries[tid].unihash) logger.info("Already covered setscene for %s so ignoring rehash" % (tid)) self.pending_migrations.remove(tid) continue
bitbake/lib/bb/siggen.py +8 -0
@@ -524,6 +524,14 @@ class SignatureGeneratorUniHashMixIn(object): except OSError: pass + def report_unihash_equiv(self, tid, unihash, newunihash): + try: + extra_data = {} + data = self.client().report_unihash_equiv(newunihash, self.method, unihash, extra_data) + bb.warn('Reported task %s as unihash %s to %s (%s)' % (tid, newunihash, self.server, str(data))) + + except hashserv.client.HashConnectionError as e: + bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) # # Dummy class used for bitbake-selftest
bitbake/lib/hashserv/client.py +8 -0
@@ -148,6 +148,14 @@ class Client(object): m['unihash'] = unihash return self.send_message({'report': m}) + def report_unihash_equiv(self, taskhash, method, unihash, extra={}): + self._set_mode(self.MODE_NORMAL) + m = extra.copy() + m['taskhash'] = taskhash + m['method'] = method + m['unihash'] = unihash + return self.send_message({'report-equiv': m}) + def get_stats(self): self._set_mode(self.MODE_NORMAL) return self.send_message({'get-stats': None})
bitbake/lib/hashserv/server.py +49 -0
61 lines not on this page · raw message