Bug 11821 - nightly-oe-selftest 2.4_M1-574-g2ec756257e failed
Summary: nightly-oe-selftest 2.4_M1-574-g2ec756257e failed
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5 M1
Assignee: Leonardo Sandoval Gonzalez
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-07-24 03:42 UTC by Armin Kuster
Modified: 2017-09-26 16:32 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Armin Kuster 2017-07-24 03:42:34 UTC
builddir : /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest
buildername : nightly-oe-selftest
buildnumber : 404
commit-description : 2.4_M1-574-g2ec756257e


error message.

017-07-23 15:25:53,161 - oe-selftest - INFO - oe-selftest - FAIL - Required tests failed
Traceback (most recent call last):
  File "/usr/lib/python3.5/weakref.py", line 624, in _exitfunc
    f()
  File "/usr/lib/python3.5/weakref.py", line 548, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
  File "/usr/lib/python3.5/tempfile.py", line 936, in _cleanup
    _rmtree(name)
  File "/usr/lib/python3.5/shutil.py", line 480, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib/python3.5/shutil.py", line 438, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.browser'
Comment 1 Richard Purdie 2017-07-27 14:46:24 UTC
I think this happens when the gpg signing test runs out of memory (perhaps due to high parallelisation) and then there is a cleanup issue. May be easily reproduced with constrained memory with large numbers of parallelism.

There are two issues:

a) Look at memory usage with signing and try and reduce it (or reduce parallelism when signing enabled)
b) Resovle the seltest file cleanup error
Comment 2 Leonardo Sandoval Gonzalez 2017-08-04 00:40:58 UTC
(In reply to comment #0)
> builddir : /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest
> buildername : nightly-oe-selftest
> buildnumber : 404
> commit-description : 2.4_M1-574-g2ec756257e
> 

Armin, Can you post the URL from where you took the log? Due to the nature of the AB, where old builds are removed, the URL may not exist anymore, so if you have the whole log locally, attach it.

> 
> error message.
> 
> 017-07-23 15:25:53,161 - oe-selftest - INFO - oe-selftest - FAIL - Required
> tests failed
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/weakref.py", line 624, in _exitfunc
>     f()
>   File "/usr/lib/python3.5/weakref.py", line 548, in __call__
>     return info.func(*info.args, **(info.kwargs or {}))
>   File "/usr/lib/python3.5/tempfile.py", line 936, in _cleanup
>     _rmtree(name)
>   File "/usr/lib/python3.5/shutil.py", line 480, in rmtree
>     _rmtree_safe_fd(fd, path, onerror)
>   File "/usr/lib/python3.5/shutil.py", line 438, in _rmtree_safe_fd
>     onerror(os.unlink, fullname, sys.exc_info())
>   File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
>     os.unlink(name, dir_fd=topfd)
> FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.browser'
Comment 3 Armin Kuster 2017-08-25 17:52:11 UTC
sorry. can not find it.
Comment 4 Stephen K Jolley 2017-08-31 15:32:29 UTC
Armin answered.
Comment 5 Leonardo Sandoval Gonzalez 2017-09-07 14:07:09 UTC
Problem is reproducible on debian 9 (stretch), same error observed.
Comment 6 Leonardo Sandoval Gonzalez 2017-09-13 15:35:29 UTC
fixed by:

commit f44dfe63a49675e51a72ba271771c1c26650cb43
Author: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Date:   Thu Sep 7 15:52:54 2017 -0500

    selftest/cases/signing: ignore removal errors when cleaning temporary gpg directory
    
    The high-level method tempfile.TemporaryDirectory give us no way to
    ignore erros on removal thus use tempfile.mkdtemp instead. Ignoring possible issues
    on removal is neccesary because it contains gpg sockets that are automatically removed
    by the system once the process terminates, otherwise the following log is observed:
    
      ..
      ..
      File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
        os.unlink(name, dir_fd=topfd)
      FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.browser'
    
    [YOCTO #11821]
    
    (From OE-Core rev: 7e3a7cd2426feac757def81850dc44156cd0f33e)
Comment 7 Leonardo Sandoval Gonzalez 2017-09-14 16:05:52 UTC
Unfortunately, the issue is still present [1] on main autobuilders, so reopening

[1] https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/516/steps/Running%20oe-selftest/logs/stdio
Comment 8 Leonardo Sandoval Gonzalez 2017-09-20 14:57:34 UTC
There is another place (runtime test) where the temporal working dir gpg folder clean-up is needed so patch is needed in this area. Due to M4 freeze, moving to next milestone.
Comment 9 Leonardo Sandoval Gonzalez 2017-09-26 16:32:34 UTC
There was a need for a second patch, the same idea as the first but targeted for another code area. Patch now in master:

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