Обсуждение: postgresql error
Hello!
I'm using postgresql (8.0.15) on Gentoo Linux (2.6.27.29-titan #2 SMP
Sun Aug 16 15:12:53 MSD 2009 x86_64 Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
GenuineIntel GNU/Linux)
some time (meybe every four day) postgresql get error to all clients
what try to connect , a can attach strace to it:
postgres@calipso ~ $ pg_ctl status -D /var/lib/postgresql/data/
pg_ctl: postmaster is running (PID: 5742)
/usr/bin/postgres -D /var/lib/postgresql/data --silent-mode=true -N 512
-B 1024
postgres@calipso ~ $ logout
calipso ~ # strace -p 5742
Process 5742 attached - interrupt to quit
select(5, [3 4], NULL, NULL, {43, 80000}
) = 1 (in [4], left {24, 984000})
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN
RT_1], NULL, 8) = 0
accept(4, {sa_family=AF_FILE, path=@""}, [2]) = 6
getsockname(6, {sa_family=AF_FILE, path="/tmp/.s.PGSQL.5432"...}, [21])
= 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|
SIGCHLD, child_tidptr=0x7f5eb0d8f780) = 28691
close(6) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(5, [3 4], NULL, NULL, {60, 0}) = ? ERESTARTNOHAND (To be
restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN
RT_1], NULL, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) =
28691
sendto(5, "\2\0\0\0\30\0\0\0\0\0\0\0\23p\0\0\0\0\0\0\0\0\0\0"..., 24, 0,
NULL, 0) = 24
wait4(-1, 0x7fff58938794, WNOHANG, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigreturn(0x2) = -1 EINTR (Interrupted system
call)
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN
RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(5, [3 4], NULL, NULL, {60, 0}
calipso ~ # cat /proc/sys/kernel/shmmax
33554432
calipso ~ # cat /proc/sys/kernel/shmall
2097152
what is wrong with server?
Thank You.
--
Vasiliy G Tolstov <v.tolstov@selfip.ru>
Selfip.Ru
В Пнд, 28/09/2009 в 13:11 +0200, Martijn van Oosterhout пишет:
> On Mon, Sep 28, 2009 at 02:33:36PM +0400, Vasiliy G Tolstov wrote:
> > Hello!
> >
> > I'm using postgresql (8.0.15) on Gentoo Linux (2.6.27.29-titan #2 SMP
> > Sun Aug 16 15:12:53 MSD 2009 x86_64 Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
> > GenuineIntel GNU/Linux)
> >
> > some time (meybe every four day) postgresql get error to all clients
> > what try to connect , a can attach strace to it:
>
> 1. What error?
> 2. What do the logfiles say?
>
> Have a nice day,
postgres@calipso ~ $ psql
psql: FATAL: semctl(1048608, 15, SETVAL, 0) failed: Invalid argument
I can't see errors in log-files.
Daemon was started by gentoo init script:
start() {
checkconfig || return 1
ebegin "Starting PostgreSQL"
if [ -f "$PGDATA/postmaster.pid" ] ; then
rm -f "$PGDATA/postmaster.pid"
fi
start-stop-daemon --start \
--pidfile "${PGDATA}/postmaster.pid" \
--chuid ${PGUSER}:${PGGROUP} \
--exec /usr/bin/postmaster \
-- \
-D "${PGDATA}" \
--silent-mode=true \
${PGOPTS}
eend $?
}
--
Vasiliy G Tolstov <v.tolstov@selfip.ru>
Selfip.Ru
On Mon, Sep 28, 2009 at 02:33:36PM +0400, Vasiliy G Tolstov wrote: > Hello! > > I'm using postgresql (8.0.15) on Gentoo Linux (2.6.27.29-titan #2 SMP > Sun Aug 16 15:12:53 MSD 2009 x86_64 Intel(R) Xeon(R) CPU E5420 @ 2.50GHz > GenuineIntel GNU/Linux) > > some time (meybe every four day) postgresql get error to all clients > what try to connect , a can attach strace to it: 1. What error? 2. What do the logfiles say? Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Please line up in a tree and maintain the heap invariant while > boarding. Thank you for flying nlogn airlines.
Вложения
Vasiliy G Tolstov <v.tolstov@selfip.ru> writes:
>> some time (meybe every four day) postgresql get error to all clients
>> what try to connect , a can attach strace to it:
>> 1. What error?
> postgres@calipso ~ $ psql
> psql: FATAL: semctl(1048608, 15, SETVAL, 0) failed: Invalid argument
My bet is that something has ipcrm'd the SysV semaphores that Postgres
uses.
regards, tom lane
On Mon, 2009-09-28 at 10:22 -0400, Tom Lane wrote: > Vasiliy G Tolstov <v.tolstov@selfip.ru> writes: > >> some time (meybe every four day) postgresql get error to all clients > >> what try to connect , a can attach strace to it: > > >> 1. What error? > > > postgres@calipso ~ $ psql > > psql: FATAL: semctl(1048608, 15, SETVAL, 0) failed: Invalid argument > > My bet is that something has ipcrm'd the SysV semaphores that Postgres > uses. > Hmm. You may be right, because each apache restarting i manualy removed used by apache semaphores..... Ok i'm try to disable this and check. > regards, tom lane -- Vasiliy G Tolstov <v.tolstov@selfip.ru> Selfip.Ru