Skip to content

Some std::run tests fail under valgrind #7224

Closed
@brson

Description

@brson
Contributor

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.

Activity

graydon

graydon commented on Jun 19, 2013

@graydon
Contributor

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

brson commented on Jun 19, 2013

@brson
ContributorAuthor

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

graydon

graydon commented on Jun 19, 2013

@graydon
Contributor

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

emberian

emberian commented on Aug 5, 2013

@emberian
Member

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

graydon

graydon commented on Aug 9, 2013

@graydon
Contributor

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

graydon

graydon commented on Aug 9, 2013

@graydon
Contributor

Grep for #7224 in the code.

catamorphism

catamorphism commented on Oct 23, 2013

@catamorphism
Contributor

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

flaper87

flaper87 commented on Mar 3, 2014

@flaper87
Contributor

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
added a commit that references this issue on Jun 3, 2021

Auto merge of rust-lang#7263 - Jarcho:redundant_closure_macro, r=llogiq

8787186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @flaper87@graydon@brson@catamorphism@emberian

        Issue actions

          Some std::run tests fail under valgrind · Issue #7224 · rust-lang/rust