Virtual memory exhausted (ppa:savoury1/blender-stage)

Asked by Rob Savoury

Hi,

Having real problems getting a new build of OpenVDB (8.1.0) to successfully complete, due "virtual memory exhausted" errors on the builds almost every time. However, randomly the builds succeed such as the Bionic and Groovy amd64 builds (after multiple attempts, also i386 builds for Xenial/Bionic completed successfully first time).

So far amd64 builds for Xenial, Focal, and Hirsute have not been successful even with many attempts now. Wondering if there is anything that can be done to help these builds complete successfully? Please let me know.

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Colin Watson
Solved:
Last query:
Last reply:
Revision history for this message
Rob Savoury (savoury1) said :
#1

Here's an excerpt from the build log [*] of yet another failure from a minute ago:

[*] https://launchpad.net/~savoury1/+archive/ubuntu/blender-stage/+build/21691816

---
[ 92%] Building CXX object openvdb/openvdb/unittest/CMakeFiles/vdb_test.dir/TestTreeCombine.cc.o
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/openvdb/openvdb/unittest && /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DOPENVDB_DLL -DOPENVDB_USE_LOG4CPLUS -I/<<PKGBUILDDIR>>/openvdb/openvdb/.. -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/openvdb/openvdb -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/openvdb/openvdb/openvdb -I/usr/include/Imath -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -fvisibility-inlines-hidden -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -std=c++14 -o CMakeFiles/vdb_test.dir/TestTreeCombine.cc.o -c /<<PKGBUILDDIR>>/openvdb/openvdb/unittest/TestTreeCombine.cc
In file included from /<<PKGBUILDDIR>>/openvdb/openvdb/../openvdb/tools/Composite.h:27,
                 from /<<PKGBUILDDIR>>/openvdb/openvdb/unittest/TestTreeCombine.cc:6:
/usr/include/tbb/task_scheduler_init.h:21:154: note: #pragma message: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.
   21 | #pragma message("TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.")
      | ^
virtual memory exhausted: Cannot allocate memory
virtual memory exhausted: Cannot allocate memory
make[3]: *** [openvdb/openvdb/unittest/CMakeFiles/vdb_test.dir/build.make:1320: openvdb/openvdb/unittest/CMakeFiles/vdb_test.dir/TestTreeCombine.cc.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [openvdb/openvdb/unittest/CMakeFiles/vdb_test.dir/build.make:1268: openvdb/openvdb/unittest/CMakeFiles/vdb_test.dir/TestTools.cc.o] Error 1
---

The failure always seems to be with this specific source file TestTreeCombine.cc so it clearly requires a lot of memory. Hoping that there will be a way to resolve this such that these OpenVDB builds can be more reliably completed!

Revision history for this message
Best Colin Watson (cjwatson) said :
#2

The non-deterministic behaviour suggests that it might be dependent on parallelization, so you could try running this with a lower level of concurrency. See --max-parallel in debhelper(7).

Beyond that, this sort of problem is likely to require deeper work, such as breaking up files so that the compiler can deal with smaller translation units.

Revision history for this message
Rob Savoury (savoury1) said :
#3

Thanks for the tip, was wondering if it might be due the parallel factor. Had noted in debian/rules a conditional to only use 2 jobs for arm64 and ppc64el, two other 64-bit architectures, and your comment confirmed my suspicion to add amd64 to that conditional.

Seems to have worked, a successful build for Xenial just completed a few minutes ago for the first time (after numerous attempts on the earlier 4 parallel jobs build). The build time was much longer than usual of course, but no virtual memory exhausted error. Out of interest, what is the virtual memory allocated to each amd64 buildd on Launchpad? In any case, problem is solved, thanks!