bitpit icon indicating copy to clipboard operation
bitpit copied to clipboard

voloctree: DDT Memory Failure when running with guard pages

Open DMurataj01 opened this issue 2 years ago • 2 comments

Hi, I'm able to trigger the following memory error from using DDT, using the following settings using the following reproducer.

Looks like some sort of internal storage related issue but can you take a look and give your thoughts?

Thanks, Denis

Screenshot 2022-05-17 at 18 38 32 Screenshot 2022-05-17 at 18 42 01
    void bitpit_mprotect_reproducer() {
        auto pabloBB = std::make_unique<bitpit::PabloUniform>(1000, 1000, 1000, 50, 3);

        // Set 2:1 balance for the octree.
        pabloBB->setBalanceCodimension(1);
        const int idx = 0;
        pabloBB->setBalance(idx, true);

        for(int i = 0; i < 6; ++i) {
            logInfo("Iteration: " + std::to_string(i));
            pabloBB->adaptGlobalRefine();
        }

        auto volTree = std::make_unique<bitpit::VolOctree>(std::move(pabloBB), &pabloBB);
        volTree->update(false);

        return {};
    }

Stack trace at point of failure:

Screenshot 2022-05-17 at 19 03 14

DMurataj01 avatar May 17 '22 18:05 DMurataj01

I tried you test case with both valgrind and gcc address sanitizer (active modules "undefined" and "address"), but I wasn't able to reproduce the problem.

The stack trace suggests that bitpit is failing when adding a new vertex (operator[] of an unordered_map).

Does the tests case run fine when run in release mode?

andrea-iob avatar May 24 '22 15:05 andrea-iob

I tried you test case with both valgrind and gcc address sanitizer (active modules "undefined" and "address"), but I wasn't able to reproduce the problem.

The stack trace suggests that bitpit is failing when adding a new vertex (operator[] of an unordered_map).

Does the tests case run fine when run in release mode?

It runs but we consistently see this. Can you download a trial licence of ArmForge and run with guard pages on?

DMurataj01 avatar May 25 '22 09:05 DMurataj01