dbTalk Databases Forums  

[BUGS] make PROFILE=-pg segment fault

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] make PROFILE=-pg segment fault in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Qingqing Zhou
 
Posts: n/a

Default [BUGS] make PROFILE=-pg segment fault - 11-01-2005 , 05:32 PM







I do "make PROFILE=-pg" on top level, seems everything is ok. When
postmaster starts up, gmon.out is generated. But when I do use psql to
connect to postmaster, a repeatable segment fault happens no matter what
command you do in psql:

sh-2.05a$ psql test
Welcome to psql 8.1RC1, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

test=# create table m(i int);
LOG: unexpected EOF on client connection
Segmentation fault (core dumped)
sh-2.05a$ ls cor*
core.15004 core.23932
sh-2.05a$ gdb psql -c core.23932
GNU gdb Red Hat Linux (5.2-2)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `psql test'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /h/164/zhouqq/pginstall/lib/libpq.so.4...done.
Loaded symbols for /h/164/zhouqq/pginstall/lib/libpq.so.4
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0 0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x4001a8b6 in PQfreeCancel (cancel=0xbfffd1b8) at fe-connect.c:2111
#2 0x0804d5fa in AcceptResult (result=0x808ea08, query=0x808e660 "create
table m(i int);") at common.c:656
#3 0x0804dd80 in SendQuery (query=0x808e660 "create table m(i int);") at
common.c:1054
#4 0x0804f6b5 in MainLoop (source=0x4212d980) at mainloop.c:233
#5 0x08051264 in main (argc=2, argv=0xbfffd304) at startup.c:369
#6 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) f 1
#1 0x4001a8b6 in PQfreeCancel (cancel=0xbfffd1b8) at fe-connect.c:2111
2111 {
(gdb) p *cancel
$1 = {raddr = {addr = {ss_family = 1, __ss_align = 774860909, __ss_padding
= "s.PGSQL.5432", '\0' <repeats 107 times>}, salen = 110},
be_pid = 23933, be_key = 1686421108}
(gdb) q

No strange usage of "PROFILE" in makefiles:
/h/164/zhouqq/pgsql#find . -name "*akefile*" -exec egrep -Hn "PROFILE" {}
\;
../src/Makefile.global.in:404:ifdef PROFILE
../src/Makefile.global.in:405: CFLAGS += $(PROFILE)
../src/Makefile.global.in:406: LDFLAGS += $(PROFILE)
../src/Makefile.global:404:ifdef PROFILE
../src/Makefile.global:405: CFLAGS += $(PROFILE)
../src/Makefile.global:406: LDFLAGS += $(PROFILE)

I tried "make CC=cc PFOFILE=-pg", still segment fault.

I would love to debug it, but since release time is approaching, I'd
better share this possible bug ...

Regards,
Qingqing

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] make PROFILE=-pg segment fault - 11-01-2005 , 05:43 PM






Qingqing Zhou <zhouqq (AT) cs (DOT) toronto.edu> writes:
Quote:
I do "make PROFILE=-pg" on top level, seems everything is ok. When
postmaster starts up, gmon.out is generated. But when I do use psql to
connect to postmaster, a repeatable segment fault happens no matter what
command you do in psql:
Works fine for me in Fedora Core 4. Something broken about your
platform, is my guess ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Reply With Quote
  #3  
Old   
Qingqing Zhou
 
Posts: n/a

Default Re: [BUGS] make PROFILE=-pg segment fault - 11-01-2005 , 07:47 PM




"Tom Lane" <tgl (AT) sss (DOT) pgh.pa.us> wrote
Quote:
Works fine for me in Fedora Core 4. Something broken about your
platform, is my guess ...

You may want to talk to our system admin :-) ... but it doesn't look like
caused by some strange environment ...

/h/164/zhouqq/pginstall/bin#uname -a
Linux eon.cs 2.4.20-30.7.legacysmp #1 SMP Fri Feb 20 10:12:55 PST 2004 i686
unknown
/h/164/zhouqq/pginstall/bin#pg_config --configure
'--enable-cassert' '--enable-debug' '--without-readline'
'--prefix=/h/164/zhouqq/pginstall'

On a separate matter, top level "make PROFILE=-pg" does not work on SunOS,
because of -fPIC conflicts with -pg. Backend level is ok. Shall we do
something or let it be?

Regards,
Qingqing



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


Reply With Quote
  #4  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] make PROFILE=-pg segment fault - 11-01-2005 , 10:34 PM



"Qingqing Zhou" <zhouqq (AT) cs (DOT) toronto.edu> writes:
Quote:
On a separate matter, top level "make PROFILE=-pg" does not work on SunOS,
because of -fPIC conflicts with -pg. Backend level is ok. Shall we do
something or let it be?
This has always been true on some platforms; nothing we can do about it.
My habit on HPUX has been to build the whole tree, then "make clean" in
src/backend and "make PROFILE=-pg" to build just a profilable backend.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.