-
-
Notifications
You must be signed in to change notification settings - Fork 280
fix a deadlock in cargo pgrx install
during get_git_hash()
#1935
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
Merged
eeeebbbbrrrr
merged 1 commit into
pgcentralfoundation:develop
from
eeeebbbbrrrr:fix-githash-deadlock
Nov 2, 2024
Merged
fix a deadlock in cargo pgrx install
during get_git_hash()
#1935
eeeebbbbrrrr
merged 1 commit into
pgcentralfoundation:develop
from
eeeebbbbrrrr:fix-githash-deadlock
Nov 2, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I can't quite explain why, but this function was deadlocking with this backtrace: ``` * thread #1, name = 'cargo-pgrx', stop reason = signal SIGSTOP * frame #0: 0x00007fbe1eeb288d libc.so.6`syscall at syscall.S:38 frame #1: 0x000055aee526c5d3 cargo-pgrx`std::sys::sync::mutex::futex::Mutex::lock_contended::h6389e2305b0b005c [inlined] std::sys::pal::unix::futex::futex_wait::h30abf43e2d55aa33 at futex.rs:67:21 frame #2: 0x000055aee526c590 cargo-pgrx`std::sys::sync::mutex::futex::Mutex::lock_contended::h6389e2305b0b005c at futex.rs:57:13 frame #3: 0x000055aee4157835 cargo-pgrx`std::sync::mutex::Mutex$LT$T$GT$::lock::h4d2bb65800cc6fd3 at futex.rs:29:13 frame pgcentralfoundation#4: 0x000055aee41577ed cargo-pgrx`std::sync::mutex::Mutex$LT$T$GT$::lock::h4d2bb65800cc6fd3(self=0x000055aee6926c20) at mutex.rs:317:24 frame pgcentralfoundation#5: 0x000055aee406c779 cargo-pgrx`cargo_pgrx::command::install::get_git_hash::ha84d504db9d1bba8(manifest_path=0x00007ffdc43b83b0) at install.rs:507:9 frame pgcentralfoundation#6: 0x000055aee406d6e9 cargo-pgrx`cargo_pgrx::command::install::filter_contents::h8c710847129ba6be(manifest_path=0x00007ffdc43b8d10, input=String @ 0x00007ffdc43b8940) at install.rs:541:46 ```
I'm gonna have to release a v0.12.8 because of this. This stopped me dead in upgrading ZomboDB to pgrx v0.12.7. :( |
eeeebbbbrrrr
added a commit
that referenced
this pull request
Nov 2, 2024
I can't quite explain why, but this function was deadlocking with this backtrace: ``` * thread #1, name = 'cargo-pgrx', stop reason = signal SIGSTOP * frame #0: 0x00007fbe1eeb288d libc.so.6`syscall at syscall.S:38 frame #1: 0x000055aee526c5d3 cargo-pgrx`std::sys::sync::mutex::futex::Mutex::lock_contended::h6389e2305b0b005c [inlined] std::sys::pal::unix::futex::futex_wait::h30abf43e2d55aa33 at futex.rs:67:21 frame #2: 0x000055aee526c590 cargo-pgrx`std::sys::sync::mutex::futex::Mutex::lock_contended::h6389e2305b0b005c at futex.rs:57:13 frame #3: 0x000055aee4157835 cargo-pgrx`std::sync::mutex::Mutex$LT$T$GT$::lock::h4d2bb65800cc6fd3 at futex.rs:29:13 frame #4: 0x000055aee41577ed cargo-pgrx`std::sync::mutex::Mutex$LT$T$GT$::lock::h4d2bb65800cc6fd3(self=0x000055aee6926c20) at mutex.rs:317:24 frame #5: 0x000055aee406c779 cargo-pgrx`cargo_pgrx::command::install::get_git_hash::ha84d504db9d1bba8(manifest_path=0x00007ffdc43b83b0) at install.rs:507:9 frame #6: 0x000055aee406d6e9 cargo-pgrx`cargo_pgrx::command::install::filter_contents::h8c710847129ba6be(manifest_path=0x00007ffdc43b8d10, input=String @ 0x00007ffdc43b8940) at install.rs:541:46 ```
Update: the code was exercising this little rust gotcha that is being addressed in the 2024 edition: |
eeeebbbbrrrr
added a commit
that referenced
this pull request
Feb 24, 2025
Welcome to pgrx v0.13.0. The first update in a little bit, which makes pgrx current with upstream dependencies, rust 1.85.0 (but not 2024 Edition, yet), and a slew of fixes and cleanups and community contributions. # Upgrading You'll need to `cargo install cargo-pgrx --version 0.13.0 --locked` to get the latest `cargo-pgrx` tool, and then you can run `cargo pgrx upgrade` in your extension crates to update their dependencies. # Breaking Changes Generally, the only breaking changes in v0.13.0 are related to the user-facing SPI APIs. In general, SPI functions that previously took a Vec of Arguments now take a `&[DatumWithOid]`, with proper lifetime bounds. This is a fairly straightforward, boilerplate to update to. @YohDeadfall has done a lot of work on improving SPI's safety and it's greatly appreciated! # What's Changed ## `cargo-pgrx` * fix a deadlock in `cargo pgrx install` during `get_git_hash()` by @eeeebbbbrrrr in #1935 * `cargo pgrx test --runas` envar passing by @eeeebbbbrrrr in #1674 * Search for sql upgrade scripts relative to the package manifest by @tristan957 in #1979 ## Build System * use `allowlist_file` for bindgen by @usamoi in #1922 * add `pg_config --libdir` to linker search path by @usamoi in #1932 * lock patch version of pgrx-bindgen by @usamoi in #1939 * Introduce a blocklist of "yanked" Postgres versions by @eeeebbbbrrrr in #1950 * Make sure bindgen gets the cppflags even if we aren't using macOS by @thomcc in #1336 ## SPI * Made SPI query arguments type safe by @YohDeadfall in #1858 * Changed args of prepare methods to be slices by @YohDeadfall in #1933 * Added connect_mut for data changing SPI operations by @YohDeadfall in #1913 ## General `pgrx-pg-sys` Interfaces * Allow creating Oid from a u32 in a const context by @syvb in #1943 * Add utils/acl.h by @daamien in #1945 * Add catalog/catalog.h by @daamien in #1946 * Added `oids_of!` macro by @YohDeadfall in #1879 * Port `bufpage.h` functions by @rebasedming in #1982 ## Bug Fixes * Check wakeup_flags from `wait_latch` function to exit on `WL_POSTMASTER_DEATH` by @var77 in #1938 ## Overall Code Cleanup * refactor: remove redundant references (`&`) by @hamirmahal in #1941 * fix warnings by @usamoi in #1948 * Updating readme.md by @ChronicallyJD in #1949 * style: simplify some statements for readability by @hamirmahal in #1962 * docs: fix pgx info in cargo-pgrx README by @mrdrivingduck in #1953 * Updated expected UI test outputs by @YohDeadfall in #1981 * Fix "about" info for cross subcommand by @mjgarton in #1974 * update dependencies and fix compilation issues by @eeeebbbbrrrr in #1983 # Thanks! Thanks to the community, past, present, and future. Especially to our new contributors... # New Contributors * @var77 made their first contribution in #1938 * @ChronicallyJD made their first contribution in #1949 * @mrdrivingduck made their first contribution in #1953 * @tristan957 made their first contribution in #1979 * @mjgarton made their first contribution in #1974 **Full Changelog**: v0.12.7...v0.13.0
usamoi
pushed a commit
to tensorchord/pgrx
that referenced
this pull request
Mar 6, 2025
…tralfoundation#1935) I can't quite explain why, but this function was deadlocking with this backtrace: ``` * thread pgcentralfoundation#1, name = 'cargo-pgrx', stop reason = signal SIGSTOP * frame #0: 0x00007fbe1eeb288d libc.so.6`syscall at syscall.S:38 frame pgcentralfoundation#1: 0x000055aee526c5d3 cargo-pgrx`std::sys::sync::mutex::futex::Mutex::lock_contended::h6389e2305b0b005c [inlined] std::sys::pal::unix::futex::futex_wait::h30abf43e2d55aa33 at futex.rs:67:21 frame pgcentralfoundation#2: 0x000055aee526c590 cargo-pgrx`std::sys::sync::mutex::futex::Mutex::lock_contended::h6389e2305b0b005c at futex.rs:57:13 frame pgcentralfoundation#3: 0x000055aee4157835 cargo-pgrx`std::sync::mutex::Mutex$LT$T$GT$::lock::h4d2bb65800cc6fd3 at futex.rs:29:13 frame pgcentralfoundation#4: 0x000055aee41577ed cargo-pgrx`std::sync::mutex::Mutex$LT$T$GT$::lock::h4d2bb65800cc6fd3(self=0x000055aee6926c20) at mutex.rs:317:24 frame pgcentralfoundation#5: 0x000055aee406c779 cargo-pgrx`cargo_pgrx::command::install::get_git_hash::ha84d504db9d1bba8(manifest_path=0x00007ffdc43b83b0) at install.rs:507:9 frame pgcentralfoundation#6: 0x000055aee406d6e9 cargo-pgrx`cargo_pgrx::command::install::filter_contents::h8c710847129ba6be(manifest_path=0x00007ffdc43b8d10, input=String @ 0x00007ffdc43b8940) at install.rs:541:46 ```
usamoi
pushed a commit
to tensorchord/pgrx
that referenced
this pull request
Mar 6, 2025
Welcome to pgrx v0.13.0. The first update in a little bit, which makes pgrx current with upstream dependencies, rust 1.85.0 (but not 2024 Edition, yet), and a slew of fixes and cleanups and community contributions. # Upgrading You'll need to `cargo install cargo-pgrx --version 0.13.0 --locked` to get the latest `cargo-pgrx` tool, and then you can run `cargo pgrx upgrade` in your extension crates to update their dependencies. # Breaking Changes Generally, the only breaking changes in v0.13.0 are related to the user-facing SPI APIs. In general, SPI functions that previously took a Vec of Arguments now take a `&[DatumWithOid]`, with proper lifetime bounds. This is a fairly straightforward, boilerplate to update to. @YohDeadfall has done a lot of work on improving SPI's safety and it's greatly appreciated! # What's Changed ## `cargo-pgrx` * fix a deadlock in `cargo pgrx install` during `get_git_hash()` by @eeeebbbbrrrr in pgcentralfoundation#1935 * `cargo pgrx test --runas` envar passing by @eeeebbbbrrrr in pgcentralfoundation#1674 * Search for sql upgrade scripts relative to the package manifest by @tristan957 in pgcentralfoundation#1979 ## Build System * use `allowlist_file` for bindgen by @usamoi in pgcentralfoundation#1922 * add `pg_config --libdir` to linker search path by @usamoi in pgcentralfoundation#1932 * lock patch version of pgrx-bindgen by @usamoi in pgcentralfoundation#1939 * Introduce a blocklist of "yanked" Postgres versions by @eeeebbbbrrrr in pgcentralfoundation#1950 * Make sure bindgen gets the cppflags even if we aren't using macOS by @thomcc in pgcentralfoundation#1336 ## SPI * Made SPI query arguments type safe by @YohDeadfall in pgcentralfoundation#1858 * Changed args of prepare methods to be slices by @YohDeadfall in pgcentralfoundation#1933 * Added connect_mut for data changing SPI operations by @YohDeadfall in pgcentralfoundation#1913 ## General `pgrx-pg-sys` Interfaces * Allow creating Oid from a u32 in a const context by @syvb in pgcentralfoundation#1943 * Add utils/acl.h by @daamien in pgcentralfoundation#1945 * Add catalog/catalog.h by @daamien in pgcentralfoundation#1946 * Added `oids_of!` macro by @YohDeadfall in pgcentralfoundation#1879 * Port `bufpage.h` functions by @rebasedming in pgcentralfoundation#1982 ## Bug Fixes * Check wakeup_flags from `wait_latch` function to exit on `WL_POSTMASTER_DEATH` by @var77 in pgcentralfoundation#1938 ## Overall Code Cleanup * refactor: remove redundant references (`&`) by @hamirmahal in pgcentralfoundation#1941 * fix warnings by @usamoi in pgcentralfoundation#1948 * Updating readme.md by @ChronicallyJD in pgcentralfoundation#1949 * style: simplify some statements for readability by @hamirmahal in pgcentralfoundation#1962 * docs: fix pgx info in cargo-pgrx README by @mrdrivingduck in pgcentralfoundation#1953 * Updated expected UI test outputs by @YohDeadfall in pgcentralfoundation#1981 * Fix "about" info for cross subcommand by @mjgarton in pgcentralfoundation#1974 * update dependencies and fix compilation issues by @eeeebbbbrrrr in pgcentralfoundation#1983 # Thanks! Thanks to the community, past, present, and future. Especially to our new contributors... # New Contributors * @var77 made their first contribution in pgcentralfoundation#1938 * @ChronicallyJD made their first contribution in pgcentralfoundation#1949 * @mrdrivingduck made their first contribution in pgcentralfoundation#1953 * @tristan957 made their first contribution in pgcentralfoundation#1979 * @mjgarton made their first contribution in pgcentralfoundation#1974 **Full Changelog**: pgcentralfoundation/pgrx@v0.12.7...v0.13.0
KenjiBrown
pushed a commit
to SoftwareLibreMx/pgrx
that referenced
this pull request
May 27, 2025
…tralfoundation#1935) I can't quite explain why, but this function was deadlocking with this backtrace: ``` * thread pgcentralfoundation#1, name = 'cargo-pgrx', stop reason = signal SIGSTOP * frame #0: 0x00007fbe1eeb288d libc.so.6`syscall at syscall.S:38 frame pgcentralfoundation#1: 0x000055aee526c5d3 cargo-pgrx`std::sys::sync::mutex::futex::Mutex::lock_contended::h6389e2305b0b005c [inlined] std::sys::pal::unix::futex::futex_wait::h30abf43e2d55aa33 at futex.rs:67:21 frame pgcentralfoundation#2: 0x000055aee526c590 cargo-pgrx`std::sys::sync::mutex::futex::Mutex::lock_contended::h6389e2305b0b005c at futex.rs:57:13 frame pgcentralfoundation#3: 0x000055aee4157835 cargo-pgrx`std::sync::mutex::Mutex$LT$T$GT$::lock::h4d2bb65800cc6fd3 at futex.rs:29:13 frame pgcentralfoundation#4: 0x000055aee41577ed cargo-pgrx`std::sync::mutex::Mutex$LT$T$GT$::lock::h4d2bb65800cc6fd3(self=0x000055aee6926c20) at mutex.rs:317:24 frame pgcentralfoundation#5: 0x000055aee406c779 cargo-pgrx`cargo_pgrx::command::install::get_git_hash::ha84d504db9d1bba8(manifest_path=0x00007ffdc43b83b0) at install.rs:507:9 frame pgcentralfoundation#6: 0x000055aee406d6e9 cargo-pgrx`cargo_pgrx::command::install::filter_contents::h8c710847129ba6be(manifest_path=0x00007ffdc43b8d10, input=String @ 0x00007ffdc43b8940) at install.rs:541:46 ```
KenjiBrown
pushed a commit
to SoftwareLibreMx/pgrx
that referenced
this pull request
May 27, 2025
Welcome to pgrx v0.13.0. The first update in a little bit, which makes pgrx current with upstream dependencies, rust 1.85.0 (but not 2024 Edition, yet), and a slew of fixes and cleanups and community contributions. # Upgrading You'll need to `cargo install cargo-pgrx --version 0.13.0 --locked` to get the latest `cargo-pgrx` tool, and then you can run `cargo pgrx upgrade` in your extension crates to update their dependencies. # Breaking Changes Generally, the only breaking changes in v0.13.0 are related to the user-facing SPI APIs. In general, SPI functions that previously took a Vec of Arguments now take a `&[DatumWithOid]`, with proper lifetime bounds. This is a fairly straightforward, boilerplate to update to. @YohDeadfall has done a lot of work on improving SPI's safety and it's greatly appreciated! # What's Changed ## `cargo-pgrx` * fix a deadlock in `cargo pgrx install` during `get_git_hash()` by @eeeebbbbrrrr in pgcentralfoundation#1935 * `cargo pgrx test --runas` envar passing by @eeeebbbbrrrr in pgcentralfoundation#1674 * Search for sql upgrade scripts relative to the package manifest by @tristan957 in pgcentralfoundation#1979 ## Build System * use `allowlist_file` for bindgen by @usamoi in pgcentralfoundation#1922 * add `pg_config --libdir` to linker search path by @usamoi in pgcentralfoundation#1932 * lock patch version of pgrx-bindgen by @usamoi in pgcentralfoundation#1939 * Introduce a blocklist of "yanked" Postgres versions by @eeeebbbbrrrr in pgcentralfoundation#1950 * Make sure bindgen gets the cppflags even if we aren't using macOS by @thomcc in pgcentralfoundation#1336 ## SPI * Made SPI query arguments type safe by @YohDeadfall in pgcentralfoundation#1858 * Changed args of prepare methods to be slices by @YohDeadfall in pgcentralfoundation#1933 * Added connect_mut for data changing SPI operations by @YohDeadfall in pgcentralfoundation#1913 ## General `pgrx-pg-sys` Interfaces * Allow creating Oid from a u32 in a const context by @syvb in pgcentralfoundation#1943 * Add utils/acl.h by @daamien in pgcentralfoundation#1945 * Add catalog/catalog.h by @daamien in pgcentralfoundation#1946 * Added `oids_of!` macro by @YohDeadfall in pgcentralfoundation#1879 * Port `bufpage.h` functions by @rebasedming in pgcentralfoundation#1982 ## Bug Fixes * Check wakeup_flags from `wait_latch` function to exit on `WL_POSTMASTER_DEATH` by @var77 in pgcentralfoundation#1938 ## Overall Code Cleanup * refactor: remove redundant references (`&`) by @hamirmahal in pgcentralfoundation#1941 * fix warnings by @usamoi in pgcentralfoundation#1948 * Updating readme.md by @ChronicallyJD in pgcentralfoundation#1949 * style: simplify some statements for readability by @hamirmahal in pgcentralfoundation#1962 * docs: fix pgx info in cargo-pgrx README by @mrdrivingduck in pgcentralfoundation#1953 * Updated expected UI test outputs by @YohDeadfall in pgcentralfoundation#1981 * Fix "about" info for cross subcommand by @mjgarton in pgcentralfoundation#1974 * update dependencies and fix compilation issues by @eeeebbbbrrrr in pgcentralfoundation#1983 # Thanks! Thanks to the community, past, present, and future. Especially to our new contributors... # New Contributors * @var77 made their first contribution in pgcentralfoundation#1938 * @ChronicallyJD made their first contribution in pgcentralfoundation#1949 * @mrdrivingduck made their first contribution in pgcentralfoundation#1953 * @tristan957 made their first contribution in pgcentralfoundation#1979 * @mjgarton made their first contribution in pgcentralfoundation#1974 **Full Changelog**: pgcentralfoundation/pgrx@v0.12.7...v0.13.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I can't quite explain why, but this function was deadlocking with this backtrace: