pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedcrash in 9.1's psql:describeOneTableDetails
4+ messages / 2 participants
[nested] [flat]
* crash in 9.1's psql:describeOneTableDetails
@ 2011-02-10 09:47 Andres Freund <andres@anarazel.de>
2011-02-10 09:50 ` Re: crash in 9.1's psql:describeOneTableDetails Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 4+ messages in thread
From: Andres Freund @ 2011-02-10 09:47 UTC (permalink / raw)
To: pgsql-bugs
Hi,
Timing is on.
Pager is always used.
psql (9.1devel, server 9.0.3)
WARNING: psql version 9.1, server version 9.0.
Some psql features might not work.
Type "help" for help.
# \d category
column number 2 is out of range 0..1
results in:
Program received signal SIGSEGV, Segmentation fault.
__strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:106
106 ../sysdeps/x86_64/multiarch/../strcmp.S: No such file or directory.
in ../sysdeps/x86_64/multiarch/../strcmp.S
(gdb) bt
#0 __strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:106
#1 0x000000000041ec48 in describeOneTableDetails (schemaname=0x1f8ca06
"easyshop",
relationname=0x1f8ca0f "category", oid=0x1f8ca00 "48441", verbose=0
'\000') at describe.c:1757
#2 0x000000000041cfac in describeTableDetails (pattern=0x1f8c570 "category",
verbose=0 '\000', showSystem=0 '\000')
at describe.c:1069
#3 0x0000000000404407 in exec_command (cmd=0x1f82e70 "d",
scan_state=0x1f70050, query_buf=0x1f70690)
at command.c:369
#4 0x0000000000403be2 in HandleSlashCmds (scan_state=0x1f70050,
query_buf=0x1f70690) at command.c:108
#5 0x000000000040d7ce in MainLoop (source=0x7f40888fc7e0) at mainloop.c:301
#6 0x0000000000413085 in main (argc=8, argv=0x7fff05473d08) at startup.c:305
Unfortunately I wont have time to
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: crash in 9.1's psql:describeOneTableDetails
2011-02-10 09:47 crash in 9.1's psql:describeOneTableDetails Andres Freund <andres@anarazel.de>
@ 2011-02-10 09:50 ` Andres Freund <andres@anarazel.de>
2011-02-12 14:39 ` Re: [PATCH] crash in 9.1's psql:describeOneTableDetails Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 4+ messages in thread
From: Andres Freund @ 2011-02-10 09:50 UTC (permalink / raw)
To: pgsql-bugs
Hi,
Sorry, I unfortunately had the wrong window focused when hitting enter...
On Thursday, February 10, 2011 10:47:42 AM Andres Freund wrote:
> Timing is on.
> Pager is always used.
> psql (9.1devel, server 9.0.3)
> WARNING: psql version 9.1, server version 9.0.
> Some psql features might not work.
> Type "help" for help.
>
>
> # \d category
> column number 2 is out of range 0..1
>
> results in:
>
> Program received signal SIGSEGV, Segmentation fault.
> __strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:106
> 106 ../sysdeps/x86_64/multiarch/../strcmp.S: No such file or directory.
> in ../sysdeps/x86_64/multiarch/../strcmp.S
> (gdb) bt
> #0 __strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:106
> #1 0x000000000041ec48 in describeOneTableDetails (schemaname=0x1f8ca06
> "easyshop",
> relationname=0x1f8ca0f "category", oid=0x1f8ca00 "48441", verbose=0
> '\000') at describe.c:1757
> #2 0x000000000041cfac in describeTableDetails (pattern=0x1f8c570
> "category", verbose=0 '\000', showSystem=0 '\000')
> at describe.c:1069
> #3 0x0000000000404407 in exec_command (cmd=0x1f82e70 "d",
> scan_state=0x1f70050, query_buf=0x1f70690)
> at command.c:369
> #4 0x0000000000403be2 in HandleSlashCmds (scan_state=0x1f70050,
> query_buf=0x1f70690) at command.c:108
> #5 0x000000000040d7ce in MainLoop (source=0x7f40888fc7e0) at
> mainloop.c:301 #6 0x0000000000413085 in main (argc=8,
> argv=0x7fff05473d08) at startup.c:305
>
>
Unfortunately I wont have time to to analyze this properly today, so if
somebody is motivated before that...
Thats psql from REL9_1_ALPHA3-321-g036bb15
Greetings,
Andres
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [PATCH] crash in 9.1's psql:describeOneTableDetails
2011-02-10 09:47 crash in 9.1's psql:describeOneTableDetails Andres Freund <andres@anarazel.de>
2011-02-10 09:50 ` Re: crash in 9.1's psql:describeOneTableDetails Andres Freund <andres@anarazel.de>
@ 2011-02-12 14:39 ` Andres Freund <andres@anarazel.de>
2011-02-12 14:50 ` Re: [PATCH] crash in 9.1's psql:describeOneTableDetails Simon Riggs <simon@2ndQuadrant.com>
0 siblings, 1 reply; 4+ messages in thread
From: Andres Freund @ 2011-02-12 14:39 UTC (permalink / raw)
To: pgsql-bugs; Simon Riggs <simon@2ndquadrant.com>
On Thursday, February 10, 2011 10:50:38 AM Andres Freund wrote:
> Hi,
>
> Sorry, I unfortunately had the wrong window focused when hitting enter...
> > # \d category
> > column number 2 is out of range 0..1
> >
> > results in:
> >
> > Program received signal SIGSEGV, Segmentation fault.
Ok, found the bug, simple oversight in invalid foreign key patch.
Andres
Attachments:
0001-Add-missing-version-check-to-psql.patch (text/x-patch, 1.3K) download
From 8100ae0d54138b08568e466b23032e740edc7f28 Mon Sep 17 00:00:00 2001
From: Andres Freund <andres@anarazel.de>
Date: Sat, 12 Feb 2011 15:31:49 +0100
Subject: [PATCH] Add missing version check to psql
722bf701/"fk creation without validation" added display of invalidated
constraints to psql - unfortunately the versioncheck for that only
modified the query not the display of the query. So an invalid index
access was made resulting in an SEGFAULT.
---
src/bin/psql/describe.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 884101a..735eef7 100644
*** a/src/bin/psql/describe.c
--- b/src/bin/psql/describe.c
*************** describeOneTableDetails(const char *sche
*** 1754,1760 ****
PQgetvalue(result, i, 0),
PQgetvalue(result, i, 1));
! if (strcmp(PQgetvalue(result, i, 2), "f") == 0)
appendPQExpBuffer(&buf, " NOT VALID");
printTableAddFooter(&cont, buf.data);
--- 1754,1760 ----
PQgetvalue(result, i, 0),
PQgetvalue(result, i, 1));
! if (pset.sversion >= 90100 && strcmp(PQgetvalue(result, i, 2), "f") == 0)
appendPQExpBuffer(&buf, " NOT VALID");
printTableAddFooter(&cont, buf.data);
--
1.7.3.rc1.5.g73aa2
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [PATCH] crash in 9.1's psql:describeOneTableDetails
2011-02-10 09:47 crash in 9.1's psql:describeOneTableDetails Andres Freund <andres@anarazel.de>
2011-02-10 09:50 ` Re: crash in 9.1's psql:describeOneTableDetails Andres Freund <andres@anarazel.de>
2011-02-12 14:39 ` Re: [PATCH] crash in 9.1's psql:describeOneTableDetails Andres Freund <andres@anarazel.de>
@ 2011-02-12 14:50 ` Simon Riggs <simon@2ndQuadrant.com>
0 siblings, 0 replies; 4+ messages in thread
From: Simon Riggs @ 2011-02-12 14:50 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-bugs
On Sat, 2011-02-12 at 15:39 +0100, Andres Freund wrote:
> On Thursday, February 10, 2011 10:50:38 AM Andres Freund wrote:
> > Hi,
> >
> > Sorry, I unfortunately had the wrong window focused when hitting enter...
> > > # \d category
> > > column number 2 is out of range 0..1
> > >
> > > results in:
> > >
> > > Program received signal SIGSEGV, Segmentation fault.
> Ok, found the bug, simple oversight in invalid foreign key patch.
>
> Andres
Thanks, will apply.
--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2011-02-12 14:50 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 09:47 crash in 9.1's psql:describeOneTableDetails Andres Freund <andres@anarazel.de>
2011-02-10 09:50 ` Andres Freund <andres@anarazel.de>
2011-02-12 14:39 ` Andres Freund <andres@anarazel.de>
2011-02-12 14:50 ` Simon Riggs <simon@2ndQuadrant.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