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

psql causing segfaults #135170

Closed
4 tasks done
matthughes opened this issue Jun 27, 2023 · 6 comments
Closed
4 tasks done

psql causing segfaults #135170

matthughes opened this issue Jun 27, 2023 · 6 comments
Labels
bug Reproducible Homebrew/homebrew-core bug needs response Needs a response from the issue/PR author outdated PR was locked due to age stale No recent activity

Comments

@matthughes
Copy link

brew gist-logs <formula> link OR brew config AND brew doctor output

~ brew config && brew doctor
HOMEBREW_VERSION: 4.0.26
ORIGIN: https://github.com/Homebrew/brew
HEAD: eff45ef570f265e226f14ce91da72d7a6e7d516a
Last commit: 5 hours ago
Core tap JSON: 27 Jun 19:44 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.3 build 1403
Git: 2.39.2 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.88.1 => /usr/bin/curl
macOS: 13.4-arm64
CLT: 14.3.1.0.1.1683849156
Xcode: N/A
Rosetta 2: false
Your system is ready to brew.```

Verification

  • My "brew doctor output" says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

Run psql to connect to a local postgres database (or remote).

What happened (include all command output)?

Get segfault.

> psql -Uonyx -donyx -hlocalhost -p5436
[1]    57520 segmentation fault  psql -Uonyx -donyx -hlocalhost -p5436

>~ otool -L /opt/homebrew/bin/psql
/opt/homebrew/bin/psql:
	/opt/homebrew/lib/postgresql@14/libpq.5.dylib (compatibility version 5.0.0, current version 5.14.0)
	/opt/homebrew/opt/readline/lib/libreadline.8.dylib (compatibility version 8.2.0, current version 8.2.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
➜  ~ lldb -- psql -Uonyx -donyx -hlocalhost -p5436
(lldb) target create "psql"
Current executable set to '/opt/homebrew/bin/psql' (arm64).
(lldb) settings set -- target.run-args  "-Uonyx" "-donyx" "-hlocalhost" "-p5436"
(lldb) run
Process 57469 launched: '/opt/homebrew/bin/psql' (arm64)
Process 57469 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xce2d3793ac6f0025)
    frame #0: 0x00000001003d2c18 libkrb5.3.3.dylib`krb5_free_principal + 20
libkrb5.3.3.dylib`krb5_free_principal:
->  0x1003d2c18 <+20>: ldr    x0, [x1, #0x18]
    0x1003d2c1c <+24>: cbz    x0, 0x1003d2c6c           ; <+104>
    0x1003d2c20 <+28>: ldr    w20, [x19, #0x20]
    0x1003d2c24 <+32>: cmp    w20, #0x1

What did you expect to happen?

To be able to connect to the console.

Step-by-step reproduction instructions (by running brew commands)

- brew install postgresql@14
- attempt to connect to postgres database
@matthughes matthughes added the bug Reproducible Homebrew/homebrew-core bug label Jun 27, 2023
@limingxinleo
Copy link

@matthughes
Copy link
Author

matthughes commented Jun 28, 2023 via email

@Bo98
Copy link
Member

Bo98 commented Jun 28, 2023

I've been unable to reproduce so far, though I am running x86_64 and am only trying the most basic of setups (default configuration with brew services run postgresql@14):

$ psql -dpostgres
psql (14.8 (Homebrew))
Type "help" for help.

postgres=# 

A backtrace (bt) might be useful.

@cho-m
Copy link
Member

cho-m commented Jun 29, 2023

Do we need GSSAPI authentication to reproduce? Looks like failure is happening interacting with krb5 (krb5_free_principal).

EDIT: Anyway, I also can't reproduce on ARM Ventura using default database so additional details like the backtrace will be essential to figuring out what is wrong.

@cho-m cho-m added the needs response Needs a response from the issue/PR author label Jun 30, 2023
@catks
Copy link

catks commented Jul 18, 2023

Seems related to an update on krb5, see: ged/ruby-pg#538 and ged/ruby-pg#311 (comment)

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Aug 9, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2023
@github-actions github-actions bot added the outdated PR was locked due to age label Sep 16, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/homebrew-core bug needs response Needs a response from the issue/PR author outdated PR was locked due to age stale No recent activity
Projects
None yet
Development

No branches or pull requests

5 participants