Bug 11910

Summary: build-appliance failing due to lack of resources
Product: [QA/Testing] Build Testing Reporter: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Component: generalAssignee: Jose Perez C <jose.perez.carranza>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: richard.purdie
Version: 2.4   
Target Milestone: ---   
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
build-appliance log obtained from [1] none

Description Leonardo Sandoval Gonzalez 2017-08-08 20:51:57 UTC
Created attachment 3924 [details]
build-appliance log obtained from [1]

The opensuse worker [1] ran out out resources when building the build-appliance image. Not sure if this is a transient issue or problem still remains. Some log snippet:

---snippet---

ERROR: libcheck-0.10.0-r0 do_package_write_deb: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:sstate_hardcode_path(d)
     0003:
File: '/home/pokybuild/yocto-autobuilder/yocto-worker/build-appliance/build/meta/classes/sstate.bbclass', lineno: 574, function: sstate_hardcode_path
     0570:    # This has the side effect of making sure the vfs cache is hot
     0571:    sstate_hardcode_cmd = "%s | xargs %s | %s | xargs %s %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, xargs_no_empty_run_cmd, sstate_sed_cmd)
     0572:
     0573:    bb.note("Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd))
 *** 0574:    subprocess.check_output(sstate_hardcode_cmd, shell=True, cwd=sstate_builddir)
     0575:
     0576:        # If the fixmefn is empty, remove it..
     0577:    if os.stat(fixmefn).st_size == 0:
     0578:        os.remove(fixmefn)
File: '/usr/lib64/python3.4/subprocess.py', lineno: 604, function: check_output
     0600:        del kwargs['input']
     0601:        kwargs['stdin'] = PIPE
     0602:    else:
     0603:        inputdata = None
 *** 0604:    with Popen(*popenargs, stdout=PIPE, **kwargs) as process:
     0605:        try:
     0606:            output, unused_err = process.communicate(inputdata, timeout=timeout)
     0607:        except TimeoutExpired:
     0608:            process.kill()
File: '/usr/lib64/python3.4/subprocess.py', lineno: 856, function: __init__
     0852:                                startupinfo, creationflags, shell,
     0853:                                p2cread, p2cwrite,
     0854:                                c2pread, c2pwrite,
     0855:                                errread, errwrite,
 *** 0856:                                restore_signals, start_new_session)
     0857:        except:
     0858:            # Cleanup if the child failed starting.
     0859:            for f in filter(None, (self.stdin, self.stdout, self.stderr)):
     0860:                try:
File: '/usr/lib64/python3.4/subprocess.py', lineno: 1398, function: _execute_child
     1394:                            close_fds, sorted(fds_to_keep), cwd, env_list,
     1395:                            p2cread, p2cwrite, c2pread, c2pwrite,
     1396:                            errread, errwrite,
     1397:                            errpipe_read, errpipe_write,
 *** 1398:                            restore_signals, start_new_session, preexec_fn)
     1399:                    self._child_created = True
     1400:                finally:
     1401:                    # be sure the FD is closed no matter what
     1402:                    os.close(errpipe_write)
Exception: BlockingIOError: [Errno 11] Resource temporarily unavailable

---snippet--

Runtime exceptions suggest that host OS reach process creation (fork) limit.

[1] https://autobuilder.yocto.io/builders/build-appliance/builds/396
Comment 1 Richard Purdie 2017-08-10 15:09:00 UTC
This was due to the max number of processes being set to 1200 on the opensuse423 autobuilder worker. We've increased that number (as seen in ulimit) which should resolve this and stop the fork() call failing.