pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #6062: psql terminates on auto-complete
3+ messages / 3 participants
[nested] [flat]
* BUG #6062: psql terminates on auto-complete
@ 2011-06-15 19:22 Sebastian <skurscheid@gmail.com>
2011-06-16 05:37 ` Re: BUG #6062: psql terminates on auto-complete John R Pierce <pierce@hogranch.com>
2011-06-16 05:39 ` Re: BUG #6062: psql terminates on auto-complete Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 3+ messages in thread
From: Sebastian @ 2011-06-15 19:22 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged online:
Bug reference: 6062
Logged by: Sebastian
Email address: skurscheid@gmail.com
PostgreSQL version: 9.0.1
Operating system: Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST
2011; root:xnu-1504.9.37~1/RELEASE_I386 i386
Description: psql terminates on auto-complete
Details:
I have encountered a peculiar psql behavior which I can consistently
replicate:
When using the auto-complete function (TAB) to complete the name of a
particular set of tables when writing a SELECT statement, psql crashes with
following error:
"malloc: *** error for object 0x2: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap"
I will make the assumption that this error is not caused by the actual table
definition, but is rather caused by some psql behavior associated with the
auto-complete feature.
The names of the tables are:
postgres=# \dt temp.a*
List of relations
Schema | Name | Type | Owner
--------+-------------------------------+-------+------------
temp | assoc_rel | table | skurscheid
temp | association | table | skurscheid
temp | association_isoform | table | skurscheid
temp | association_property | table | skurscheid
temp | association_qualifier | table | skurscheid
temp | association_species_qualifier | table | skurscheid
(6 rows)
This also occurs when the tables are stored under a different schema (such
as "go" - this is a local copy of the Gene Ontology database, which
otherwise works without any problems)
This error does not occur when using e.g. \dt in psql.
Also, after some more testing I have determined that this error only occurs
following this sequence:
postgres=# select * from go.assoc (TAB, TAB) [- this will bring up the list
of all matching objects]
postgres=# select * from go.associpsql(87623) malloc: *** error for object
0x7: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap
I would hazard the guess that the "_" character in some of the objects names
might have something to do with it, because:
postgres=# select * from go.assoc_(TAB)rel;
id | from_id | to_id | relationship_type_id
----+---------+-------+----------------------
(0 rows)
works fine.
I hope the supplied information is sufficient to address this bug.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #6062: psql terminates on auto-complete
2011-06-15 19:22 BUG #6062: psql terminates on auto-complete Sebastian <skurscheid@gmail.com>
@ 2011-06-16 05:37 ` John R Pierce <pierce@hogranch.com>
1 sibling, 0 replies; 3+ messages in thread
From: John R Pierce @ 2011-06-16 05:37 UTC (permalink / raw)
To: Sebastian <skurscheid@gmail.com>; +Cc: pgsql-bugs
On 06/15/11 12:22 PM, Sebastian wrote:
> The following bug has been logged online:
>
> Bug reference: 6062
> Logged by: Sebastian
> Email address: skurscheid@gmail.com
> PostgreSQL version: 9.0.1
> Operating system: Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST
> 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386
> Description: psql terminates on auto-complete
> Details:
>
> I have encountered a peculiar psql behavior which I can consistently
> replicate:
>
> When using the auto-complete function (TAB) to complete the name of a
> particular set of tables when writing a SELECT statement, psql crashes with
> following error:
>
> "malloc: *** error for object 0x2: pointer being freed was not allocated
> *** set a breakpoint in malloc_error_break to debug
> Abort trap"
does by any chance the Mac port use BSD editline instead of Gnu readline ?
editline has been very unstable for me on other Unix platforms such as
Solaris. I have zero OS X specific knowlege
--
john r pierce N 37, W 122
santa cruz ca mid-left coast
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #6062: psql terminates on auto-complete
2011-06-15 19:22 BUG #6062: psql terminates on auto-complete Sebastian <skurscheid@gmail.com>
@ 2011-06-16 05:39 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2011-06-16 05:39 UTC (permalink / raw)
To: Sebastian <skurscheid@gmail.com>; +Cc: pgsql-bugs
"Sebastian" <skurscheid@gmail.com> writes:
> Operating system: Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST
> 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386
> When using the auto-complete function (TAB) to complete the name of a
> particular set of tables when writing a SELECT statement, psql crashes with
> following error:
> "malloc: *** error for object 0x2: pointer being freed was not allocated
> *** set a breakpoint in malloc_error_break to debug
> Abort trap"
Yeah, this is a known bug in Apple's version of libedit. See our
archives, eg here:
http://archives.postgresql.org/pgsql-bugs/2010-04/msg00127.php
Aside from pestering Apple to fix it, there's not much you can do except
install GNU libreadline and link against that instead.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-06-16 05:39 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-06-15 19:22 BUG #6062: psql terminates on auto-complete Sebastian <skurscheid@gmail.com>
2011-06-16 05:37 ` John R Pierce <pierce@hogranch.com>
2011-06-16 05:39 ` Tom Lane <tgl@sss.pgh.pa.us>
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