Skip to content

[BUG] LayoutDescription leaks LayoutConstraints #1914

@Jacobfaib

Description

@Jacobfaib
Indirect leak of 798016 byte(s) in 674 object(s) allocated from:
      #0 0x7537cfce5357 in malloc (/lib64/libasan.so.8+0xfa357) (BuildId: 9e5b194837bcb1c45a484d4aff88710ee1e6b146)
      #1 0x7537b02de531 in void* Legion::Internal::legion_alloc_aligned<1184ul, 16ul, true>(unsigned long) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/legion_allocation.h:185
      #2 0x7537b00a3c1c in void* Legion::Internal::legion_alloc_aligned<Legion::Internal::LayoutConstraints, true>(unsigned long) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/legion_allocation.h:198
      #3 0x7537b00a3c1c in Legion::Internal::LegionHeapify<Legion::Internal::LayoutConstraints>::operator new(unsigned long) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/legion_allocation.h:318
      #4 0x7537b00a3c1c in Legion::Internal::Runtime::register_layout(Legion::FieldSpace, Legion::LayoutConstraintSet const&, bool) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/runtime.cc:33987
      #5 0x7537b00a46c2 in Legion::Internal::MemoryManager::create_unbound_instance(Legion::LogicalRegion, Legion::LayoutConstraintSet&, Legion::Internal::ApEvent, unsigned int, Realm::Processor, int) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/runtime.cc:12726
      #6 0x7537af510a96 in Legion::Internal::SingleTask::prepare_output_instance(unsigned int, Legion::Internal::InstanceSet&, Legion::RegionRequirement const&, Realm::Memory, Legion::LayoutConstraintSet const&) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/legion_tasks.cc:3397
      #7 0x7537af5383a7 in Legion::Internal::SingleTask::finalize_map_task_output(Legion::Mapping::Mapper::MapTaskInput&, Legion::Mapping::Mapper::MapTaskOutput&, Legion::Internal::MustEpochOp*) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/legion_tasks.cc:3231
      #8 0x7537af53a14e in Legion::Internal::IndividualTask::finalize_map_task_output(Legion::Mapping::Mapper::MapTaskInput&, Legion::Mapping::Mapper::MapTaskOutput&, Legion::Internal::MustEpochOp*) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/legion_tasks.cc:6920
      #9 0x7537af47a49d in Legion::Internal::SingleTask::invoke_mapper(Legion::Internal::MustEpochOp*) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/legion_tasks.cc:3745
      #10 0x7537af4cefaa in Legion::Internal::SingleTask::map_all_regions(Legion::Internal::MustEpochOp*, Legion::Internal::TaskOp::DeferMappingArgs const*) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/legion_tasks.cc:4249
      #11 0x7537af4d632c in Legion::Internal::IndividualTask::perform_mapping(Legion::Internal::MustEpochOp*, Legion::Internal::TaskOp::DeferMappingArgs const*) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/legion_tasks.cc:6895
      #12 0x7537af3b48c0 in Legion::Internal::SingleTask::trigger_mapping() /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/legion_tasks.cc:2488
      #13 0x7537b020c1c1 in Legion::Internal::Runtime::legion_runtime_task(void const*, unsigned long, void const*, unsigned long, Realm::Processor) /__w/legate.internal/legate.internal/build/_deps/legion-src/runtime/legion/runtime.cc:36366

The chain of calls appears to be:

  1. MemoryManager::create_unbound_instance().
  2. Calls runtime->register_layout() to create the constraints.
  3. Which is passed to fspace_node->create_layout_description().
  4. Which passes the layout constraints to LayoutDescription().
  5. Which eventually (somehow) fails to free the LayoutConstraints.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions