Bug 10420 - Exception when executing gdkpixbuf completion hook
Summary: Exception when executing gdkpixbuf completion hook
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.2
Hardware: All Multiple
: High major
Target Milestone: 2.2 M4
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-10-12 12:03 UTC by Ross Burton
Modified: 2016-10-18 16:22 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2016-10-12 12:03:22 UTC
From http://errors.yoctoproject.org/Errors/Details/91243/

/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work/ppc7400-poky-linux/defaultpkgname/1.0-r0/temp/run.completion_function.18789: line 105: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders: No such file or directory
WARNING: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work/ppc7400-poky-linux/defaultpkgname/1.0-r0/temp/run.completion_function.18789:1 exit 1 from 'exit 1'
ERROR: Execution of event handler 'base_eventhandler' failed
Traceback (most recent call last):
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/meta/classes/base.bbclass", line 257, in base_eventhandler(e=<bb.runqueue.sceneQueueComplete object at 0x7f140a212828>):
                 bb.debug(1, "Executing SceneQueue Completion commands: %s" % "\n".join(cmds))
    >            bb.build.exec_func("completion_function", e.data)
                 os.remove(completions)
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/bitbake/lib/bb/build.py", line 262, in exec_func(func='completion_function', d=<bb.data_smart.DataSmart object at 0x7f1413310828>, dirs=None, pythonexception=False):
             else:
    >            exec_func_shell(func, d, runfile, cwd=adir)
     
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/bitbake/lib/bb/build.py", line 446, in exec_func_shell(func='completion_function', d=<bb.data_smart.DataSmart object at 0x7f1413310828>, runfile='/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work/ppc7400-poky-linux/defaultpkgname/1.0-r0/temp/run.completion_function.18789', cwd=None):
                     logfn = d.getVar('BB_LOGFILE', True)
    >                raise FuncFailed(func, logfn)
             finally:
bb.build.FuncFailed: Function failed: completion_function

ERROR: An uncaught exception occurred in runqueue
Traceback (most recent call last):
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/bitbake/lib/bb/event.py", line 124, in fire_class_handlers(event=<bb.runqueue.sceneQueueComplete object at 0x7f140a212828>, d=<bb.data_smart.DataSmart object at 0x7f1413310828>):
                         continue
    >            execute_handler(name, handler, event, d)
     
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/bitbake/lib/bb/event.py", line 96, in execute_handler(name='base_eventhandler', handler=<function base_eventhandler at 0x7f14132ee510>, event=<bb.runqueue.sceneQueueComplete object at 0x7f140a212828>, d=<bb.data_smart.DataSmart object at 0x7f1413310828>):
         try:
    >        ret = handler(event)
         except (bb.parse.SkipRecipe, bb.BBHandledException):
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/meta/classes/base.bbclass", line 257, in base_eventhandler(e=<bb.runqueue.sceneQueueComplete object at 0x7f140a212828>):
                 bb.debug(1, "Executing SceneQueue Completion commands: %s" % "\n".join(cmds))
    >            bb.build.exec_func("completion_function", e.data)
                 os.remove(completions)
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/bitbake/lib/bb/build.py", line 262, in exec_func(func='completion_function', d=<bb.data_smart.DataSmart object at 0x7f1413310828>, dirs=None, pythonexception=False):
             else:
    >            exec_func_shell(func, d, runfile, cwd=adir)
     
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/bitbake/lib/bb/build.py", line 446, in exec_func_shell(func='completion_function', d=<bb.data_smart.DataSmart object at 0x7f1413310828>, runfile='/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work/ppc7400-poky-linux/defaultpkgname/1.0-r0/temp/run.completion_function.18789', cwd=None):
                     logfn = d.getVar('BB_LOGFILE', True)
    >                raise FuncFailed(func, logfn)
             finally:
bb.build.FuncFailed: Function failed: completion_function

Looks like the dependencies the completion script needed were not present so the hook aborted.  I'm wondering if this is the recent runqueue change.
Comment 1 brian avery 2016-10-12 20:12:12 UTC
Managed to replicate locally.
These local.conf changes put at the end:
###
DISTRO = "poky-lsb"
MACHINE = "qemuarm"
SSTATE_MIRRORS ?= "\
file://.* http://autobuilder.yoctoproject.org/pub/sstate/PATH;downloadfilename=PATH \n \
"
  

QEMU_USE_KVM="True"
INHERIT += "testimage"
TEST_SUITES = " ping ssh"

Ran:
$ rm -rf cache tmp
$ bitbake core-image-lsb && bitbake core-image-lsb-sdk && bitbake core-image-lsb core-image-lsb-sdk -c testimage

----
Running from my own locally created sstate did *not* fail
Comment 2 Paul Eggleton 2016-10-12 20:21:17 UTC
Here's the patch in question:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=a75bccdd14cec2ce6b74a0e6dc3d557593f6abd2

It seems rather unlikely that the runqueue patch caused this for two reasons:

1) The code being controlled by this does not change anything in the data structures unless it knows it's going to bail out, after which it does exactly that - and we're not seeing it do that.

2) In any case we can be pretty sure that this code wasn't running already as part of a normal build since BB_SETSCENE_ENFORCE isn't set to 1 (apart from when testing installation of the eSDK).
Comment 3 Ross Burton 2016-10-12 20:47:21 UTC
Yes that was pointed out to me earlier.  Maybe Richards earlier optimisation patch?
Comment 4 Randy Witt 2016-10-13 15:40:45 UTC
I believe the easiest way to reproduce this is:

rm `find sstate-cache -iname '*gdk-pixbuf-native*' ` && rm tmp -rf && bitbake core-image-lsb

The reason the error occurs is the "sstatecompletions" file with commands using gdk-pixbuf-native still gets ran on completion of the scene queue, even though gdk-pixbuf-native wasn't setscened.


A good question is where did the gdk-pixbuf-native sstate go.
Comment 5 Randy Witt 2016-10-13 15:44:23 UTC
It should have been said to run the command in Comment 4 https://bugzilla.yoctoproject.org/show_bug.cgi?id=10420#c4 after a successful build.
Comment 6 Ross Burton 2016-10-13 16:05:21 UTC
I *think* I have a fix now that an misunderstanding of how sstate works has been cleared up.  You learn something new every day.
Comment 7 Ross Burton 2016-10-17 11:18:14 UTC
Fixed in oe-core 03cdb3366ded46cd760656e4cda0be37c1f82109.