Обсуждение: postmaster hangs

Поиск
Список
Период
Сортировка

postmaster hangs

От
Tsirkin Evgeny
Дата:
Today i was trying to run an old ver. of an application on test server .
After a while i have got the pg hangs :
 9899 ?        S      0:00 postgres:  [local] SELECT
 9932 ?        S      0:00 postgres: [local] SELECT
 9933 ?        S      0:00 postgres: [local] startup
 9936 ?        S      0:00 postgres: [local] startup
 9941 ?        S      0:00 postgres:
 9974 ?        S      0:00 postgres: [local] startup
 9976 ?        S      0:00 postgres: [local] startup
 9978 ?        S      0:00 postgres: [local] startup
 9983 ?        S      0:00 postgres: [local] startup
 9989 ?        S      0:00 postgres:  template1 [local] startup
This a web application with apache connecting to post and doing things.
I have tryed to connect to the db with psql - nosuccess.
This the backtrace of 9989.
(gdb)
backtrace
#0  0xffffe410 in ?? ()
#1  0xbfffcc28 in ?? ()
#2  0x00000001 in ?? ()
#3  0x01488005 in ?? ()
#4  0x402ffffb in semop () from /lib/tls/libc.so.6
#5  0x08154d07 in PGSemaphoreLock ()
#6  0x08177ade in LWLockAcquire ()
#7  0x0816c7f2 in ReadBufferInternal ()
#8  0x08086eb0 in _bt_getbuf ()
#9  0x080882b6 in _bt_getroot ()
#10 0x0808ab62 in _bt_search ()
#11 0x0808aeca in _bt_first ()
#12 0x080894e0 in btgettuple ()
#13 0x081eba7b in FunctionCall2 ()
#14 0x08083f86 in index_getnext ()
#15 0x080836e4 in systable_getnext ()
#16 0x080f87ed in RelationBuildTriggers ()
#17 0x081e44ab in RelationCacheInitializePhase2 ()
#18 0x081f0ce5 in InitPostgres ()
#19 0x0817db30 in PostgresMain ()
#20 0x08157754 in ServerLoop ()
#21 0x08158d1e in PostmasterMain ()
#22 0x08128c21 in main ()

Version 7.4 something (does not remember and can't get it because can't
connect to the db).Trying to connect to the template also hangs up.
Please help.
Evgeny.

Re: postmaster hangs

От
Tsirkin Evgeny
Дата:
Forgot to mention this SUSE 9 with the default 2.6.5 kernel.
Logs does not show anything strange and post refuses to shutdown
gracefully or receive connections.Processes just hangs out there ... .

Evgeny.

On Wed, 4 Jan 2006, Tsirkin Evgeny wrote:

> Today i was trying to run an old ver. of an application on test server .
> After a while i have got the pg hangs :
>  9899 ?      S      0:00 postgres:  [local] SELECT
>  9932 ?      S      0:00 postgres: [local] SELECT
>  9933 ?      S      0:00 postgres: [local] startup
>  9936 ?      S      0:00 postgres: [local] startup
>  9941 ?      S      0:00 postgres:
>  9974 ?      S      0:00 postgres: [local] startup
>  9976 ?      S      0:00 postgres: [local] startup
>  9978 ?      S      0:00 postgres: [local] startup
>  9983 ?      S      0:00 postgres: [local] startup
>  9989 ?      S      0:00 postgres:  template1 [local] startup
> This a web application with apache connecting to post and doing things.
> I have tryed to connect to the db with psql - nosuccess.
> This the backtrace of 9989.
> (gdb)
> backtrace
> #00xffffe410 in ?? ()
> #10xbfffcc28 in ?? ()
> #20x00000001 in ?? ()
> #30x01488005 in ?? ()
> #40x402ffffb in semop () from /lib/tls/libc.so.6
> #50x08154d07 in PGSemaphoreLock ()
> #6 0x08177ade in LWLockAcquire ()
> #70x0816c7f2 in ReadBufferInternal ()
> #80x08086eb0 in _bt_getbuf ()
> #90x080882b6 in _bt_getroot ()
> #10 0x0808ab62 in _bt_search ()
> #11 0x0808aeca in _bt_first ()
> #12 0x080894e0 in btgettuple ()
> #13 0x081eba7b in FunctionCall2 ()
> #14 0x08083f86 in index_getnext ()
> #15 0x080836e4 in systable_getnext ()
> #16 0x080f87ed in RelationBuildTriggers ()
> #17 0x081e44ab in RelationCacheInitializePhase2 ()
> #18 0x081f0ce5 in InitPostgres ()
> #19 0x0817db30 in PostgresMain ()
> #20 0x08157754 in ServerLoop ()
> #21 0x08158d1e in PostmasterMain ()
> #22 0x08128c21 in main ()
>
> Version 7.4 something (does not remember and can't get it because can't
> connect to the db).Trying to connect to the template also hangs up.
> Please help.
> Evgeny.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>      subscribe-nomail command to majordomo@postgresql.org so that your
>      message can get through to the mailing list cleanly
>


Re: postmaster hangs

От
Tom Lane
Дата:
Tsirkin Evgeny <tsurkin@mail.jct.ac.il> writes:
> Today i was trying to run an old ver. of an application on test server .
> After a while i have got the pg hangs :

It looks like someone is holding a critical LWLock --- hard to tell if
it's the BufMgrLock or a per-buffer lock for a system index's metapage,
but must be one or the other.  Try backtracing the processes that
*aren't* hung in this particular way.  I'm not sure you'll be able to
learn anything much given that the build doesn't have debug info, but
you might as well try.

            regards, tom lane

Re: postmaster hangs

От
Tsirkin Evgeny
Дата:
sorry ,but i had to go with my job so i have killed one of the backends
and this made the post restart.
However befor this i have done another backtrace ,the one that was hang
in the middle of SELECT (not startup)
and got this:
#0  0xffffe410 in ?? ()
#1  0xbfffcf08 in ?? ()
#2  0x00000001 in ?? ()
#3  0x01490006 in ?? ()
#4  0x402ffffb in semop () from /lib/tls/libc.so.6
#5  0x08154d07 in PGSemaphoreLock ()
#6  0x08177ade in LWLockAcquire ()
#7  0x0816c7f2 in ReadBufferInternal ()
#8  0x08086eb0 in _bt_getbuf ()
#9  0x080882b6 in _bt_getroot ()
#10 0x0808ab62 in _bt_search ()
#11 0x0808aeca in _bt_first ()
#12 0x080894e0 in btgettuple ()
#13 0x081eba7b in FunctionCall2 ()
#14 0x08083f86 in index_getnext ()
#15 0x081174a0 in IndexNext ()
#16 0x0811139f in ExecScan ()
#17 0x081173c8 in ExecIndexScan ()
#18 0x0810d34d in ExecProcNode ()
#19 0x0810b9ef in ExecutorRun ()
#20 0x0817f7f3 in PortalRunSelect ()
#21 0x08180507 in PortalRun ()
#22 0x0817c5b4 in exec_simple_query ()
#23 0x0817e4d3 in PostgresMain ()
#24 0x08157754 in ServerLoop ()
#25 0x08158d1e in PostmasterMain ()
#26 0x08128c21 in main ()
I did not understand from your message wheither this is a problem in pg
or in application.
The exact version of pg is postgres (PostgreSQL) 7.4.8.
Thanks.
Tom Lane wrote:

>Tsirkin Evgeny <tsurkin@mail.jct.ac.il> writes:
>
>
>>Today i was trying to run an old ver. of an application on test server .
>>After a while i have got the pg hangs :
>>
>>
>
>It looks like someone is holding a critical LWLock --- hard to tell if
>it's the BufMgrLock or a per-buffer lock for a system index's metapage,
>but must be one or the other.  Try backtracing the processes that
>*aren't* hung in this particular way.  I'm not sure you'll be able to
>learn anything much given that the build doesn't have debug info, but
>you might as well try.
>
>            regards, tom lane
>
>