pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Psql malloc error on Git master
7+ messages / 4 participants
[nested] [flat]

* Psql malloc error on Git master
@ 2011-01-20 19:36 Thom Brown <thom@linux.com>
  2011-01-20 19:45 ` Re: Psql malloc error on Git master Alvaro Herrera <alvherre@commandprompt.com>
  2011-01-20 21:44 ` Re: Psql malloc error on Git master Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 7+ messages in thread

From: Thom Brown @ 2011-01-20 19:36 UTC (permalink / raw)
  To: pgsql-bugs

Using 9.1devel as of yesterday's Git branch master, I'm getting an
error in psql when attempting to tab-complete a system tab.

Steps to recreate:

1) From terminal, run "psql postgres" to connect to the postgres
database as the current user.
2a) Type: \d pg_o
2b) OR type: \d pg_op
3) Press TAB to auto-complete

Result:

postgres=# \d pg_opsql(29265) malloc: *** error for object 0x5:
pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap

I haven't been able to cause this error to happen with any other
prefix.  Using pg_opc then TAB does not cause this to occur, neither
does pg_ then TAB.  I have also tested this on 64-bit versions of
PostgreSQL 8.4.4 and 9.0.1, and it doesn't occur on those versions.

System info:

OS: Mac OSX 10.6.5
Kernel: Darwin 10.5.0
Arch: 64-bit kernel and extensions enabled
Processor: Intel Core i5 2.53 Ghz
Memory: 2x2GB DDR3 @ 1066Mhz

Built with GNU Make 3.81
GCC version: i686-apple-darwin10-gcc-4.2.1

If required, I can provide the configure output.

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Psql malloc error on Git master
  2011-01-20 19:36 Psql malloc error on Git master Thom Brown <thom@linux.com>
@ 2011-01-20 19:45 ` Alvaro Herrera <alvherre@commandprompt.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Alvaro Herrera @ 2011-01-20 19:45 UTC (permalink / raw)
  To: Thom Brown <thom@linux.com>; +Cc: pgsql-bugs

Excerpts from Thom Brown's message of jue ene 20 16:36:10 -0300 2011:
> Using 9.1devel as of yesterday's Git branch master, I'm getting an
> error in psql when attempting to tab-complete a system tab.
> 
> Steps to recreate:
> 
> 1) From terminal, run "psql postgres" to connect to the postgres
> database as the current user.
> 2a) Type: \d pg_o
> 2b) OR type: \d pg_op
> 3) Press TAB to auto-complete

I can't reproduce it here (but this is 64bit).  Did you try "make
distclean"?

If you can still reproduce it after that, please try "git bisect" to
find the problem commit.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Psql malloc error on Git master
  2011-01-20 19:36 Psql malloc error on Git master Thom Brown <thom@linux.com>
@ 2011-01-20 21:44 ` Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-20 21:56   ` Re: Psql malloc error on Git master Thom Brown <thom@linux.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Tom Lane @ 2011-01-20 21:44 UTC (permalink / raw)
  To: Thom Brown <thom@linux.com>; +Cc: pgsql-bugs

Thom Brown <thom@linux.com> writes:
> postgres=# \d pg_opsql(29265) malloc: *** error for object 0x5:
> pointer being freed was not allocated
> *** set a breakpoint in malloc_error_break to debug
> Abort trap

> System info:
> OS: Mac OSX 10.6.5

Known bug in OSX's libedit.  Use readline instead.

http://archives.postgresql.org/pgsql-bugs/2010-04/msg00127.php

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Psql malloc error on Git master
  2011-01-20 19:36 Psql malloc error on Git master Thom Brown <thom@linux.com>
  2011-01-20 21:44 ` Re: Psql malloc error on Git master Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-01-20 21:56   ` Thom Brown <thom@linux.com>
  2011-01-20 22:28     ` Re: Psql malloc error on Git master Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-21 14:55     ` Re: Psql malloc error on Git master Bernd Helmle <mailings@oopsware.de>
  0 siblings, 2 replies; 7+ messages in thread

From: Thom Brown @ 2011-01-20 21:56 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

On 20 January 2011 21:44, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thom Brown <thom@linux.com> writes:
>> postgres=# \d pg_opsql(29265) malloc: *** error for object 0x5:
>> pointer being freed was not allocated
>> *** set a breakpoint in malloc_error_break to debug
>> Abort trap
>
>> System info:
>> OS: Mac OSX 10.6.5
>
> Known bug in OSX's libedit.  Use readline instead.
>
> http://archives.postgresql.org/pgsql-bugs/2010-04/msg00127.php
>
>                        regards, tom lane

How do I force readline?  I'm not using --with-libedit-preferred or
--without-readline

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Psql malloc error on Git master
  2011-01-20 19:36 Psql malloc error on Git master Thom Brown <thom@linux.com>
  2011-01-20 21:44 ` Re: Psql malloc error on Git master Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-20 21:56   ` Re: Psql malloc error on Git master Thom Brown <thom@linux.com>
@ 2011-01-20 22:28     ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 7+ messages in thread

From: Tom Lane @ 2011-01-20 22:28 UTC (permalink / raw)
  To: Thom Brown <thom@linux.com>; +Cc: pgsql-bugs

Thom Brown <thom@linux.com> writes:
> On 20 January 2011 21:44, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Known bug in OSX's libedit.  Use readline instead.

> How do I force readline?  I'm not using --with-libedit-preferred or
> --without-readline

Do you have it installed?

You may need to fool with the link path to ensure that you link to
a real readline and not /usr/lib/libreadline.dylib (which is just
an alias for libedit).

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Psql malloc error on Git master
  2011-01-20 19:36 Psql malloc error on Git master Thom Brown <thom@linux.com>
  2011-01-20 21:44 ` Re: Psql malloc error on Git master Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-20 21:56   ` Re: Psql malloc error on Git master Thom Brown <thom@linux.com>
@ 2011-01-21 14:55     ` Bernd Helmle <mailings@oopsware.de>
  2011-01-21 16:09       ` Re: Psql malloc error on Git master Thom Brown <thom@linux.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Bernd Helmle @ 2011-01-21 14:55 UTC (permalink / raw)
  To: Thom Brown <thom@linux.com>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs



--On 20. Januar 2011 21:56:44 +0000 Thom Brown <thom@linux.com> wrote:

>> Known bug in OSX's libedit.  Use readline instead.
>>
>> http://archives.postgresql.org/pgsql-bugs/2010-04/msg00127.php
>>
>>                        regards, tom lane
>
> How do I force readline?  I'm not using --with-libedit-preferred or
> --without-readline

What I've done is to switch to MacPorts[1] and use their packaging. I'm 
building PostgreSQL then with:

--with-libraries=/opt/local/lib --with-includes=/opt/local/include

which for example links psql/libreadline with:

% otool -L $PGSQL_HOME/bin/psql
/Users/bernd/pgsql-dev/install/HEAD/bin/psql:
	/Users/bernd/pgsql-dev/install/HEAD/lib/libpq.5.dylib (compatibility 
version 5.0.0, current version 5.4.0)
	/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current 
version 10.1.0)
	/opt/local/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current 
version 1.0.0)
	/opt/local/lib/libreadline.6.1.dylib (compatibility version 6.0.0, current 
version 6.1.0)

Works quite well for me. There's also a libedit in MacPorts, but i've never 
used it.

        Bernd

[1] <http://www.macports.org/;




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Psql malloc error on Git master
  2011-01-20 19:36 Psql malloc error on Git master Thom Brown <thom@linux.com>
  2011-01-20 21:44 ` Re: Psql malloc error on Git master Tom Lane <tgl@sss.pgh.pa.us>
  2011-01-20 21:56   ` Re: Psql malloc error on Git master Thom Brown <thom@linux.com>
  2011-01-21 14:55     ` Re: Psql malloc error on Git master Bernd Helmle <mailings@oopsware.de>
