segmention fault in psql from last cvs (long)

From: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
To: pgsql-bugs(at)postgresql(dot)org
Subject: segmention fault in psql from last cvs (long)
Date: 2003-08-14 06:20:18
Message-ID: Pine.LNX.4.44.0308140805310.24651-100000@kix.fsv.cvut.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello

In this morning I actualized my PostgreSQL source from CVS.
initdb goes without any problems. But createdb puts
SIGSEGV, createuser, psql too.

[postgres(at)stehule root]$ ltrace psql -l
__libc_start_main(0x08050df0, 2, 0xbffff3a4, 0x08049e98, 0x0805a810
<unfinished ...>
__register_frame_info_bases(0x0806b704, 0x0806bab8, 0, 0x0806b82c, 1) =
0x0804a430
setlocale(6, "") = "cs_CZ"
bindtextdomain("psql", "/usr/local/pgsql/share/locale") =
"/usr/local/pgsql/share/locale"
textdomain("psql") = "psql"
get_progname(0xbffff4c0, 0x0806d7f8, 0, 0, 0xbffff330) = 0xbffff4c0
PQenv2encoding(0xbffff330, 0x4000a45e, 0, 0, 0x400e1630) = 0
calloc(1, 12) = 0x0806d820
malloc(2) = 0x0806d830
memcpy(0x0806d830, "@", 2) = 0x0806d830
calloc(1, 1) = 0x0806d840
strspn("VERSION", "abcdefghijklmnopqrstuvwxyzABCDEF"...) = 7
strlen(0x0805b85e, 0x080625a0, 0x08062920, 0x08062920, 0xbffff4c7) = 7
strcmp("@", "VERSION") = -22
calloc(1, 12) = 0x0806d850
__strdup(0x0805b85e, 12, -22, -22, 0xbffff4c7) = 0x0806d860
__strdup(0x08062920, 12, -22, -22, 0xbffff4c7) = 0x0806d870
strspn("AUTOCOMMIT", "abcdefghijklmnopqrstuvwxyzABCDEF"...) = 10
strlen(0x0805b2ec, 0x080625a0, 0x0805b66d, 0x0805b66d, 0x0806d820) = 10
strcmp("@", "AUTOCOMMIT") = -1
strcmp("VERSION", "AUTOCOMMIT") = 21
calloc(1, 12) = 0x0806d8c0
__strdup(0x0805b2ec, 12, 21, 21, 0x0806d820) = 0x0806d8d0
__strdup(0x0805b66d, 12, 21, 21, 0x0806d820) = 0x0806d8e0
strspn("VERBOSITY", "abcdefghijklmnopqrstuvwxyzABCDEF"...) = 9
strlen(0x0805a92b, 0x080625a0, 0x0805a9c4, 0x0805a9c4, 0x0806d820) = 9
strcmp("@", "VERBOSITY") = -22
strcmp("VERSION", "VERBOSITY") = 17
strcmp("AUTOCOMMIT", "VERBOSITY") = -21
calloc(1, 12) = 0x0806d8f0
__strdup(0x0805a92b, 12, -21, -21, 0x0806d820) = 0x0806d900
__strdup(0x0805a9c4, 12, -21, -21, 0x0806d820) = 0x0806d910
fileno(0x401fa980) = 0
isatty(0) = 1
fileno(0x401fab00) = 1
isatty(1) = 1
getopt_long(2, 0xbffff3a4, "aAc:d:eEf:F:h:Hlno:p:P:qR:sStT:u"...,
0x0806b100, 0xbffff2c8) = 108
getopt_long(2, 0xbffff3a4, "aAc:d:eEf:F:h:Hlno:p:P:qR:sStT:u"...,
0x0806b100, 0xbffff2c8) = -1
__strdup(0x08063373, 42592, 1, 0, 0) = 0x0806d920
__strdup(0x08063a23, 42592, 1, 0, 0x0806d920) = 0x0806d930
PQsetdbLogin(0, 0, 0, 0, 0x080627ec <unfinished ...>
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

strace psql -l
execve("/usr/local/pgsql/bin/psql", ["psql", "-l"], [/* 33 vars */]) = 0
uname({sys="Linux", node="stehule", ...}) = 0
brk(0) = 0x806bd54
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/local/pgsql/lib/i586/libpq.so.3", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/usr/local/pgsql/lib/i586", 0xbfffe590) = -1 ENOENT (No such file
or directory)
....
....
...,
open("/etc/passwd", O_RDONLY) = 3
fcntl64(0x3, 0x1, 0, 0x1) = 0
fcntl64(0x3, 0x2, 0x1, 0x1) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=7138, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40236000
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 4096
close(3) = 0
munmap(0x40236000, 4096) = 0
stat64("/home/postgres/.pgpass", 0xbffff1f0) = -1 ENOENT (No such file or
directory)
socket(PF_UNIX, SOCK_STREAM, 0) = 3
fcntl64(0x3, 0x4, 0x800, 0x806d940) = 0
connect(3, {sin_family=AF_UNIX, path="/tmp/.s.PGSQL.5432"}, 110) = 0
getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getsockname(3, {sin_family=AF_UNIX, path=(at)}, [2]) = 0
poll([{fd=134667064, events=POLLOUT|POLLERR, revents=POLLNVAL}], 1, -1) =
1
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

ltrace createdb testdb
__libc_start_main(0x080492d0, 2, 0xbffff394, 0x08048e28, 0x0804b000
<unfinished ...>
__register_frame_info_bases(0x0804d0e8, 0x0804d314, 0, 0x0804d210, 1) =
0x08049060
get_progname(0xbffff4b4, 0x400124c0, 0x400126d0, 39, 0xbffff300) =
0xbffff4b4
setlocale(6, "") = "cs_CZ"
bindtextdomain("pgscripts", "/usr/local/pgsql/share/locale") =
"/usr/local/pgsql/share/locale"
textdomain("pgscripts") = "pgscripts"
getopt_long(2, 0xbffff394, "h:p:U:WeqO:D:T:E:", 0x0804d020, 0xbffff2fc) =
-1
strlen(0xbffff4bd, 0x400124c0, 0x400126d0, 39, 0xbffff300) = 6
strcspn("testdb", "ABCDEFGHIJKLMNOPQRSTUVWXYZ") = 6
strspn("testdb", "abcdefghijklmnopqrstuvwxyz_01234"...) = 6
getenv("USER") = "postgres"
strstr("postgres", "group") = NULL
initPQExpBuffer(0xbffff300, 0x0804b09d, 0xbffff4bd, 0xbffff4bd,
0xbffff300) = 0x0804edf8
createPQExpBuffer(256, 0x4000a660, 111, 0xbffffb8d, 2) = 0x0804ef00
strlen(0xbffff4bd, 264, 0x401fafa0, 0x401fd30c, 0x401fafa0) = 6
strcmp("limit", "testdb") = -8
strcmp("rollback", "testdb") = -2
strcmp("to", "testdb") = 10
strcmp("smallint", "testdb") = -1
strcmp("strict", "testdb") = -1
strcmp("template", "testdb") = -6
strcmp("then", "testdb") = 3
strcmp("temporary", "testdb") = -6
appendPQExpBufferStr(0x0804ef00, 0xbffff4bd, 0, 0, 256) = 0x0804ef10
appendPQExpBuffer(0xbffff300, 0x0804b0a3, 0x0804ef10, 0xbffff4bd,
0xbffff300) = 254
appendPQExpBuffer(0xbffff300, 0x0804bac7, 0, 0, 0xbffff300) = 232
PQsetdbLogin(0, 0, 0, 0, 0x0804b0e7 <unfinished ...>
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

cfg params only --enable-nls
gcc (GCC) 3.2.2
RedHat 7.3

Previous versions (week ago) worked without any problems.

regards

Pavel Stehule

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-08-14 10:55:40 Re: [BUGS] 7.4 beta 1: SET log_statement=false
Previous Message Bruce Momjian 2003-08-13 23:33:47 Re: [BUGS] 7.4 beta 1: SET log_statement=false