Thread: Segmentation fault with HEAD.

Segmentation fault with HEAD.

From
Rune Bromer
Date:
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


Re: Segmentation fault with HEAD.

From
"Alon Goldshuv"
Date:
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.bromer@tbwa-play.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@postgresql.org so that your
>        message can get through to the mailing list cleanly
> 




Re: Segmentation fault with HEAD.

From
Rune Bromer
Date:
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



Re: Segmentation fault with HEAD.

From
"Alon Goldshuv"
Date:
> 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?




Re: Segmentation fault with HEAD.

From
Rune Bromer
Date:
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



Re: Segmentation fault with HEAD.

From
Tom Lane
Date:
Rune Bromer <rune.bromer@tbwa-play.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