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

Time-type changes break tests on future rustcs #1624

Closed
workingjubilee opened this issue Mar 27, 2024 · 8 comments · Fixed by #1660
Closed

Time-type changes break tests on future rustcs #1624

workingjubilee opened this issue Mar 27, 2024 · 8 comments · Fixed by #1660
Labels
bug Something isn't working

Comments

@workingjubilee
Copy link
Member

workingjubilee commented Mar 27, 2024

Original PR:

Breaking rustc --versions:

  • rustc 1.78.0-beta.2 (277d06bc9 2024-03-23)
  • rustc 1.79.0-nightly (5f2c7d2bf 2024-03-25)

Broken command:

#!/bin/sh
for rustver in beta nightly; do
    rustup default "$rustver"
    cargo clean
    cargo install --path cargo-pgrx --locked
    for pgver in 12 13 14 15 16; do
        cargo test -p pgrx-tests \
            --features "pg$pgver" --no-default-features \
            1>"$rustver-pg$pgver.stdout" 2>"$rustver-pg$pgver.stderr";
    done
done

Output differs between versions, not sure if on different commits yet, I found the discrepancy first on nightly but did the beta bisect first.

@workingjubilee workingjubilee added the bug Something isn't working label Mar 27, 2024
@workingjubilee workingjubilee changed the title Time-type changes break tests on beta rustc Time-type changes break tests on future rustcs Mar 27, 2024
@workingjubilee
Copy link
Member Author

I have confirmed the nightly breakage predates 0.12.0-alpha.0, it seems. I suspect they're a rustc problem, but the beta problem seems like ours.

@workingjubilee
Copy link
Member Author

Output for beta is:

test tests::zero_datum_edge_cases::tests::pg_test_zero_i32_is_some_zero ... ok
test tests::array_tests::tests::pg_test_arr_sort_uniq_with_null - should panic ... ok
test tests::attributes_tests::tests::pg_test_for_should_panic_attribute - should panic ... ok
test tests::fcinfo_tests::tests::pg_test_null_error_type - should panic ... ok
test tests::fn_call_tests::tests::pg_fn_raises_error - should panic ... ok
test tests::shmem_tests::tests::pg_test_behaves_normally_when_elog_while_holding_lock - should panic ... ok
test tests::roundtrip_tests::tests::pg_test_rt_array_time ... FAILED
test tests::struct_type_tests::tests::pg_test_complex_storage_and_retrieval ... FAILED

failures:

---- tests::roundtrip_tests::tests::pg_test_rt_array_time stdout ----
thread 'tests::roundtrip_tests::tests::pg_test_rt_array_time' panicked at pgrx-tests/src/framework.rs:164:9:


Postgres Messages:
�[37m�[2m[2024-03-26 19:25:14.078 PDT] [383021] [6603838a.5d82d]: LOG:  starting PostgreSQL 14.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.1 20230801, 64-bit
[2024-03-26 19:25:14.079 PDT] [383021] [6603838a.5d82d]: LOG:  listening on IPv6 address "::1", port 32214
[2024-03-26 19:25:14.079 PDT] [383021] [6603838a.5d82d]: LOG:  listening on IPv4 address "127.0.0.1", port 32214
[2024-03-26 19:25:14.083 PDT] [383021] [6603838a.5d82d]: LOG:  listening on Unix socket "/home/jubilee/.pgrx/.s.PGSQL.32214"
[2024-03-26 19:25:14.086 PDT] [383021] [6603838a.5d82d]: LOG:  database system is ready to accept connections
[2024-03-26 19:25:15.217 PDT] [383021] [6603838a.5d82d]: LOG:  server process (PID 385554) was terminated by signal 6: Aborted
[2024-03-26 19:25:15.217 PDT] [383021] [6603838a.5d82d]: DETAIL:  Failed process was running: SELECT "tests"."test_rt_array_time"();
[2024-03-26 19:25:15.217 PDT] [383021] [6603838a.5d82d]: LOG:  terminating any other active server processes
[2024-03-26 19:25:15.218 PDT] [383021] [6603838a.5d82d]: LOG:  all server processes terminated; reinitializing
[2024-03-26 19:25:15.237 PDT] [383021] [6603838a.5d82d]: FATAL:  This PgAtomic is not empty, can't re-attach: 0x79dcf802a900
[2024-03-26 19:25:15.239 PDT] [383021] [6603838a.5d82d]: LOG:  database system is shut down
�[0m�[39m

Test Function Messages:
�[36m[2024-03-26 19:25:14.925 PDT] [385554] [6603838a.5e212]: LOG:  statement: BEGIN
[2024-03-26 19:25:14.926 PDT] [385554] [6603838a.5e212]: LOG:  statement: SELECT "tests"."test_rt_array_time"();
�[39m

Client Error:
�[31m�[1mconnection closed�[0m�[39m
postgres location: �[37m�[2m<unknown>�[0m�[39m
rust location: �[33m<unknown>�[39m



---- tests::struct_type_tests::tests::pg_test_complex_storage_and_retrieval stdout ----
thread 'tests::struct_type_tests::tests::pg_test_complex_storage_and_retrieval' panicked at pgrx-tests/src/framework.rs:164:9:


Postgres Messages:
�[37m�[2m[2024-03-26 19:25:14.078 PDT] [383021] [6603838a.5d82d]: LOG:  starting PostgreSQL 14.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.1 20230801, 64-bit
[2024-03-26 19:25:14.079 PDT] [383021] [6603838a.5d82d]: LOG:  listening on IPv6 address "::1", port 32214
[2024-03-26 19:25:14.079 PDT] [383021] [6603838a.5d82d]: LOG:  listening on IPv4 address "127.0.0.1", port 32214
[2024-03-26 19:25:14.083 PDT] [383021] [6603838a.5d82d]: LOG:  listening on Unix socket "/home/jubilee/.pgrx/.s.PGSQL.32214"
[2024-03-26 19:25:14.086 PDT] [383021] [6603838a.5d82d]: LOG:  database system is ready to accept connections
[2024-03-26 19:25:15.217 PDT] [383021] [6603838a.5d82d]: LOG:  server process (PID 385554) was terminated by signal 6: Aborted
[2024-03-26 19:25:15.217 PDT] [383021] [6603838a.5d82d]: DETAIL:  Failed process was running: SELECT "tests"."test_rt_array_time"();
[2024-03-26 19:25:15.217 PDT] [383021] [6603838a.5d82d]: LOG:  terminating any other active server processes
[2024-03-26 19:25:15.218 PDT] [383021] [6603838a.5d82d]: LOG:  all server processes terminated; reinitializing
[2024-03-26 19:25:15.237 PDT] [383021] [6603838a.5d82d]: FATAL:  This PgAtomic is not empty, can't re-attach: 0x79dcf802a900
[2024-03-26 19:25:15.239 PDT] [383021] [6603838a.5d82d]: LOG:  database system is shut down
�[0m�[39m

Test Function Messages:
�[36m[2024-03-26 19:25:15.077 PDT] [386328] [6603838b.5e518]: LOG:  statement: BEGIN
[2024-03-26 19:25:15.077 PDT] [386328] [6603838b.5e518]: LOG:  statement: SELECT "tests"."test_complex_storage_and_retrieval"();
�[39m

Client Error:
�[31m�[1mconnection closed�[0m�[39m
postgres location: �[37m�[2m<unknown>�[0m�[39m
rust location: �[33m<unknown>�[39m




failures:
    tests::roundtrip_tests::tests::pg_test_rt_array_time
    tests::struct_type_tests::tests::pg_test_complex_storage_and_retrieval

test result: FAILED. 459 passed; 2 failed; 1 ignored; 0 measured; 0 filtered out; finished in 11.24s

�[34m�[1mstopping postgres (pid=383021)
�[0m�[39m

@workingjubilee
Copy link
Member Author

On nightly, the common thread between all the errors is this:

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s
Error: 
   0: Could not get shared object file from Cargo output.

Location:
   cargo-pgrx/src/command/install.rs:441

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   0: cargo_pgrx::command::install::find_library_file
      at cargo-pgrx/src/command/install.rs:412
   1: cargo_pgrx::command::install::install_extension with pg_version=14.10 profile=Dev test=true features=["pg_test", "pg14"]
      at cargo-pgrx/src/command/install.rs:114
   2: cargo_pgrx::command::install::execute
      at cargo-pgrx/src/command/install.rs:63

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.


Location:
    pgrx-tests/src/framework.rs:372:20

---- tests::zero_datum_edge_cases::tests::pg_test_zero_i32_is_some_zero stdout ----
installing extension
detected cargo args: Features { all_features: false, no_default_features: true, features: ["pg14"] }
thread 'tests::zero_datum_edge_cases::tests::pg_test_zero_i32_is_some_zero' panicked at pgrx-tests/src/tests/zero_datum_edge_cases.rs:60:5:
Failure installing extension using command: CARGO_TARGET_DIR="/home/jubilee/tcdi/pgrx/target" "/home/jubilee/.cargo/bin/cargo-pgrx" "pgrx" "install" "--test" "--pg-config" "/home/jubilee/.pgrx/14.10/pgrx-install/bin/pg_config" "--features" "pg_test pg14" "--no-default-features"

@workingjubilee
Copy link
Member Author

rustc-2024-01-27 passes the test suite on develop, bisecting the issues into rustc from there...

@workingjubilee
Copy link
Member Author

workingjubilee commented Mar 27, 2024

bisected to nightly-2024-02-10:

rustc 1.78.0-nightly (d44e3b95c 2024-02-09)
binary: rustc
commit-hash: d44e3b95cb9d410d89cb8ab3233906a33f43756a
commit-date: 2024-02-09
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 17.0.6

nightly-2024-02-09 passes.

that puts it somewhere in here: rust-lang/rust@98aa362...d44e3b9

@workingjubilee
Copy link
Member Author

There were actually two issues, one obfuscating another. The latter one is about cargo.

workingjubilee added a commit that referenced this issue Apr 5, 2024
Required for, but does not fix on its own,
#1624
@workingjubilee
Copy link
Member Author

Found the murderer:

It will take a bandolier of tools to pin down the exact issue but the way things are aborting I suspect there's some kind of double-panic or unwind-into-C thing going on.

@workingjubilee
Copy link
Member Author

It will not. I need to finish #1640 though.

workingjubilee added a commit that referenced this issue Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant