-
Notifications
You must be signed in to change notification settings - Fork 704
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
PVF: "failed to read dir" error running cargo bench
#2495
Comments
I don't have access to a linux machine (considering getting one), so I couldn't really do Is there any other way to trigger this? What about If we assume
Have you tried the blocking |
Thanks for the ideas @eagr! I think the problem occurs when the directory already exists, but can't be read. Previously we were deleting the directory before recreating it, so we didn't have this problem. Oh, I think it has to do with the benchmark doing it multiple times in parallel in group.bench_function("host: prepare Rococo runtime", |b| {
b.to_async(&rt).iter_batched(
|| async {
(
TestHost::new_with_config(rt.handle(), |cfg| {
cfg.prepare_workers_hard_max_num = 1;
})
.await,
pvf.clone().code(),
)
},
|result| async move {
let (host, pvf_code) = result.await;
[...] BTW, does |
I think I see the problem. Luckily this doesn't affect production. |
The problem is that here we use a cache path that gets deleted at the end of the end of the function (see https://docs.rs/tempfile/latest/tempfile/fn.tempdir.html). Not a big deal, I fixed it here. This brings up an interesting question though, what happens if the cache path gets deleted at runtime? It's an unlikely concern in practice, but I'm curious. |
Getting the following error after #1918:
The PR has not been released yet, so we should find out whether this affects production (and also have a test to reproduce this).
The weird thing is, we do successfully create the dir beforehand with
create_dir_all
. But I've reproduced the error fromread_dir
on two machines already. 🤔cc @eagr if you have any ideas. I'll try to get to it later today.
The text was updated successfully, but these errors were encountered: