Skip to content

cpython 0.6.0 SIGSEGVs and test failures on s390x / System Z (big endian) #265

@decathorpe

Description

@decathorpe

I tried updating the Fedora Linux packages for rust-cpython from version 0.5.2 to 0.6.0, but there are a lot of new issues with test failures on s390x architecture (the only big-endian architecture we have access to).

With python 3.9, there are these new test failures compared to 0.5.2:

failures:
---- objectprotocol::test::test_debug_string stdout ----
thread 'objectprotocol::test::test_debug_string' panicked at 'Unknown PyUnicode_KIND', src/objects/string.rs:308:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- objectprotocol::test::test_display_string stdout ----
thread 'objectprotocol::test::test_display_string' panicked at 'Unknown PyUnicode_KIND', src/objects/string.rs:308:22
---- objects::string::test::test_extract_lone_surrogate stdout ----
thread 'objects::string::test::test_extract_lone_surrogate' panicked at 'Unknown PyUnicode_KIND', src/objects/string.rs:308:22
---- objects::string::test::test_extract_lone_surrogate_lossy stdout ----
thread 'objects::string::test::test_extract_lone_surrogate_lossy' panicked at 'Unknown PyUnicode_KIND', src/objects/string.rs:308:22
---- objects::string::test::test_extract_umlaut stdout ----
thread 'objects::string::test::test_extract_umlaut' panicked at 'Unknown PyUnicode_KIND', src/objects/string.rs:308:22
failures:
    objectprotocol::test::test_debug_string
    objectprotocol::test::test_display_string
    objects::num::test::test_u64_max
    objects::string::test::test_extract_lone_surrogate
    objects::string::test::test_extract_lone_surrogate_lossy
    objects::string::test::test_extract_umlaut
test result: FAILED. 81 passed; 6 failed; 0 ignored; 0 measured; 4 filtered out; finished in 0.01s

With Python 3.10, there are additional failures, these two I have already investigated and traced back to changes in Python 3.10 itself:

These two tests fail too, but I do not get output from cargo:

test objectprotocol::test::test_debug_string ... FAILED
test objectprotocol::test::test_display_string ... FAILED

Because it looks like the test threads / processes crash with segmentation faults:

error: test failed.
Caused by:
  process didn't exit successfully: `./target/release/deps/cpython-abe96c0dffd595a2 --skip 'objects::num::test::float_to_' --skip src/objects/capsule.rs` (signal: 11, SIGSEGV: invalid memory reference)
  process didn't exit successfully: `./target/release/deps/test_class-d070ffed372516e4 --skip 'objects::num::test::float_to_' --skip src/objects/capsule.rs` (signal: 11, SIGSEGV: invalid memory reference)
  process didn't exit successfully: `./target/release/deps/test_sharedref-2ff6a3943eb85a79 --skip 'objects::num::test::float_to_' --skip src/objects/capsule.rs` (signal: 11, SIGSEGV: invalid memory reference)

For now, I think I'll have to skip running the test suite on s390x entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions