| Summary: | bitbake with memory resident don't report SSTATE progress | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Aníbal Limón <anibal.limon> |
| Component: | bitbake | Assignee: | Aníbal Limón <anibal.limon> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | anibal.limon, bluelightning, poky.bs.watcher, poky.watcher, richard.purdie |
| Version: | unspecified | ||
| Target Milestone: | 2.2 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | YP 2.2 M4 RC1 BUILD BLOCKING BUG | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Aníbal Limón
2016-09-26 16:32:49 UTC
I tried twice launching the proposed commmands, first time it get stucks on 0% second time on 8%. One more thing: The issue is not observed with oe-init-build-env setup script so only affecting memres. This seems to be a concurrency related problem: Progress bar behaves as expected if the fetch tests are forced to be run in a single thread (nproc = 1). Need to find the relation between this behavior and the memory resident setting. I believe Anibal has made progress and this looks like a thread concurrency issue in bb.event.fire() and is related to how sstate is using threading. (In reply to comment #3) > I believe Anibal has made progress and this looks like a thread concurrency > issue in bb.event.fire() and is related to how sstate is using threading. Yes, i found that events are generated into the event.fire by the server but the client (UI) don't receive the ProgressEnd event. So the next patch fixes the issue but we need to discuss how to address it. @@ -145,12 +145,17 @@ def print_ui_queue(): if isinstance(event, logging.LogRecord): logger.handle(event) +import threading +ui_fire_lock = threading.Lock() + def fire_ui_handlers(event, d): if not _uiready: # No UI handlers registered yet, queue up the messages ui_queue.append(event) return + ui_fire_lock.acquire() + errors = [] for h in _ui_handlers: #print "Sending event %s" % event @@ -169,6 +174,9 @@ def fire_ui_handlers(event, d): for h in errors: del _ui_handlers[h] + + ui_fire_lock.release() + def fire(event, d): """Fire off an Event""" @@ -176,7 +184,6 @@ def fire(event, d): # desired so they get the task based datastore. # UI handlers need to be fired in the server context so we defer this. They # don't have a datastore so the datastore context isn't a problem. - fire_class_handlers(event, d) if worker_fire: worker_fire(event, d) Patches sent at bitbake devel an oe-core, http://lists.openembedded.org/pipermail/bitbake-devel/2016-October/008129.html http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127274.html At bitbake, http://git.openembedded.org/bitbake/commit/?id=a583dc0b296415ec904c081c4de96ceef46732a8 At poky, http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f2053844958325496a9387874a8f3182400b71ca http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=79012f943d3b3af1f439022f05a1287a383cd3f8 |