Skip to content

Some std::run tests fail under valgrind #7224

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

Closed
brson opened this issue Jun 19, 2013 · 8 comments
Closed

Some std::run tests fail under valgrind #7224

brson opened this issue Jun 19, 2013 · 8 comments

Comments

@brson
Copy link
Contributor

brson commented Jun 19, 2013

Examples:

ERROR: ld.so: object '/usr/lib/valgrind/vgpreload_core-x86-linux.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/valgrind/vgpreload_core-x86-linux.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so' from LD_PRELOAD cannot be preloaded: ignored.
rust: task failed at 'left: ~[69, 82, 82, 79, 82, 58, 32, 108, 100, 46, 115, 111, 58, 32, 111, 98, 106, 101, 99, 116, 32, 39, 47, 117, 115, 114, 47, 108, 105, 98, 47, 118, 97, 108, 103, 114, 105, 110, 100, 47, 118, 103, 112, 114, 101, 108, 111, 97, 100, 95, 99, 111, 114, 101, 45, 120, 56, 54, 45, 108, 105, 110, 117, 120, 46, 115, 111, 39, 32, 102, 114, 111, 109, 32, 76, 68, 95, 80, 82, 69, 76, 79, 65, 68, 32, 99, 97, 110, 110, 111, 116, 32, 98, 101, 32, 112, 114, 101, 108, 111, 97, 100, 101, 100, 58, 32, 105, 103, 110, 111, 114, 101, 100, 46, 10, 69, 82, 82, 79, 82, 58, 32, 108, 100, 46, 115, 111, 58, 32, 111, 98, 106, 101, 99, 116, 32, 39, 47, 117, 115, 114, 47, 108, 105, 98, 47, 118, 97, 108, 103, 114, 105, 110, 100, 47, 118, 103, 112, 114, 101, 108, 111, 97, 100, 95, 109, 101, 109, 99, 104, 101, 99, 107, 45, 120, 56, 54, 45, 108, 105, 110, 117, 120, 46, 115, 111, 39, 32, 102, 114, 111, 109, 32, 76, 68, 95, 80, 82, 69, 76, 79, 65, 68, 32, 99, 97, 110, 110, 111, 116, 32, 98, 101, 32, 112, 114, 101, 108, 111, 97, 100, 101, 100, 58, 32, 105, 103, 110, 111, 114, 101, 100, 46, 10] does not equal right: ~[]', /home/brian/dev/rust2/src/libstd/run.rs:1046
test run::tests::test_pipes ... rust: task failed at 'left: ~[69, 82, 82, 79, 82, 58, 32, 108, 100, 46, 115, 111, 58, 32, 111, 98, 106, 101, 99, 116, 32, 39, 47, 117, 115, 114, 47, 108, 105, 98, 47, 118, 97, 108, 103, 114, 105, 110, 100, 47, 118, 103, 112, 114, 101, 108, 111, 97, 100, 95, 99, 111, 114, 101, 45, 120, 56, 54, 45, 108, 105, 110, 117, 120, 46, 115, 111, 39, 32, 102, 114, 111, 109, 32, 76, 68, 95, 80, 82, 69, 76, 79, 65, 68, 32, 99, 97, 110, 110, 111, 116, 32, 98, 101, 32, 112, 114, 101, 108, 111, 97, 100, 101, 100, 58, 32, 105, 103, 110, 111, 114, 101, 100, 46, 10, 69, 82, 82, 79, 82, 58, 32, 108, 100, 46, 115, 111, 58, 32, 111, 98, 106, 101, 99, 116, 32, 39, 47, 117, 115, 114, 47, 108, 105, 98, 47, 118, 97, 108, 103, 114, 105, 110, 100, 47, 118, 103, 112, 114, 101, 108, 111, 97, 100, 95, 109, 101, 109, 99, 104, 101, 99, 107, 45, 120, 56, 54, 45, 108, 105, 110, 117, 120, 46, 115, 111, 39, 32, 102, 114, 111, 109, 32, 76, 68, 95, 80, 82, 69, 76, 79, 65, 68, 32, 99, 97, 110, 110, 111, 116, 32, 98, 101, 32, 112, 114, 101, 108, 111, 97, 100, 101, 100, 58, 32, 105, 103, 110, 111, 114, 101, 100, 46, 10] does not equal right: ~[]', /home/brian/dev/rust2/src/libstd/run.rs:961
ok
test float::tests::test_trunc ... ok
test run::tests::test_add_to_env ... ok
test run::tests::test_finish_with_output_redirected ... ok
test unstable::test_run_in_bare_thread ... ok
test run::tests::test_change_working_directory ... ok
test run::tests::test_finish_with_output_once ... FAILED
test run::tests::test_process_status ... ok
test run::tests::test_process_output_output ... FAILED
test task::test_run_basic ... ok
test rt::uv::uvio::test_callback_run_once ... okrust: task failed at 'left: ~[69, 82, 82, 79, 82, 58, 32, 108, 100, 46, 115, 111, 58, 32, 111, 98, 106, 101, 99, 116, 32, 39, 47, 117, 115, 114, 47, 108, 105, 98, 47, 118, 97, 108, 103, 114, 105, 110, 100, 47, 118, 103, 112, 114, 101, 108, 111, 97, 100, 95, 99, 111, 114, 101, 45, 120, 56, 54, 45, 108, 105, 110, 117, 120, 46, 115, 111, 39, 32, 102, 114, 111, 109, 32, 76, 68, 95, 80, 82, 69, 76, 79, 65, 68, 32, 99, 97, 110, 110, 111, 116, 32, 98, 101, 32, 112, 114, 101, 108, 111, 97, 100, 101, 100, 58, 32, 105, 103, 110, 111, 114, 101, 100, 46, 10, 69, 82, 82, 79, 82, 58, 32, 108, 100, 46, 115, 111, 58, 32, 111, 98, 106, 101, 99, 116, 32, 39, 47, 117, 115, 114, 47, 108, 105, 98, 47, 118, 97, 108, 103, 114, 105, 110, 100, 47, 118, 103, 112, 114, 101, 108, 111, 97, 100, 95, 109, 101, 109, 99, 104, 101, 99, 107, 45, 120, 56, 54, 45, 108, 105, 110, 117, 120, 46, 115, 111, 39, 32, 102, 114, 111, 109, 32, 76, 68, 95, 80, 82, 69, 76, 79, 65, 68, 32, 99, 97, 110, 110, 111, 116, 32, 98, 101, 32, 112, 114, 101, 108, 111, 97, 100, 101, 100, 58, 32, 105, 103, 110, 111, 114, 101, 100, 46, 10] does not equal right: ~[]', /home/brian/dev/rust2/src/libstd/run.rs:1060

