dragonflydb / dragonflydb/dragonfly
Investigate why memory tracker misses `ServerFamily::replica_` deallocation
- Dominant language
- C++
- Stars
- 31.5k
- Forks
- 1.3k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 137
Description
To reproduce:
1. Run ` python3 -m pytest dragonfly/replication_test.py --df allocation_tracker=256:88285184 -k "test_big_containers"`
2. `cat log | python3 parse_allocator_tracking_logs.py`
Now observe:
```
Deallocating non existing address: 0x2be840b0000 640
Address: 0x2be840d0e00, Size: 768 bytes, original line: `I20250110 12:09:54.542371 94710 allocation_tracker.cc:79] Allocating 768 bytes (0x2be840d0e00). Stack: 0x59364644d018 std::__allocate_guarded<>()
`
Address: 0x2be843a0b00, Size: 256 bytes, original line: `I20250110 12:09:54.583632 94710 allocation_tracker.cc:79] Allocating 256 bytes (0x2be843a0b00). Stack: 0x5936468cfe88 dfly::ProtocolClient::ProtocolClient()
`
```
Contributor guide
Research direction
Start by running the pytest command for dragonfly/replication_test.py with test_big_containers, then pipe the allocator output through parse_allocator_tracking_logs.py. Inspect allocation_tracker.cc around line 79 and trace the reported missing deallocation for ServerFamily::replica_. Done means identifying why the tracker misses it and verifying the explanation against the reproduced log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- testing-qa, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100