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

Postgresql service not shutting down (process-compose hangs) #2354

Closed
carlotm opened this issue Oct 15, 2024 · 7 comments
Closed

Postgresql service not shutting down (process-compose hangs) #2354

carlotm opened this issue Oct 15, 2024 · 7 comments
Labels
bug Something isn't working triage Issue needs triage

Comments

@carlotm
Copy link

carlotm commented Oct 15, 2024

What happened?

What's happening

The postgresql service does not shut down correctly.
The process-compose TUI hangs forever when trying to quit.
The postgresql os processes are kept running if you kill the process-compose terminal.

What to expect

If you press F10 the postgresql service should shut down correctly.

Steps to reproduce

  1. Create a new devbox shell env
  2. Install glibcLocales if needed, and postgresql
  3. Run devbox services up
  4. Wait for postgresql to be ready
  5. Try to stop the server with F10 which also quits the TUI

Command

services

devbox.json

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.4/.schema/devbox.schema.json",
  "packages": {
    "glibcLocales": {
      "version":   "latest",
      "platforms": ["x86_64-linux", "aarch64-linux"]
    },
    "postgresql": "latest"
  },
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}

Devbox version

0.13.4

Nix version

No response

What system does this bug occur on?

Linux (x86-64)

Debug logs

No response

@carlotm carlotm added bug Something isn't working triage Issue needs triage labels Oct 15, 2024
@behzade
Copy link

behzade commented Oct 15, 2024

my current workaround is this script
{ "scripts": { "down": [ "pg_ctl stop -m fast", "devbox services stop" ] } }

@carlotm
Copy link
Author

carlotm commented Oct 15, 2024

@behzade that works. Thanks.

@carlotm
Copy link
Author

carlotm commented Oct 15, 2024

Maybe related to F1bonacc1/process-compose#258

savil pushed a commit that referenced this issue Oct 15, 2024
## Summary

Process-compose 1.34 introduces a bug that causes postgresql and other
daemon-based processes to hang indefinitely.

See #2354 for more details.

## How was it tested?

Tested postgresql plugin using 1.34, 1.27 -- verified that the issue
still existed
Tested postgresql plugin with 1.24.2 -- verified the issue was resolved
@Lagoja
Copy link
Contributor

Lagoja commented Oct 16, 2024

@carlotm Doing some testing with this, I think the best option is to revert process-compose to 1.24.2 until there is a fix on the process-compose side. I'm seeing the same issue, but can't create a process-compose.yaml that reliably circumvents it

@carlotm
Copy link
Author

carlotm commented Oct 16, 2024

@Lagoja thanks for testing.

Dumb question:
can I downgrade just process-compose? Installing an older version in a shell does not seem to work, it always picks up 1.34.0

@Lagoja
Copy link
Contributor

Lagoja commented Oct 16, 2024

New release is out at 0.13.5 that reverts process-compose back to 1.24.2. Can you verify that fixes the issue?

@carlotm, we don't currently support it, but this issue makes me think we should have some override. An issue is that letting users override the version of process-compose they want to use may break some Devbox features, so we'd probably want a minimum version requirement somewhere.

@carlotm
Copy link
Author

carlotm commented Oct 17, 2024

@Lagoja The new version fixes, thank you!

@Lagoja maybe a new key in the json schema for the process-compose version?

@carlotm carlotm closed this as completed Oct 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 triage Issue needs triage
Development

No branches or pull requests

3 participants