[GH-ISSUE #1302] lru_cache panics during lookup in Rust 1.48 #645

Closed
opened 2026-03-15 23:39:18 +03:00 by kerem · 5 comments
Owner

Originally created by @sudarshan-reddy on GitHub (Nov 24, 2020).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1302

Describe the bug
Errors when trying to make an insert into the linked hash map.

To Reproduce
Try to call lookup_ip.

Expected behavior
A clear and concise description of what you expected to happen.

System:

  • OS: macOS
  • Architecture: x86_64
  • rustc version: 1.48.0

Version:
Crate: resolver

Originally created by @sudarshan-reddy on GitHub (Nov 24, 2020). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1302 **Describe the bug** Errors when trying to make an insert into the linked hash map. **To Reproduce** Try to call lookup_ip. **Expected behavior** A clear and concise description of what you expected to happen. **System:** - OS: macOS - Architecture: x86_64 - rustc version: 1.48.0 **Version:** Crate: resolver
kerem closed this issue 2026-03-15 23:39:26 +03:00
Author
Owner

@sudarshan-reddy commented on GitHub (Nov 24, 2020):

I've attempted to fix this issue here: https://github.com/bluejekyll/trust-dns/pull/1301

<!-- gh-comment-id:733141852 --> @sudarshan-reddy commented on GitHub (Nov 24, 2020): I've attempted to fix this issue here: https://github.com/bluejekyll/trust-dns/pull/1301
Author
Owner

@bluejekyll commented on GitHub (Nov 24, 2020):

Can you think of a reason I'm not seeing this error in tests? We have coverage for the minimal use case you describe in the tests.

<!-- gh-comment-id:733149694 --> @bluejekyll commented on GitHub (Nov 24, 2020): Can you think of a reason I'm not seeing this error in tests? We have coverage for the minimal use case you describe in the tests.
Author
Owner

@sudarshan-reddy commented on GitHub (Nov 24, 2020):

You are correct.

That's strange. I did a diff with the trust_dns I was running to reproduce and the github version: This should be a non issue now since the Cargo.lock holds the fixed version of linked-hash-map: https://github.com/bluejekyll/trust-dns/blob/main/Cargo.lock#L810.

I can close this issue. But do let me know if you still want to consider the hashlink replacement PR.

<!-- gh-comment-id:733187057 --> @sudarshan-reddy commented on GitHub (Nov 24, 2020): You are correct. That's strange. I did a diff with the trust_dns I was running to reproduce and the github version: This should be a non issue now since the Cargo.lock holds the fixed version of linked-hash-map: https://github.com/bluejekyll/trust-dns/blob/main/Cargo.lock#L810. I can close this issue. But do let me know if you still want to consider the hashlink replacement PR.
Author
Owner

@bluejekyll commented on GitHub (Nov 24, 2020):

I'm definitely open to updating to better library implementations if there are improvements. I'd like us to consider what reasons we might have for the switch though, right now this feels a little rushed. But If you want to make a case for the PR you've submitted, I'm definitely open.

For some background here, I think we should consider replacing the lru_cache with something simpler and also more configurable. For example, it might be nice to allow folks to swap in a different implementation to say use a file based cache that could be larger than the one in-memory right now.

<!-- gh-comment-id:733191960 --> @bluejekyll commented on GitHub (Nov 24, 2020): I'm definitely open to updating to better library implementations if there are improvements. I'd like us to consider what reasons we might have for the switch though, right now this feels a little rushed. But If you want to make a case for the PR you've submitted, I'm definitely open. For some background here, I think we should consider replacing the lru_cache with something simpler and also more configurable. For example, it might be nice to allow folks to swap in a different implementation to say use a file based cache that could be larger than the one in-memory right now.
Author
Owner

@sudarshan-reddy commented on GitHub (Nov 24, 2020):

You have some great points here. I initially opened a quick PR because I was worried there could be a break. But in light of the discovery and tests successfully passing Im happy to circle back to a more holistic solution like you describe.

I will however, close the issue right now as the issue statement does not hold true.

<!-- gh-comment-id:733254539 --> @sudarshan-reddy commented on GitHub (Nov 24, 2020): You have some great points here. I initially opened a quick PR because I was worried there could be a break. But in light of the discovery and tests successfully passing Im happy to circle back to a more holistic solution like you describe. I will however, close the issue right now as the issue statement does not hold true.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#645
No description provided.