Skip to content

#216 - Fix engine lifecycle cleanup#217

Merged
cliffburdick merged 2 commits into
mainfrom
cburdick/fix-engine-reinit
Jul 8, 2026
Merged

#216 - Fix engine lifecycle cleanup#217
cliffburdick merged 2 commits into
mainfrom
cburdick/fix-engine-reinit

Conversation

@cliffburdick

Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Cliff Burdick <cburdick@nvidia.com>
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes engine lifecycle cleanup and reinitialization behavior. The main changes are:

  • Releases the active engine on shutdown() and allows a later fresh init.
  • Keeps DPDK dma-buf fds open until EAL cleanup completes.
  • Adds base-engine memory-region deallocation.
  • Adds RDMA and ibverbs MR deregistration during teardown.
  • Documents the single-active-engine lifecycle in the API docs.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
src/engine_dpdk.cpp Retains successful DPDK dma-buf fds and closes them after EAL cleanup.
src/common.cpp Resets the active engine on shutdown and failed initialization.
src/engine.cpp Adds base-engine cleanup for memory regions and retained fd state.
src/engine.h Adds allocation ownership metadata and EngineFactory reset support.
src/engines/dpdk/daqiri_dpdk_engine.cpp Resets DPDK quit state on init and tags HUGE allocations with their owner.
src/engines/ibverbs/daqiri_ibverbs_engine.cpp Tracks ibverbs memory registrations and deregisters them before PD teardown.
src/engines/rdma/daqiri_rdma_engine.cpp Cleans up partial RDMA MR registration failures and deregisters MRs before PD teardown.

Reviews (2): Last reviewed commit: "#216 - Retain DPDK dma-buf descriptors" | Re-trigger Greptile

Comment thread src/engine_dpdk.cpp Outdated
Signed-off-by: Cliff Burdick <cburdick@nvidia.com>
@cliffburdick cliffburdick merged commit ea1a5f9 into main Jul 8, 2026
3 checks passed
@cliffburdick cliffburdick deleted the cburdick/fix-engine-reinit branch July 8, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant