Skip to content

[stable regression] #[should_panic] tests segfault in certain OS X configurations with 1.44.0 #73030

Closed
@froydnj

Description

@froydnj

We are seeing some sccache #[should_panic] tests segfault on TravisCI when using Rust 1.44.0, when those same tests succeed with Rust 1.43.1 (e.g. here -- note that the OS X DEPLOY=1 build does not run tests). The tests in question are these:

https://github.com/mozilla/sccache/blob/e57788095488944d05df2ea92d12ade319b05822/src/compiler/args.rs#L1036-L1105

With 1.43.1, the tests run like so:

     Running `/Users/travis/build/mozilla/sccache/target/debug/deps/sccache-d6f73566e418fda1`

running 167 tests
test azure::blobstore::test::test_put_blob ... ignored
test azure::blobstore::test::test_canonicalize_resource ... ok
test azure::credentials::test::test_conn_str_with_endpoint_suffix_only ... ok
test azure::credentials::test::test_parse_connection_string ... ok
test azure::credentials::test::test_parse_connection_string_without_account_key ... ok
test azure::blobstore::test::test_signing ... ok
test cache::gcs::test_gcs_credential_provider ... ok
test compiler::args::tests::assert_tests::test_arginfo_process_flag ... ok
test compiler::args::tests::assert_tests::test_arginfo_process_take_arg ... ok
test compiler::args::tests::assert_tests::test_arginfo_process_take_concat_arg ... ok
test compiler::args::tests::assert_tests::test_arginfo_process_take_concat_arg_delim ... ok
test compiler::args::tests::assert_tests::test_arginfo_process_take_maybe_concat_arg ... ok
test compiler::args::tests::assert_tests::test_arginfo_process_take_maybe_concat_arg_delim ... ok
test compiler::args::tests::assert_tests::test_args_iter_no_conflict ... ok
test compiler::args::tests::assert_tests::test_args_iter_unsorted ... ok
test compiler::args::tests::assert_tests::test_args_iter_unsorted_2 ... ok
[...more tests follow...]

With 1.44.0, the tests segfault:

     Running `/Users/travis/build/mozilla/sccache/target/debug/deps/sccache-720cb5bbc0e667a6`

running 167 tests
test azure::blobstore::test::test_put_blob ... ignored
test azure::blobstore::test::test_canonicalize_resource ... ok
test azure::credentials::test::test_conn_str_with_endpoint_suffix_only ... ok
test azure::credentials::test::test_parse_connection_string ... ok
test azure::credentials::test::test_parse_connection_string_without_account_key ... ok
test azure::blobstore::test::test_signing ... ok
test cache::gcs::test_gcs_credential_provider ... ok
error: test failed, to rerun pass '-p sccache --lib'

Caused by:

  process didn't exit successfully: `/Users/travis/build/mozilla/sccache/target/debug/deps/sccache-720cb5bbc0e667a6` (signal: 11, SIGSEGV: invalid memory reference)

The same tests do timeout occasionally (e.g. in this run), rather than segfaulting.

I have retried jobs several different times in TravisCI with what appear to be different workers -- I get different hostnames and instances, which I assume are physically different machines -- so I think some sort of machine problem (e.g. bad memory) has been ruled out.

I think this failure is potentially specific to the OS X version that TravisCI is running; I cannot reproduce the failures on my Mac (OS X 10.12.3). TravisCI reports using:

Runtime kernel version: 17.7.0
...
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G65

You may be able to reproduce by:

  1. git clone https://github.com/mozilla/sccache/
  2. cd sccache
  3. RUST_BACKTRACE=1 cargo +1.44.0 test --all --verbose --features="all"

I do not understand why, but cargo test --all --verbose --no-default-features features="" does seem to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-bugCategory: This is a bug.O-macosOperating system: macOSP-highHigh priorityT-libsRelevant to the library team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions