Bug 5941

Summary: [1.4.3] [Build-Appliance] Hob can not startup
Product: [Build System, Metadata & Runtime] Runtime Reporter: Yi Zhao <yi.zhao>
Component: build-applianceAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, bluelightning, cristian.iorga, ke.zou, sgw, yi.zhao
Version: 1.4.3   
Target Milestone: 1.4.3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Yi Zhao 2014-03-11 06:00:36 UTC
Image location: http://autobuilder.yoctoproject.org/pub/nightly/20140306-3/build-appliance/

Git rev: dylan/7ab82abcad9ede847c42c01d2a4f4c2c18877e6f

The Hob can not start up when boot up the build-appliance image in virtual machine.

I tried to run command "hob" in command line and got the following errors:
#######################
** (process:751): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (process:751): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (process:751): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
Traceback (most recent call last):
  File "/home/builder/poky/bitbake/bin/bitbake", line 352, in <module>
    ret = main()
  File "/home/builder/poky/bitbake/bin/bitbake", line 301, in main
    server = start_server(servermodule, configParams, configuration)
  File "/home/builder/poky/bitbake/bin/bitbake", line 213, in start_server
    server.initServer()
  File "/home/builder/poky/bitbake/lib/bb/server/process.py", line 212, in initServer
    self.serverImpl = ProcessServer(self.server_channel, self.event_queue, self.featurelist)
  File "/home/builder/poky/bitbake/lib/bb/server/process.py", line 92, in __init__
    self.event_handle = multiprocessing.Value("i")
  File "/usr/lib/python2.7/multiprocessing/__init__.py", line 252, in Value
    from multiprocessing.sharedctypes import Value
  File "/usr/lib/python2.7/multiprocessing/sharedctypes.py", line 36, in <module>
    import ctypes
ImportError: No module named ctypes
DEBUG: Removed the following variables from the environment: USERNAME, SUDO_COMMAND, SUDO_GID, TZ, BUILDDIR, PSEUDO_LOCALSTATEDIR, SHLVL, SUDO_UID, PSEUDO_PREFIX, PSEUDO_LIBDIR, MAIL, SUDO_USER, DISPLAY, _
#########################
Comment 1 Paul Eggleton 2014-03-11 11:37:49 UTC
Looks like this needs a backport of d80a715e3763a0e2bea5c84a4132d70dceaa2044 to dylan.
Comment 3 Yi Zhao 2014-03-20 02:41:00 UTC
Still failed with 1.4.3 rc4.

Image location: http://autobuilder.yoctoproject.org/pub/nightly/20140318-5/build-appliance/

Error message:
###############
** (process:672): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (process:672): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (process:672): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
Traceback (most recent call last):
  File "/home/builder/poky/bitbake/bin/bitbake", line 352, in <module>
    ret = main()
  File "/home/builder/poky/bitbake/bin/bitbake", line 301, in main
    server = start_server(servermodule, configParams, configuration)
  File "/home/builder/poky/bitbake/bin/bitbake", line 213, in start_server
    server.initServer()
  File "/home/builder/poky/bitbake/lib/bb/server/process.py", line 221, in initServer
    self.serverImpl = ProcessServer(self.server_channel, self.event_queue, None)
  File "/home/builder/poky/bitbake/lib/bb/server/process.py", line 91, in __init__
    self.event_handle = multiprocessing.Value("i")
  File "/usr/lib/python2.7/multiprocessing/__init__.py", line 252, in Value
    from multiprocessing.sharedctypes import Value
  File "/usr/lib/python2.7/multiprocessing/sharedctypes.py", line 39, in <module>
    from multiprocessing import heap, RLock
  File "/usr/lib/python2.7/multiprocessing/heap.py", line 36, in <module>
    import mmap
ImportError: No module named mmap
DEBUG: Removed the following variables from the environment: USERNAME, SUDO_COMMAND, SUDO_GID, TZ, BUILDDIR, PSEUDO_LOCALSTATEDIR, SHLVL, SUDO_UID, PSEUDO_PREFIX, PSEUDO_LIBDIR, MAIL, SUDO_USER, DISPLAY, _
             
##################
Comment 4 Cristian Iorga 2014-03-20 08:53:30 UTC
It might be that this patch needs to be integrated into 1.4.3:

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

The issue seems to be that python mmap module is missing from BA build tools.
Comment 5 Paul Eggleton 2014-03-20 10:07:44 UTC
Right, but for master we should also add a dependency to python-multiprocessing; multiprocessing seems to need mmap regardless of where it's being used.
Comment 6 Cristian Iorga 2014-03-20 10:17:12 UTC
Hi Paul,

I don't know about the python-multiprocessing and master-based BA issue (if any, maybe I misunderstood), care to add a bug report for it?? And a test case, please.

Regards,
Cristian
Comment 7 Paul Eggleton 2014-03-20 10:20:11 UTC
It won't be an issue with the build appliance in master because python-mmap already ends up in the build appliance via packagegroup-self-hosted. It will be an issue for someone who just installs python-multiprocessing into their image without explicitly installing python-mmap or something else that depends upon it.
Comment 8 Paul Eggleton 2014-03-21 11:33:58 UTC
Another backport to dylan has now merged:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dylan&id=465a8605191e39be443fe999619a034ae49889d8

I've tested booting the build appliance and Hob now starts properly.
Comment 9 Alexandru Georgescu 2014-03-27 11:51:01 UTC
verified. BA can launch