Bug 11225

Summary: Build from Command line fail when finish all the tasks
Product: [Build System, Metadata & Runtime] Toaster Reporter: David Lopez Barriba <davidx.lopez.barriba>
Component: toasterAssignee: David Reyna <david.reyna>
Status: VERIFIED FIXED QA Contact: David Lopez Barriba <davidx.lopez.barriba>
Severity: normal    
Priority: Medium CC: jessica.zhang, libertad.gonzalez.de.la.cruz, stanciux.mihail
Version: 2.3   
Target Milestone: 2.3 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
error_log none

Description David Lopez Barriba 2017-03-23 03:13:05 UTC
STATUS: FAILED
BUILD: 2.3 M3: rc1-6e20b31d5d17133e0fca086e12a0ad06ab5c4cc8
ENVIRONMENT: Debian 4.3.0-0.bpo.1-amd64
STEPS TO REPRODUCE: 1. Set up yocto project and toaster test environment.
cd ${installdir}
git clone git://git.yoctoproject.org/poky

2. Start up toaster.
cd ${installdir}
source poky/oe-init-build-env
source toaster start

3. Build the yocto project.
bitbake core-image-minimal

4. Use a default web brower to see project build process.
xdg-open http://localhost:8000/
Wait for build completion.



EXPECTED OUTCOME: 
The system will start.
Syncing...
Creating tables ...
Creating table south_migrationhistory
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.staticfiles
 > django.contrib.humanize
 > south

Not synced (use migrations):
 - orm
(use ./manage.py migrate to migrate these)
Running migrations for orm:
 - Migrating forwards to 0004_auto__add_field_package_installed_name.
 > orm:0001_initial
 > orm:0002_auto__add_field_build_timespent
 > orm:0003_timespent
 - Migration 'orm:0003_timespent' is marked for no-dry-run.
 > orm:0004_auto__add_field_package_installed_name
 - Loading initial data for orm.
Installed 0 object(s) from 0 fixture(s)
server address: 127.0.0.1, server port: 8200
Successful start.

3. Build successfully.
4. You can open http://localhost:8000/ in a default browser. The build process is showed.


ACTUAL OUTCOME:

Image build doesn't finish although this is on 100% of task completed, and shows the following error:

NOTE: Tasks Summary: Attempted 2380 tasks of which 2380 didn't need to be rerun and all succeeded.
ERROR: Execution of event handler 'toaster_buildhistory_dump' failed
Traceback (most recent call last):
  File "/home/david/poky23/meta/classes/toaster.bbclass", line 268, in toaster_buildhistory_dump(e=<bb.event.BuildCompleted object at 0x7fc25d187668>):
                         line = line.rstrip(";")
    >                    psize, px = line.split("\t")
                         punit, pname = px.split(" ")
ValueError: too many values to unpack (expected 2)

ERROR: Running idle function
Traceback (most recent call last):
  File "/home/david/poky23/bitbake/lib/bb/cooker.py", line 1486, in buildTargetsIdle(server=<ProcessServer(ProcessServer-1, started)>, rq=<bb.runqueue.RunQueue object at 0x7fc25e5bcf28>, abort=False):
                 if not retval:
    >                bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, targets, failures, interrupted), self.data)
                     self.command.finishAsyncCommand(msg)
  File "/home/david/poky23/bitbake/lib/bb/event.py", line 211, in fire(event=<bb.event.BuildCompleted object at 0x7fc25d187668>, d=<bb.data_smart.DataSmart object at 0x7fc2603e65c0>):
     
    >    fire_class_handlers(event, d)
         if worker_fire:
  File "/home/david/poky23/bitbake/lib/bb/event.py", line 134, in fire_class_handlers(event=<bb.event.BuildCompleted object at 0x7fc25d187668>, d=<bb.data_smart.DataSmart object at 0x7fc2603e65c0>):
                         continue
    >            execute_handler(name, handler, event, d)
     
  File "/home/david/poky23/bitbake/lib/bb/event.py", line 106, in execute_handler(name='toaster_buildhistory_dump', handler=<function toaster_buildhistory_dump at 0x7fc25fa791e0>, event=<bb.event.BuildCompleted object at 0x7fc25d187668>, d=<bb.data_smart.DataSmart object at 0x7fc2603e65c0>):
         try:
    >        ret = handler(event)
         except (bb.parse.SkipRecipe, bb.BBHandledException):
  File "/home/david/poky23/meta/classes/toaster.bbclass", line 268, in toaster_buildhistory_dump(e=<bb.event.BuildCompleted object at 0x7fc25d187668>):
                         line = line.rstrip(";")
    >                    psize, px = line.split("\t")
                         punit, pname = px.split(" ")
ValueError: too many values to unpack (expected 2)

(See the attachment)
Comment 1 David Lopez Barriba 2017-03-23 03:29:46 UTC
Created attachment 3663 [details]
error_log
Comment 2 David Reyna 2017-03-23 06:34:18 UTC
I think we have a fix for this already. I thought it was posted.
Comment 3 David Reyna 2017-03-29 04:16:33 UTC
A patch was submitted 3/17/2017 and is now in the tree, so this is now fixed.

  12cc4f550a001de18d09d9b2da8a9c90e9bb2f24
Comment 4 David Lopez Barriba 2017-04-28 19:11:15 UTC
Verified in 7a0e795373653886452a7a2992ced10080711c26
Works OK