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

valgrind error with num_cpus #5

Open
andrieshiemstra opened this issue Dec 23, 2021 · 0 comments
Open

valgrind error with num_cpus #5

andrieshiemstra opened this issue Dec 23, 2021 · 0 comments

Comments

@andrieshiemstra
Copy link
Member

my error:

running 6 tests
test auto_id_map::tests::test_aim ... ok
test eventloop::tests::test ... ok
test eventloop::tests::test_sync ... ok
test js_utils::facades::values::tests::test_jsvf ... ok
==5283== Thread 2 task_manager::te:
==5283== Syscall param statx(file_name) points to unaddressable byte(s)
==5283==    at 0x4AFD9FE: statx (statx.c:29)
==5283==    by 0x2DA930: statx (weak.rs:136)
==5283==    by 0x2DA930: std::sys::unix::fs::try_statx (fs.rs:139)
==5283==    by 0x2CC035: file_attr (fs.rs:776)
==5283==    by 0x2CC035: metadata (fs.rs:493)
==5283==    by 0x2CC035: buffer_capacity_required (fs.rs:609)
==5283==    by 0x2CC035: <std::fs::File as std::io::Read>::read_to_string (fs.rs:645)
==5283==    by 0x27536E: num_cpus::linux::Cgroup::param (linux.rs:214)
==5283==    by 0x275219: num_cpus::linux::Cgroup::quota_us (linux.rs:203)
==5283==    by 0x2750A2: num_cpus::linux::Cgroup::cpu_quota (linux.rs:188)
==5283==    by 0x274CB1: num_cpus::linux::load_cgroups (linux.rs:149)
==5283==    by 0x27494D: num_cpus::linux::init_cgroups (linux.rs:129)
==5283==    by 0x27D3A8: core::ops::function::FnOnce::call_once (function.rs:227)
==5283==    by 0x27ED7A: std::sync::once::Once::call_once::{{closure}} (once.rs:262)
==5283==    by 0x136C27: std::sync::once::Once::call_inner (once.rs:419)
==5283==    by 0x27ED05: std::sync::once::Once::call_once (once.rs:262)
==5283==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==5283== 
==5283== Syscall param statx(buf) points to unaddressable byte(s)
==5283==    at 0x4AFD9FE: statx (statx.c:29)
==5283==    by 0x2DA930: statx (weak.rs:136)
==5283==    by 0x2DA930: std::sys::unix::fs::try_statx (fs.rs:139)
==5283==    by 0x2CC035: file_attr (fs.rs:776)
==5283==    by 0x2CC035: metadata (fs.rs:493)
==5283==    by 0x2CC035: buffer_capacity_required (fs.rs:609)
==5283==    by 0x2CC035: <std::fs::File as std::io::Read>::read_to_string (fs.rs:645)
==5283==    by 0x27536E: num_cpus::linux::Cgroup::param (linux.rs:214)
==5283==    by 0x275219: num_cpus::linux::Cgroup::quota_us (linux.rs:203)
==5283==    by 0x2750A2: num_cpus::linux::Cgroup::cpu_quota (linux.rs:188)
==5283==    by 0x274CB1: num_cpus::linux::load_cgroups (linux.rs:149)
==5283==    by 0x27494D: num_cpus::linux::init_cgroups (linux.rs:129)
==5283==    by 0x27D3A8: core::ops::function::FnOnce::call_once (function.rs:227)
==5283==    by 0x27ED7A: std::sync::once::Once::call_once::{{closure}} (once.rs:262)
==5283==    by 0x136C27: std::sync::once::Once::call_inner (once.rs:419)
==5283==    by 0x27ED05: std::sync::once::Once::call_once (once.rs:262)
==5283==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==5283== 
test cache::tests::test_cache ... ok
test task_manager::tests::test ... ok

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 9.45s

==5283== 
==5283== HEAP SUMMARY:
==5283==     in use at exit: 1,056 bytes in 2 blocks
==5283==   total heap usage: 577 allocs, 575 frees, 97,207 bytes allocated
==5283== 
==5283== LEAK SUMMARY:
==5283==    definitely lost: 0 bytes in 0 blocks
==5283==    indirectly lost: 0 bytes in 0 blocks
==5283==      possibly lost: 0 bytes in 0 blocks
==5283==    still reachable: 1,056 bytes in 2 blocks
==5283==         suppressed: 0 bytes in 0 blocks
==5283== Reachable blocks (those to which a pointer was found) are not shown.
==5283== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==5283== 
==5283== For lists of detected and suppressed errors, rerun with: -s
==5283== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Error: Process completed with exit code 123.

look sthe same as this issue, but i'm not going to build valgrind from source in my CI, todo check in 3 or 4 months if valgrinbd 3.19 is released and fixes this...

https://users.rust-lang.org/t/simple-fs-read-to-string-program-causes-valgrind-memcheck-errors/68722

andrieshiemstra added a commit that referenced this issue Apr 13, 2022
as of april 11 valgrind 3,19 is available for download
https://valgrind.org/downloads/current.html

however installing on ubuntu-latest stil gets us valgrind 3.15 and the same error

Will check again later
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant