Bug 14772 - ResourceWarning: Enable tracemalloc to get the object allocation traceback
Summary: ResourceWarning: Enable tracemalloc to get the object allocation traceback
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 5.99
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.1 M1
Assignee: Martin Jansa
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2022-03-31 19:05 UTC by Khem Raj
Modified: 2022-04-12 21:28 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Khem Raj 2022-03-31 19:05:31 UTC
I have started to get this warning on master lately in do_rootfs tasks, I am using archlinux with Python 3.10.4

openembedded-core/meta/classes/license_image.bbclass:23: ResourceWarning: unclosed file <_io.TextIOWrapper name='/mnt/b/yoe/master/build/tmp/deploy/licenses/yoe-installer-image-raspberrypi4-64-20220331174313/package.manifest' mode='w+' encoding='UTF-8'>
  'w+').write(output)
ResourceWarning: Enable tracemalloc to get the object allocation traceback


=====================

/mnt/b/yoe/master/sources/openembedded-core/meta/lib/oe/rootfs.py:331: ResourceWarning: unclosed file <_io.TextIOWrapper name='/mnt/b/yoe/master/build/tmp/pkgdata/raspberrypi4-64/kernel-depmod/kernel-abiversion' mode='r' encoding='UTF-8'>
  kernel_ver = open(kernel_abi_ver_file).read().strip(' \n')
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Comment 1 Martin Jansa 2022-04-07 14:30:45 UTC
I've noticed this today as well and fix sent as:
https://lists.openembedded.org/g/openembedded-core/message/164109
Comment 2 Randy MacLeod 2022-04-07 14:36:22 UTC
Patch incoming... Thanks Martin.