Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deno v2.1.4 may occasionally panic when calling Deno.resolveDns on a machine with an AMD mobile Ryzen CPU. (A workaround is available) #27534

Closed
tatsuya6502 opened this issue Jan 3, 2025 · 1 comment · Fixed by #27572

Comments

@tatsuya6502
Copy link
Contributor

Version: Deno 2.1.4

TL;DR: To workaround, upgrade moka crate to v0.12.9 (latest) in your Cargo.lock file. (Run cargo update -p moka)

Hi, I am the creator of a Rust crate called moka cache. I saw Deno v2.1.4 started to use moka via hickory-resolver crate.

$ git remote -v
origin	[email protected]:denoland/deno.git (fetch)
origin	[email protected]:denoland/deno.git (push)

$ cargo tree -i moka
moka v0.12.7
└── hickory-resolver v0.25.0-alpha.4
    ├── deno_fetch v0.208.0
    ...
    └── deno_net v0.176.0

I think moka is used at least in op_dns_resolve in deno_net to cache DNS lookup results in memory.

I have received a report from a hickory-resolver user that moka occasionally panics on ThinkPad with AMD mobile Ryzen CPU (moka-rs/moka#472). We already found the root cause (BIOS issue) and it needs to be addressed in one of the dependencies of moka (metrics-rs/quanta#111). Meanwhile, I have added workaround to moka crate in v0.12.9, and confirmed that it fixed the issue on the user.

I do not have such a machine to reproduce the issue, so I do not know whether the same issue happens in Deno v2.1.4 or not. But I think it is worth to upgrade moka to v0.12.9 in Deno to prevent potential panics on such machines.

@tatsuya6502
Copy link
Contributor Author

I created a PR #27572 to upgrade moka to the latest version (v0.12.10).

@tatsuya6502 tatsuya6502 changed the title Deno v2.1.4 may occasionally panic when calling Deno.dnsLookup on a machine with an AMD mobile Ryzen CPU. (A workaround is available) Deno v2.1.4 may occasionally panic when calling Deno.resolveDns on a machine with an AMD mobile Ryzen CPU. (A workaround is available) Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant