-
Notifications
You must be signed in to change notification settings - Fork 6
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
Shutdown (without persist) hangs in Github actions #9
Comments
Could you post a code sample? I briefly looked at the docs and it says "SIGKILL kills the postgres process without letting it relay the signal to its subprocesses, so it might be necessary to kill the individual subprocesses by hand as well." which I didn't know - maybe in my testing I only ever tried to kill it before doing work and the subprocesses were never spawned. |
This sample completes ok locally, but in my Github Actions it hangs indefinitely after printing "closing temp DB"
|
Per #10 the issue is I was dumb with how I designed the shutdown function - probably what happened was that I wrote shutdown as There are a lot of options here to fix this and pretty much all of them are breaking changes (which tbh isn't that big a deal since it's not like I have a ton of users). Probably simplest solution (and also doesn't change the API) is the one you provided but give me a bit to think about it. |
No hurry, but the PR is a separate issue - I see in github that shutdown
never completes on the first call.
…On Thu, 11 Jul 2024, 0:20 Harry Stern, ***@***.***> wrote:
Per #10 <#10> the issue is I
was dumb with how I designed the shutdown function - probably what happened
was that I wrote shutdown as fn shutdown(mut self) but then I wanted to
use it inside drop, which is implemented with fn drop(&mut self) so I
thought "oh I'll just change the signature of shutdown". However, it's
obvious in hindsight that shutdown will then be called twice.
There are a lot of options here to fix this and pretty much all of them
are breaking changes (which tbh isn't that big a deal since it's not like I
have a ton of users). Probably simplest solution (and also doesn't change
the API) is the one you provided but give me a bit to think about it.
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDEBBRYVD3XG7ABXU4BBWLZLWQSJAVCNFSM6AAAAABKSVYIEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRRGUYDGNBSGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
So the PR doesn't solve the hanging issue? |
nope, it solves a different issue. |
Taking another look at this I wonder if the older version of pg in CI is different than what we have locally and maybe the behavior on sigkill is different, and a newer pg does better cleanup? I can't get this to race locally with 1 or 100 connections. |
I don't think it's a version mismatch - checked this with CI & local versions both 16.3. |
I'm also on linux with 16.3. If you run the test in release mode does it hang in CI still? |
Yup.
…On Sun, 18 Aug 2024, 2:17 Harry Stern, ***@***.***> wrote:
I'm also on linux with 16.3. If you run the test in release mode does it
hang in CI still?
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDEBBTDS5JIQ4MVSKBW5CDZR7KZ7AVCNFSM6AAAAABKSVYIEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGAZDGMZRGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The newest release, v0.5.0, uses fast shutdown instead of sending SIGKILL. Could you check and see if this issue still occurs with the newest version? |
I can't repro this locally, so I don't know what the source of the issue is. The temporary DB, created with
PgTempDB::async_new().await
(sopersist
isn't set), hangs for minutes after a call toshutdown
. Maybe there are some existing connections to the DB, but according to the documentation, this shouldn't blockshutdown
whenpersist
isn't set.This happens on a runner running Ubuntu noble, with postgresql-16 installed.
The text was updated successfully, but these errors were encountered: