Re: Autovacuum daemon terminated by signal 11

From: "Justin Pasher" <justinp(at)newmediagateway(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'Alvaro Herrera'" <alvherre(at)commandprompt(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Autovacuum daemon terminated by signal 11
Date: 2009-01-17 21:41:47
Message-ID: 626B243E214B4F3483B014FD7E7AD0CF@taz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Saturday, January 17, 2009 9:50 AM
> To: Alvaro Herrera
> Cc: Justin Pasher; pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] Autovacuum daemon terminated by signal 11
>
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Hmm, in retrospect this is pretty obviously buggy. I can't say that
> > it's that easy for me to reproduce it though; I definitely can't make it
> > crash. Maybe by sheer luck, the new TopTransactionContext pointer
> > points to the same memory area that the old was stored in.
>
> Yeah, there could be some platform dependency involved. I'm guessing
> different structs that happen to fall into the same palloc size category
> on one platform but not another.
>
> Anyway, it happens consistently on my HP box. I find that your proposed
> patch fixes it, but makes the "normal" path crash :-( --- the loop in
> do_autovacuum has to be executed in AutovacMemCxt, because it creates an
> Oid List that gets passed to vacuum() and had better not be in a
> transaction-lifetime context. The attached modified patch works for me.
>
> regards, tom lane

I tried both Alvaro's patch and your patch, and I actually got the same
results from both. I didn't experience a crash when autovacuum kicked in or
when manually performing a vacuum on the database (if that's what you meant
by the "normal path"). At any rate, everything seems to be working properly
for me with the patch. Thanks!

Justin Pasher

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-01-18 06:15:42 Re: Autovacuum daemon terminated by signal 11
Previous Message Grzegorz Jaśkiewicz 2009-01-17 21:33:31 Re: Trigger to clone across databases?

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2009-01-17 22:13:08 Re: pg_dump versus views and opclasses
Previous Message Tom Lane 2009-01-17 19:03:55 Re: MemoryContextSwitchTo (Re: [GENERAL] Autovacuum daemon terminated by signal 11)