clients segfault on 9.2

Поиск
Список
Период
Сортировка
От Grégoire Hubert
Тема clients segfault on 9.2
Дата
Msg-id CAO6H_SDforqg9KJvhVcuYMNenGmeyi+SEtRTEtob2u2xGvZNcg@mail.gmail.com
обсуждение исходный текст
Ответы Re: clients segfault on 9.2
Re: clients segfault on 9.2
Список pgsql-bugs
Hi,

I have cloned a fresh pg9.2 from github release 7c0fecd and compiled it with

./configure --prefix=$HOME/local --with-openssl && make && make install

The compilation went like a charm in a LXC container running a debian
6.0 with  following kernel

Linux java 3.0.0-21-generic #35-Ubuntu SMP Fri May 25 17:58:20 UTC
2012 i686 GNU/Linux

(system that hosts the LXC is an ubuntu).

I have successfuly run initdb and pg_ctl launched the database server
as usual. When I wanted to use any client to the database (psql,
createdb), they segfaulted whatever I used the TCP/IP or unix socket,
all with « trust » authentication in the pg_hba.conf.

Here is a ldd of the psql binary :

$ ldd ~/local/bin/psql       linux-gate.so.1 =>  (0x00376000)       libpq.so.5 => /home/greg/local/lib/libpq.so.5
(0x008e7000)      libreadline.so.6 => /lib/libreadline.so.6 (0x00ecd000)       libc.so.6 => /lib/libc.so.6 (0x00c7b000)
     libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0x00443000)       libpthread.so.0 => /lib/libpthread.so.0
(0x00110000)      libncurses.so.5 => /lib/libncurses.so.5 (0x00a32000)       /lib/ld-linux.so.2 (0x00843000)
libcrypto.so.0.9.8=> /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0x00129000)       libdl.so.2 => /lib/libdl.so.2
(0x00281000)      libz.so.1 => /usr/lib/libz.so.1 (0x0077d000) 

Here is an excerpt of strace's output from the psql segfault (last lines)
$ strace -s 400 ~/local/bin/psql
...
stat64("/home/greg/.pgpass", 0xbfcdd3c0) = -1 ENOENT (No such file or directory)
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_FILE, path="/tmp/.s.PGSQL.5432"}, 110) = 0
getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getsockname(3, {sa_family=AF_FILE, NULL}, [2]) = 0
poll([{fd=3, events=POLLOUT|POLLERR}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
send(3, "\0\0\0L\0\3\0\0user\0greg\0database\0greg\0application_name\0psql\0client_encoding\0UTF8\0\0",
76, MSG_NOSIGNAL) = 76
poll([{fd=3, events=POLLIN|POLLERR}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recv(3, "R\0\0\0\10\0\0\0\0E\0\0\0RSFATAL\0C3D000\0Mdatabase \"greg\"
does not exist\0Fpostinit.c\0L718\0RInitPostgres\0\0", 16384, 0) = 92
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

I know database greg does not exist. This segfaults also when I try to
connect to the template1 database:
...
stat64("/home/greg/.pgpass", 0xbfc56c80) = -1 ENOENT (No such file or directory)
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_FILE, path="/tmp/.s.PGSQL.5432"}, 110) = 0
getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getsockname(3, {sa_family=AF_FILE, NULL}, [2]) = 0
poll([{fd=3, events=POLLOUT|POLLERR}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
send(3, "\0\0\0Q\0\3\0\0user\0greg\0database\0template1\0application_name\0psql\0client_encoding\0UTF8\0\0",
81, MSG_NOSIGNAL) = 81
poll([{fd=3, events=POLLIN|POLLERR}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recv(3, "R\0\0\0\10\0\0\0\0S\0\0\0\32application_name\0psql\0S\0\0\0\31client_encoding\0UTF8\0S\0\0\0\27DateStyle\0ISO,

MDY\0S\0\0\0\31integer_datetimes\0on\0S\0\0\0\33IntervalStyle\0postgres\0S\0\0\0\24is_superuser\0on\0S\0\0\0\31server_encoding\0UTF8\0S\0\0\0\34server_version\0009.3devel\0S\0\0\0\37session_authorization\0greg\0S\0\0\0#standard_conforming_strings\0on\0S\0\0\0\21TimeZone\0UTC\0K\0\0\0\f\0\0I\4\177a\3119Z\0\0\0\5I",
16384, 0) = 321
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

Is there anything I did wrong ?

Regards,
--
Grégoire HUBERT


В списке pgsql-bugs по дате отправления:

Предыдущее
От: raf
Дата:
Сообщение: Re: postgresql-9.1.4 macosx-10.6.8 (hostssl) psql -h hostname crashes
Следующее
От: Grégoire Hubert
Дата:
Сообщение: Re: clients segfault on 9.2