`proc_self_status` fails on second invocation
niluxv opened this issue · 1 comments
niluxv commented
When calling proc_self_status
a twice, it errors the second time with error
Os { code: 95, kind: Uncategorized, message: "Operation not supported" }
reliably on both back-ends (testing on linux).
This seems to have regressed from rustix
version 0.38.14
to 0.38.15
. Maybe related to #859?
proc_self_maps
and proc_self_pagemap
are also affected but proc_self_fd
is not. Also cross-usage is affected (e.g. first proc_self_maps
and then proc_self_pagemap
).
Example
{
let fd1 = rustix::procfs::proc_self_status().expect("error 1");
// close `fd1` again on drop
}
let fd2 = rustix::procfs::proc_self_status().expect("error 2");
// panic:
// error 2: Os { code: 95, kind: Uncategorized, message: "Operation not supported" }
And cross-usage:
{
let fd1 = rustix::procfs::proc_self_maps().expect("error 1");
// close `fd1` again on drop
}
let fd2 = rustix::procfs::proc_self_pagemap().expect("error 2");
// panic:
// error 2: Os { code: 95, kind: Uncategorized, message: "Operation not supported" }
Environment
- kernel: linux 6.5.0-14-generic
- OS: ubuntu 23.10
rustix
versions: >= 0.38.15
sunfishcode commented
This is now released in rustix 0.38.31.