Summary
I’m seeing intermittent SEGV_ACCERR crashes when using the mapmap optimizer to select the best camera for each face during mesh texturing. The optimization itself works, but the process occasionally ends with a memory access violation.
The crashes also occur when forcing a single thread, so it doesn’t look like a straightforward data race.
Details
- Component: mapmap optimizer (used for per-face best camera selection in mesh texturing)
- Repro: on my dataset, the crash happens roughly 1 in 5 runs
- Failure mode:
GeneralDPNodeSolver::optimize_node() inside an AVX intrinsic (avxintrin.h:911), with SEGV_ACCERR (access error - permission violation, not unmapped memory) / memory corruption–style crash
I also noticed this allocator pattern in a couple of places:
m_value_allocator(
(tbb::tbb_allocator<_s_t<COSTTYPE, SIMDWIDTH>>*)(
new tbb::cache_aligned_allocator<_s_t<COSTTYPE, SIMDWIDTH>>
)
);
I don’t understand the purpose of allocating a tbb::cache_aligned_allocator and then casting it to tbb::tbb_allocator. I tried changing it to:
m_value_allocator(
new tbb::cache_aligned_allocator<_s_t<COSTTYPE, SIMDWIDTH>>()
);
but the intermittent crash still occurs.
Questions
- Has anyone seen similar intermittent
SEGV_ACCERR / memory corruption issues with mapmap?
- What is the intended rationale for the allocator recast above?
- Is this pattern actually safe, or could it be undefined behavior and related to the crash?
- Is there a recommended way to configure allocators for mapmap (especially if cache-aligned allocation is desired)?
I can provide stack traces, build flags, and environment details if needed.
Summary
I’m seeing intermittent
SEGV_ACCERRcrashes when using the mapmap optimizer to select the best camera for each face during mesh texturing. The optimization itself works, but the process occasionally ends with a memory access violation.The crashes also occur when forcing a single thread, so it doesn’t look like a straightforward data race.
Details
GeneralDPNodeSolver::optimize_node() inside an AVX intrinsic (avxintrin.h:911), with SEGV_ACCERR (access error - permission violation, not unmapped memory)/ memory corruption–style crashI also noticed this allocator pattern in a couple of places:
I don’t understand the purpose of allocating a
tbb::cache_aligned_allocatorand then casting it totbb::tbb_allocator. I tried changing it to:but the intermittent crash still occurs.
Questions
SEGV_ACCERR/ memory corruption issues with mapmap?I can provide stack traces, build flags, and environment details if needed.