@ 2011-01-21 16:09       ` Thom Brown <thom@linux.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Thom Brown @ 2011-01-21 16:09 UTC (permalink / raw)
  To: Bernd Helmle <mailings@oopsware.de>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs

On 21 January 2011 14:55, Bernd Helmle <mailings@oopsware.de> wrote:
>
>
> --On 20. Januar 2011 21:56:44 +0000 Thom Brown <thom@linux.com> wrote:
>
>>> Known bug in OSX's libedit.  Use readline instead.
>>>
>>> http://archives.postgresql.org/pgsql-bugs/2010-04/msg00127.php
>>>
>>>                        regards, tom lane
>>
>> How do I force readline?  I'm not using --with-libedit-preferred or
>> --without-readline
>
> What I've done is to switch to MacPorts[1] and use their packaging. I'm
> building PostgreSQL then with:
>
> --with-libraries=/opt/local/lib --with-includes=/opt/local/include
>
> which for example links psql/libreadline with:
>
> % otool -L $PGSQL_HOME/bin/psql
> /Users/bernd/pgsql-dev/install/HEAD/bin/psql:
>        /Users/bernd/pgsql-dev/install/HEAD/lib/libpq.5.dylib (compatibility
> version 5.0.0, current version 5.4.0)
>        /opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current
> version 10.1.0)
>        /opt/local/lib/libssl.1.0.0.dylib (compatibility version 1.0.0,
> current version 1.0.0)
>        /opt/local/lib/libreadline.6.1.dylib (compatibility version 6.0.0,
> current version 6.1.0)
>
> Works quite well for me. There's also a libedit in MacPorts, but i've never
> used it.
>
>       Bernd

Okay, I've tried your recommend config options and all seems to be
well now.  I'll note that for future builds.

Thanks

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2011-01-21 16:09 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-01-20 19:36 Psql malloc error on Git master Thom Brown <thom@linux.com>
2011-01-20 19:45 ` Alvaro Herrera <alvherre@commandprompt.com>
2011-01-20 21:44 ` Tom Lane <tgl@sss.pgh.pa.us>
2011-01-20 21:56   ` Thom Brown <thom@linux.com>
2011-01-20 22:28     ` Tom Lane <tgl@sss.pgh.pa.us>
2011-01-21 14:55     ` Bernd Helmle <mailings@oopsware.de>
2011-01-21 16:09       ` Thom Brown <thom@linux.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox