pgrx icon indicating copy to clipboard operation
pgrx copied to clipboard

`cargo pgx test` fails on new project after upgrading to `0.4.5`

Open olirice opened this issue 2 years ago • 6 comments

After upgrading from from 0.4.0 to 0.4.5 with

cargo install --force cargo-pgx
cargo pgx init

cargo pgx test now fails existing and brand-new projects created with cargo pgx new pg_sample

setup

cargo pgx new pg_sample
cd pg_sample
cargo pgx test

results in: Screen Shot 2022-07-21 at 1 00 35 PM

But when installing with cargo pgx run or cargo pgx install and test the extensions manually they work fine so I think its limited to testing.

System:

  • Rust/Cargo: 1.62.1
  • OS: macOS 12.4 (M1)
  • pgx: 0.4.5

olirice avatar Jul 21 '22 18:07 olirice

I was unable to replicate this on my Linux machine. I'm just stepping out for the day but I can try to replicate this on my M1 tomorrow. Thanks for the report!

Hoverbear avatar Jul 21 '22 19:07 Hoverbear

Was able to get unblocked on this by uninstalling, deleting the ~/.pgx directory, and re-installing

cargo uninstall cargo-pgx
rm -rf ~/.pgx
cargo install cargo-pgx
cargo pgx init

olirice avatar Jul 26 '22 13:07 olirice

Running into this issue as well, with the same setup. Just started developing the extension, so started on 0.4.5 and testing was working initially. Now testing doesn't work even when using the sample project.

Unfortunately for me, reinstalling did not solve it. I also tried the 0.5.0-beta.0 version.

For the benefit of GH search (I was getting the same error at times, though it no longer is being shown): error: test failed, to rerun pass '--lib' process didn't exit successfully: ... signal: 11, SIGSEGV: invalid memory reference

Sorry, I don't have anything to add, will report back if I do.

BrianSakhai avatar Jul 31 '22 17:07 BrianSakhai

The issue appeared for me again after 1 successful run of cargo pgx test following re-install

re-opening since ^ is experiencing it too

olirice avatar Aug 01 '22 14:08 olirice

I no longer have access to an M1 Mac so unfortunately I cannot help anymore. Perhaps someone with an M1 mac can help.

Hoverbear avatar Aug 09 '22 16:08 Hoverbear

Probably was not solved by https://github.com/tcdi/pgx/pull/687 but that was a patch of UB so in reality: lol who knows, anything goes.

workingjubilee avatar Sep 17 '22 05:09 workingjubilee

Please try

pgx = "0.5.6"

in your Cargo.toml and confirm if this is fixed or still broken? You probably will also need to cargo install --locked cargo-pgx. Thank you!

workingjubilee avatar Oct 20 '22 02:10 workingjubilee