homebrew-core: openssl@3.2.0 update makes psql crash when connecting with TLS
brew gist-logs <formula> link OR brew config AND brew doctor output
Error: No logs.
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
openssl@1.1
Verification
- My “
brew doctoroutput” saysYour system is ready to brew.and am still able to reproduce my issue. - I ran
brew updateand am still able to reproduce my issue. - I have resolved all warnings from
brew doctorand 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)?
I’m trying to use psql from postgresql@16 to connect to a server that requires TLS.
What happened (include all command output)?
psql is crashing with a pointer error.
What did you expect to happen?
psql should connect successfully to a TLS postgresql server.
Step-by-step reproduction instructions (by running brew commands)
My issue has been fixed by downgrading `openssl@3` to `openssl` version 3.1.4
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Reactions: 20
- Comments: 26 (7 by maintainers)
Links to this issue
Commits related to this issue
- Give BIO an ex_data It has one in upstream OpenSSL. The most recent OpenSSL release is hitting a compatibility issue with postgres, which seems like it'll get fixed by postgres using BIO_get_app_data... — committed to google/boringssl by davidben 7 months ago
- Give BIO an ex_data It has one in upstream OpenSSL. The most recent OpenSSL release is hitting a compatibility issue with postgres, which seems like it'll get fixed by postgres using BIO_get_app_data... — committed to samuel40791765/aws-lc by davidben 7 months ago
- Give BIO an ex_data It has one in upstream OpenSSL. The most recent OpenSSL release is hitting a compatibility issue with postgres, which seems like it'll get fixed by postgres using BIO_get_app_data... — committed to samuel40791765/aws-lc by davidben 7 months ago
- Give BIO an ex_data It has one in upstream OpenSSL. The most recent OpenSSL release is hitting a compatibility issue with postgres, which seems like it'll get fixed by postgres using BIO_get_app_data... — committed to samuel40791765/aws-lc by davidben 7 months ago
- Give BIO an ex_data It has one in upstream OpenSSL. The most recent OpenSSL release is hitting a compatibility issue with postgres, which seems like it'll get fixed by postgres using BIO_get_app_data... — committed to samuel40791765/aws-lc by davidben 7 months ago
- Give BIO an ex_data It has one in upstream OpenSSL. The most recent OpenSSL release is hitting a compatibility issue with postgres, which seems like it'll get fixed by postgres using BIO_get_app_data... — committed to WillChilds-Klein/aws-lc by davidben 7 months ago
- Give BIO an ex_data It has one in upstream OpenSSL. The most recent OpenSSL release is hitting a compatibility issue with postgres, which seems like it'll get fixed by postgres using BIO_get_app_data... — committed to samuel40791765/aws-lc by davidben 7 months ago
- Backport "Give BIO an ex_data" for Postgres (#1335) * Give BIO an ex_data It has one in upstream OpenSSL. The most recent OpenSSL release is hitting a compatibility issue with postgres, which see... — committed to aws/aws-lc by samuel40791765 7 months ago
- Use OpenSSL 3.1.4 for OS X builds This patch changes the OpenSSL version for the OS X builds to 3.1.4 since recent PostgreSQL versions contain a bug in the SSL handling and crash on OS X when OpenSSL... — committed to jnidzwetzki/timescaledb by jnidzwetzki 6 months ago
- Use OpenSSL 3.1.4 for OS X builds This patch changes the OpenSSL version for the OS X builds to 3.1.4 since recent PostgreSQL versions contain a bug in the SSL handling and crash on OS X when OpenSSL... — committed to jnidzwetzki/timescaledb by jnidzwetzki 6 months ago
- Use OpenSSL 3.1.4 for OS X builds This patch changes the OpenSSL version for the OS X builds to 3.1.4 since recent PostgreSQL versions contain a bug in the SSL handling and crash on OS X when OpenSSL... — committed to jnidzwetzki/timescaledb by jnidzwetzki 6 months ago
curl -L https://raw.githubusercontent.com/Homebrew/homebrew-core/e68186ba5a05a6ea9a30d6c7744de9a46bd3aadd/Formula/o/openssl@3.rb > openssl@3.rb && brew install openssl@3.rb
That’s the commit that upgraded the formula from 3.1.4 to 3.2. Feel free to confirm for yourself though.
Homebrew’s Postgreses now are compatible with openssl 3.2, please run
brew upgrade postgresql@<YOUR POSTGRES VERSION>orbrew upgrade libpqto get the fixed version.Thanks so much for this.
FYI to anyone who runs this: the first time I ran this, it didn’t work, giving the error:
Following these instructions and running
brew unlink openssl@3before the above command worked for me and got postgres up and running again.For those curious: https://www.postgresql.org/message-id/CX9SU44GH3P4.17X6ZZUJ5D40N@neon.tech.
@Bo98 thanks for your work on this! I will CC you on the email that I send to the list.
psql -h xxx -p 5432 -U xxx -d xxxpsql: error: connection to server at “xxx” (x.x.x.x), port 5432 failed: FATAL: no PostqreSQL user name specified in startup packet connection to server at xxx" (x.x.x.x), port 5432 failed: FATAL no PostgreSQL user name specified in startup packet psql(6636,0x10f1de600) malloc: *** error for object 0x7f916b00bc00: pointer being freed was not allocated psql(6636,0x10f1de600) malloc: *** set a breakpoint in malloc _error break to debug
@thomas-shirley it was in pgsql. OpenSSL just exposed an incorrect API usage within pgsql
Yes, this is a misuse of
BIO_set_datafrom the Postgres side. This fixes it:(+ could also remove configure checks for
BIO_get_data)Does someone have the steps to downgrade to 3.1.4?