| Summary: | Python cache files get lost in packages | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | kweihmann | ||||||||||||||||||
| Component: | core | Assignee: | Unassigned <unassigned> | ||||||||||||||||||
| Status: | NEW --- | QA Contact: | |||||||||||||||||||
| Severity: | normal | ||||||||||||||||||||
| Priority: | Medium+ | CC: | meta.mr.watcher, meta.watcher, randy.macleod, ross.burton, tgamblin, tim.orling, tvgamblin | ||||||||||||||||||
| Version: | 2.6.4 | ||||||||||||||||||||
| Target Milestone: | 6.99 | ||||||||||||||||||||
| Hardware: | x86 | ||||||||||||||||||||
| OS: | Multiple | ||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||||||||||||||
| Verified: | Documentation change: | Don't know | |||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||
Created attachment 4660 [details]
log master 2
Created attachment 4661 [details]
log thud
Created attachment 4662 [details]
log thud 2
Created attachment 4663 [details]
log warrior
Created attachment 4664 [details]
log warrior 2
Created attachment 4665 [details]
log zeus
Created attachment 4666 [details]
log zeus 2
That's not a failure during the build, but a failure of preparing the new sysroot. The implication is that /build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__/__init__.cpython-37.pyc doesn't exist, which is part of the python3-msgcheck-native sysroot. Can you see if that file definitely exists in the build? Yes it's normally there - if that error is occurring it isn't - so the shown error is rightfully complaining about it. Behavior isn't really deterministic in this case. I even had the case where is file was initially was created according to logs, but it didn't manifest into a file in the fs - unfortunately I didn't save a log for this one. Bulk move of 64 bugs to 4.3 M3 after a quick review. If a bug is actually fixed, please add a commit link and resolve it. -- Randy for YP bug team. Moved to M4. Bulk move to 5.0 M1. -- Randy Bulk move of 52 5.0-M1 bugs to M2. Bulk move of bugs owned by "unassigned" from 5.0-M2 to 5.0-M3. Bulk move of bugs from 5.0-M3 to 5.99. The bugs in this list are all unassigned and are ones that I consider to be nice to do some time but not essential track from milestone to milestone in 5.0 or 5.1. We agreed on this bug handling approach in the YP bug review on Feb 22, 2024. If you disagree, please move back to a 5.[012...]-M* milestone. Bump to 6.99. Is this still happening? FWIW I've never seen this. For the record, I've never seen this either. |
Created attachment 4659 [details] Log master Under certain (unknown) conditions cache files from python3 or python3-site-packages get lost while populating or stating, leading to stack traces like File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:extend_recipe_sysroot(d) 0003: File: '/build/poky/meta/classes/staging.bbclass', lineno: 551, function: extend_recipe_sysroot 0547: dest = newmanifest[l] 0548: if l.endswith("/"): 0549: staging_copydir(l, targetdir, dest, seendirs) 0550: continue *** 0551: staging_copyfile(l, targetdir, dest, postinsts, seendirs) 0552: 0553: bb.note("Installed into sysroot: %s" % str(msg_adding)) 0554: bb.note("Skipping as already exists in sysroot: %s" % str(msg_exists)) 0555: File: '/build/poky/meta/classes/staging.bbclass', lineno: 152, function: staging_copyfile 0148: os.symlink(linkto, dest) 0149: #bb.warn(c) 0150: else: 0151: try: *** 0152: os.link(c, dest) 0153: except OSError as err: 0154: if err.errno == errno.EXDEV: 0155: bb.utils.copyfile(c, dest) 0156: else: Exception: FileNotFoundError: [Errno 2] No such file or directory: '/build/poky/build/tmp/sysroots-components/x86_64/python3-msgcheck-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__/__init__.cpython-37.pyc' -> '/build/poky/build/tmp/work/qemux86_64-mine-linux/core-image-minimal-mine/1.0-r0/recipe-sysroot-native/usr/lib/python3.7/site-packages/msgcheck/__pycache__/__init__.cpython-37.pyc' This affects only packages with python cache files and seems to be most likely to happen on very low-spec-systems with a lot of python-native packages to be injected into a workspace. Very often this happens in a Github Actions VM using a Ubuntu 18.04 based container, but happens occasionally even on more powerful systems. Specs of the mostly used systems 2-core CPU 7 GB of RAM memory 14 GB of SSD disk space Ubuntu 18.04 based docker container running on Ubuntu 18.04 The actual missing cache file is pretty random (see the different attachments for more info) and this issue can be reproduced on all branches since thud (TBH branches before I didn't test). Current workaround for me is to delete all cache files from every package before do_package (for python3-native also after preprocess of do_package), which fixes the symptoms but doesn't really cure the underlying issue