Bug 10397 - oe-init-build-env-memres <directory> loops indefinitely
Summary: oe-init-build-env-memres <directory> loops indefinitely
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ major
Target Milestone: 2.2 M4
Assignee: Benjamin Esquivel
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-10-07 17:40 UTC by Benjamin Esquivel
Modified: 2017-12-06 17:11 UTC (History)
2 users (show)

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


Attachments
Infinite loop log (2.17 KB, text/plain)
2016-10-07 17:41 UTC, Benjamin Esquivel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Esquivel 2016-10-07 17:40:23 UTC
There is a case of failure I discovered while using the memres script on the latest master that loops your shell into an infinite loop, here's the procedure:

 1. Clone poky and cd into it
    $ git clone git://git.yoctoproject.org/poky && cd poky
 2. Execute the memres script with any custom dir
    poky $ . ./oe-init-build-env-memres testdir

Watch it flip to an infinite loop. See attached log.
Comment 1 Benjamin Esquivel 2016-10-07 17:41:21 UTC
Created attachment 3463 [details]
Infinite loop log
Comment 2 Benjamin Esquivel 2016-10-07 17:42:17 UTC
You can also run generated qemu images with a command like 'runqemu qemux86'
Traceback (most recent call last):
  File "/home/besquive/sandbox/pokyraseme/bitbake/bin/bitbake", line 48, in <module>
    cookerdata.CookerConfiguration()))
  File "/home/besquive/sandbox/pokyraseme/bitbake/lib/bb/main.py", line 461, in bitbake_main
    server = start_server(servermodule, configParams, configuration, featureset)
  File "/home/besquive/sandbox/pokyraseme/bitbake/lib/bb/main.py", line 344, in start_server
    server.initServer((host, int(port)), single_use=single_use,
ValueError: invalid literal for int() with base 10: 'testdir'


This last exception looks like the culprit.
Comment 3 Benjamin Esquivel 2016-10-07 18:47:14 UTC
found another way to reproduce it:

1. Clone poky and cd into it
    $ git clone git://git.yoctoproject.org/poky && cd poky
2. Execute the build-init (no memres) script
    poky $ . ./oe-init-build-env
3. Instantiate a bitbake server only with a port that is not a number
    build $ bitbake --server-only -t xmlrpc -B localhost:asdf

At this point the infinite loop appears in the same way that the memres procedure finds it.
Comment 4 Benjamin Esquivel 2016-10-07 21:47:30 UTC
Review posted here:

http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127397.html