Re: segmentation fault in psql

From: David George <david(at)onyxsoft(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: segmentation fault in psql
Date: 2001-04-01 02:33:39
Message-ID: 3AC69383.4B560B60@onyxsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:

> Can't tell a lot from that. Could you rebuild psql with debug symbols
> so we can see a more complete backtrace?

Here is a backtrace with debug enabled:
(gdb) bt
#0 0x446cc in putc ()
#1 0x26748 in print_aligned_text (title=0x0, headers=0x746d0,
cells=0x746e0, footers=0x746f0, opt_align=0x74700 "l",
opt_barebones=0 '\000', opt_border=1, fout=0x68458) at print.c:288
#2 0x28a2c in printTable (title=0x0, headers=0x746d0, cells=0x746e0,
footers=0x746f0, align=0x74700 "l", opt=0x6857c,
fout=0x68438) at print.c:986
#3 0x29104 in printQuery (result=0x76a00, opt=0x6857c, fout=0x68438) at
print.c:1108
#4 0x1da8c in SendQuery (query=0x702f0 "select current_user;") at
common.c:459
#5 0x20714 in MainLoop (source=0x68428) at mainloop.c:427
#6 0x22c6c in main (argc=2, argv=0xffbef774) at startup.c:293

I had a thought. I remember configure checking for sfio (which I actually
have installed), but it wasn't checking for libstdio.a so I added
(AC_CHECK_LIB(stdio, main)) to configure.in right under the sfio check
and ran autoconf then configure again. This time I don't get a segfault.
It outputs the following:

test=# select current_user; current_user
--------------
david
(1 row)

Then it doesn't echo what I type. Without exiting, I typed select
current_user; again and it did output the following even though it didn't
echo what I was typing:
current_user
--------------
david
(1 row)

I tried a create table and as soon as I pressed enter, my key presses
stopped echoing.

Versions:
Postgresql 7.1RC1
Sparc Solaris 2.7 11/99 (with Mar 7 2001 patch cluster)
gcc 2.95.3 (I was using 2.95.2 earlier)
readline 4.1
sfio 20000531
zlib 1.1.3

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-04-01 02:46:35 Re: segmentation fault in psql
Previous Message Tom Lane 2001-04-01 01:09:03 Re: segmentation fault in psql