test run::tests::test_process_output_error ... ok
test run::tests::test_inherit_env ... ok
test run::tests::test_keep_current_working_dir ... ok
test unstable::test_run_in_bare_thread_exchange ... ok
test run::tests::test_finish_with_output_twice ... FAILED
test run::tests::test_finish_once ... ok

failures:
    run::tests::test_finish_with_output_once
    run::tests::test_finish_with_output_twice
    run::tests::test_process_output_output

The problem is that they are checking the contents of stderr and the dynamic linker is writing it's own error messages there when running under valgrind.

@graydon
Copy link
Contributor

graydon commented Jun 19, 2013

I'm curious about those error messages. Options: check if it's valgrind misconfigured for 32bit; try running valgrind in follow-children mode; strip LD_PRELOAD from subprocess env?

brson added a commit that referenced this issue Jun 19, 2013
Under valgrind on 64->32 cross compiles the dynamic linker is emitting
some error messages on stderr, which interferes with the tests that
are checking stderr.
@brson
Copy link
Contributor Author

brson commented Jun 19, 2013

@Aatch has a patch to remove LD_PRELOAD from the environment.

@graydon
Copy link
Contributor

graydon commented Jun 19, 2013

Seems weird, no? What does fork-exec do under valgrind normally?

@emberian
Copy link
Member

emberian commented Aug 5, 2013

@brson @graydon can this be closed? the buildbots running valgrind seem to be doing fine.

@graydon
Copy link
Contributor

graydon commented Aug 9, 2013

No. They're "doing fine" because there's a sniff for valgrind that disables those checks. Not a fix, just a bandaid.

@graydon
Copy link
Contributor

graydon commented Aug 9, 2013

Grep for #7224 in the code.

@catamorphism
Copy link
Contributor

Still a bug, doesn't seem like a release blocker.

@flaper87
Copy link
Contributor

flaper87 commented Mar 3, 2014

std::run has been rolled into std::process a9bd447

These tests where removed:

  • run::tests::test_finish_with_output_once
  • run::tests::test_finish_with_output_twice

And this test seems to work just fine under valgrind:

  • run::tests::test_process_output_output

@flaper87 flaper87 closed this as completed Mar 3, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 3, 2021
Fix `redundant_closure` for `vec![]` macro in a closure with arguments

fixes: rust-lang#7224
changelog: Fix `redundant_closure` for `vec![]` macro in a closure with arguments
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

5 participants