pgrx
pgrx copied to clipboard
`cargo pgx test` fails on new project after upgrading to `0.4.5`
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:

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
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!
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
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.
The issue appeared for me again after 1 successful run of cargo pgx test following re-install
re-opening since ^ is experiencing it too
I no longer have access to an M1 Mac so unfortunately I cannot help anymore. Perhaps someone with an M1 mac can help.
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.
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!