Bug 11303 - Variable tracking spikes memory usage during up-front recipe parsing
Summary: Variable tracking spikes memory usage during up-front recipe parsing
Status: RESOLVED INVALID
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5
Assignee: Christopher Larson
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-04-06 16:29 UTC by Christopher Larson
Modified: 2017-07-28 20:47 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

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Larson 2017-04-06 16:29:42 UTC
In my local testing with many small layers included, I'm seeing a spike to 5gb during up-front recipe parsing when doing a bitbake -e without a tmpdir, but it's only 2.5gb if I do a bitbake -p, and then bitbake -e after that. So it seems that the enabling of variable tracking is impacting the memory usage of the up-front recipe parsing, which should not be the case, as that parsing is only done to populate the recipe cache data / cooker data, not for the actual data emit for -e. This memory usage is temporary, as after the recipes are parsed, the usage drops back down, but spiking this high can cause OOM conditions on certain systems, so is still not ideal.
Comment 1 Christopher Larson 2017-04-06 19:40:23 UTC
Currently verifying that this is a real issue, as memory info can be misleading, particularly anything rss based, since rss will count shared memory for each process. Testing with massif, since it gathers heap allocation info.
Comment 2 Christopher Larson 2017-04-07 17:44:20 UTC
I re-tested using numbers from valgrind's massif rather than memory_profiler, and it does indicate this seems to be a real issue. My hacked up local tree seems to have fixed it, but not cleanly, so am digging further.
Comment 3 Christopher Larson 2017-07-28 20:47:29 UTC
Revisit later, there are improvements to be made, but I'm uncertain as to whether this *particular* issue is valid or not.