malloc errors in psql with libpq 16.1 on Mac

Started by Don Seilerover 2 years ago4 messagesgeneral
Jump to latest
#1Don Seiler
don@seiler.us

I have a colleague trying to use psql to connect to a remote DB, but he's
getting this error:

FATAL: no PostgreSQL user name specified in startup packet

psql(42705,0x7ff84a07b700) malloc: *** error for object 0xa6: pointer being
freed was not allocated
psql(42705,0x7ff84a07b700) malloc: *** set a breakpoint in
malloc_error_break to debug

He was using psql 14 and we upgraded him to psql 15 but no change. I
noticed he was on libpq 16.1 (installed via homebrew). Another colleague
who was able to connect fine was on libpq 15.3. He upgraded to libpq 16.1
and boom he now gets the same error.

One colleague is on an older amd64 Mac, the other is on a newer arm64 Mac.
They are working to try to pin the older version of libpq but this is
probably going to bust out to a larger group as other homebrew users run
their routine updates.

Just wondering if anyone else has had similar experiences or if this is a
known issue?

--
Don Seiler
www.seiler.us

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Don Seiler (#1)
Re: malloc errors in psql with libpq 16.1 on Mac

Don Seiler <don@seiler.us> writes:

I have a colleague trying to use psql to connect to a remote DB, but he's
getting this error:
FATAL: no PostgreSQL user name specified in startup packet
psql(42705,0x7ff84a07b700) malloc: *** error for object 0xa6: pointer being
freed was not allocated
psql(42705,0x7ff84a07b700) malloc: *** set a breakpoint in
malloc_error_break to debug

Is OpenSSL in use? If so, what version? I'm wondering if this is a
variant of the OpenSSL 3.2.0 compatibility problem we just heard of:

/messages/by-id/CAN55FZ1eDDYsYaL7mv+oSLUij2h_u6hvD4Qmv-7PK7jkji0uyQ@mail.gmail.com

regards, tom lane

#3Don Seiler
don@seiler.us
In reply to: Tom Lane (#2)
Re: malloc errors in psql with libpq 16.1 on Mac

On Mon, Nov 27, 2023 at 6:02 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Is OpenSSL in use? If so, what version? I'm wondering if this is a
variant of the OpenSSL 3.2.0 compatibility problem we just heard of:

My colleague does confirm it is OpenSSL 3.2.0:

==> openssl@3: stable 3.2.0 (bottled)

Does this mean that downgrading libpq wouldn't help? He'd have to downgrade
openssl instead (or wait for a fix from somewhere upstream)?

Don.
--
Don Seiler
www.seiler.us

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Don Seiler (#3)
Re: malloc errors in psql with libpq 16.1 on Mac

Don Seiler <don@seiler.us> writes:

On Mon, Nov 27, 2023 at 6:02 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Is OpenSSL in use? If so, what version? I'm wondering if this is a
variant of the OpenSSL 3.2.0 compatibility problem we just heard of:

My colleague does confirm it is OpenSSL 3.2.0:
==> openssl@3: stable 3.2.0 (bottled)

Ugh.

Does this mean that downgrading libpq wouldn't help? He'd have to downgrade
openssl instead (or wait for a fix from somewhere upstream)?

Right.

regards, tom lane