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