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

Segmentation fault on db pull #2998

Open
svickers opened this issue Dec 29, 2024 · 5 comments
Open

Segmentation fault on db pull #2998

svickers opened this issue Dec 29, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@svickers
Copy link

Describe the bug
I've had no luck getting supabase set up for local development with an existing project. All the containers start fine but I end up with a blank file migrations/20241229224617_remote_schema.sql file and a segmentation fault error. I've tried db reset multiple times as well but with no luck.

To Reproduce
Steps to reproduce the behavior:

  1. npx supabase init
  2. npx supabase login
  3. npx supabase link
  4. npx supabase start
  5. npx supabase db pull --linked

Expected behavior
New file in /migrations that contains the init script for the database.

Screenshots
Screenshot_624

System information

  • Ticket ID: 170026373437488bb89e4a8ba115ea6b
  • Version of OS: Windows 11
  • Version of CLI: 2.1.1
  • Version of Docker: 27.4.0
  • Versions of services:
SERVICE IMAGE LOCAL LINKED
supabase/postgres 15.8.1.020 15.8.1.020
supabase/gotrue v2.167.0 v2.167.0
postgrest/postgrest v12.2.3 v12.2.3
supabase/realtime v2.33.58 -
supabase/storage-api v1.14.4 v1.14.4
supabase/edge-runtime v1.65.4 -
supabase/studio 20241202-71e5240 -
supabase/postgres-meta v0.84.2 -
supabase/logflare 1.4.0 -
supabase/supavisor 1.1.56 -
@sweatybridge
Copy link
Contributor

This is a bit strange. Could you try the following command to help rule out potential issues with the postgres image

echo '15.6.1.143' > supabase/.temp/postgres-version
npx supabase db pull --linked

@sweatybridge sweatybridge added the bug Something isn't working label Dec 30, 2024
@svickers
Copy link
Author

@sweatybridge Same issue still unfortunately.

@auskim
Copy link

auskim commented Jan 3, 2025

Seeing this same segfault message, on CLI version 2.2.1, macOS ARM binary. I also rolled back to 2.0.0 and manually ran the pg_dump commands against our Supabase remote DB, all with the same result. I tried the pg_dump command with every --schema and --table we have, and those do actually all work.

I didn't see this problem earlier today. supabase db pull worked, but I reverted the migration history on the remote and cleared all local migration files to try and do a 'clean pull' and I believe this issue started immediately afterward.

@auskim
Copy link

auskim commented Jan 6, 2025

Seems to be resolved by pushing a empty new migration to the remote DB from a clean local instance (no existing schemas/tables/migrations) via supabase db push, which works for some reason, and then trying supabase db pull. It's not really clear to me why

@sweatybridge
Copy link
Contributor

For future reference, another alternative you can try is to dump the schema without docker

supabase db dump --dry-run > dump.sh

This creates a bash script that you can then run to fetch the remote schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants