Segmentation fault with HEAD.

Lists: pgsql-hackers
From: Rune Bromer <rune(dot)bromer(at)tbwa-play(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Segmentation fault with HEAD.
Date: 2006-11-14 12:49:25
Message-ID: 4559BB55.4010709@tbwa-play.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi.

I just compiled the version in HEAD with no problems. I connected with
template1, made some tests and quited. I got the following error:

template1=# \q
psql(15213) malloc: *** error for object 0x1804e00: incorrect checksum
for freed object - object was probably modified after being freed, break
at szone_error to debug
psql(15213) malloc: *** set a breakpoint in szone_error to debug
Segmentation fault

Now. I can't find a list of knows bug to compare agains, so sorry if
this is a know bug. If you need more information, please let me know how
to record these, and I will post them as soon as possible.

Rune


From: "Alon Goldshuv" <agoldshuv(at)greenplum(dot)com>
To: "Rune Bromer" <rune(dot)bromer(at)tbwa-play(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Segmentation fault with HEAD.
Date: 2006-11-14 23:54:07
Message-ID: C17F971F.1763D%agoldshuv@greenplum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Rune,

This is a readline issue of some sort. Basically this seg fault happens when
you quit and the .psql_history file changes. I don't really know why it
happens and what the right solution is but if you empty the contents of this
file (or maybe delete it) then your seg fault will go away (until it will
show up again in few months or so :-) ). This is not THE proper solution
probably but it does the job.

Alon.

On 11/14/06 4:49 AM, "Rune Bromer" <rune(dot)bromer(at)tbwa-play(dot)com> wrote:

> Hi.
>
> I just compiled the version in HEAD with no problems. I connected with
> template1, made some tests and quited. I got the following error:
>
> template1=# \q
> psql(15213) malloc: *** error for object 0x1804e00: incorrect checksum
> for freed object - object was probably modified after being freed, break
> at szone_error to debug
> psql(15213) malloc: *** set a breakpoint in szone_error to debug
> Segmentation fault
>
> Now. I can't find a list of knows bug to compare agains, so sorry if
> this is a know bug. If you need more information, please let me know how
> to record these, and I will post them as soon as possible.
>
> Rune
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>


From: Rune Bromer <rune(dot)bromer(at)tbwa-play(dot)com>
To: Alon Goldshuv <agoldshuv(at)greenplum(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Segmentation fault with HEAD.
Date: 2006-11-15 00:57:16
Message-ID: 455A65EC.6070703@tbwa-play.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alon Goldshuv wrote:
> Rune,
>
> This is a readline issue of some sort. Basically this seg fault happens when
> you quit and the .psql_history file changes. I don't really know why it
> happens and what the right solution is but if you empty the contents of this
> file (or maybe delete it) then your seg fault will go away (until it will
> show up again in few months or so :-) ). This is not THE proper solution
> probably but it does the job.

Thank you very much, I'll verify this tomorrow and return if the error
persists. What led you to the conclusion that it was a readline error? I
looked into it for a couple of hours, but as I'm new to the postgres
source code I cound't find the error :)

Rune


From: "Alon Goldshuv" <agoldshuv(at)greenplum(dot)com>
To: "Rune Bromer" <rune(dot)bromer(at)tbwa-play(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Segmentation fault with HEAD.
Date: 2006-11-15 01:26:19
Message-ID: C17FACBB.17648%agoldshuv@greenplum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> Thank you very much, I'll verify this tomorrow and return if the error
> persists. What led you to the conclusion that it was a readline error? I
> looked into it for a couple of hours, but as I'm new to the postgres
> source code I cound't find the error :)

For the life of me I can't remember! That was some time ago. It sure wasn't
obvious to me - took some time. I think few of my colleagues were having
some issues with Apple's default readline and they had to install a 3rd
party readline. I didn't get around to doing that yet. Is your error on a
mac os?


From: Rune Bromer <rune(dot)bromer(at)tbwa-play(dot)com>
To: Alon Goldshuv <agoldshuv(at)greenplum(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Segmentation fault with HEAD.
Date: 2006-11-15 11:06:13
Message-ID: 455AF4A5.8020901@tbwa-play.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alon Goldshuv wrote:
>> Thank you very much, I'll verify this tomorrow and return if the error
>> persists. What led you to the conclusion that it was a readline error? I
>> looked into it for a couple of hours, but as I'm new to the postgres
>> source code I cound't find the error :)
>
> For the life of me I can't remember! That was some time ago. It sure wasn't
> obvious to me - took some time. I think few of my colleagues were having
> some issues with Apple's default readline and they had to install a 3rd
> party readline. I didn't get around to doing that yet. Is your error on a
> mac os?

It sure is, but it seems to work now. It could be that the error isn't
persistant on a MacBook Pro as these have a x86 arch.

Rune


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rune Bromer <rune(dot)bromer(at)tbwa-play(dot)com>
Cc: Alon Goldshuv <agoldshuv(at)greenplum(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Segmentation fault with HEAD.
Date: 2006-11-16 17:42:34
Message-ID: 19231.1163698954@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Rune Bromer <rune(dot)bromer(at)tbwa-play(dot)com> writes:
> It sure is, but it seems to work now. It could be that the error isn't
> persistant on a MacBook Pro as these have a x86 arch.

Exactly which version of readline (or, perhaps, libedit) are you using?

regards, tom lane