Re: 7.3b1 panic in vacuum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mats Lofkvist <mal(at)algonet(dot)se>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: 7.3b1 panic in vacuum
Date: 2002-10-31 16:47:30
Message-ID: 7614.1036082850@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Mats Lofkvist <mal(at)algonet(dot)se> writes:
> PANIC: moving chain: failed to add item with len = 93 to page 9395

Thanks for the report. I see a likely cause of this, which seems to
have been there for awhile:

to_vacpage->free -= MAXALIGN(tlen);
if (to_vacpage->offsets_used >= to_vacpage->offsets_free)
to_vacpage->free -= MAXALIGN(sizeof(ItemIdData));

The second MAXALIGN() shouldn't be there. Because it is,
to_vacpage->free is decremented too much, possibly causing it to wrap
around and look large and positive, possibly allowing the code to try
to move more stuff onto the page than will fit.

> When rerunning the vacuum on the table it failed on, it seems to work:

Yeah, it would; after a system restart there'd be no tuple-chain-moving
activity because no other open transactions, so the buggy code wouldn't
get executed.

> I'm running it on a sparc/solaris box. There is no core dump.

There wouldn't be that, either; elog(PANIC) doesn't induce a core dump.
Maybe it should.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Darcy Buskermolen 2002-10-31 17:03:52 INTERVAL problems with greater than 2^32 seconds
Previous Message Stephan Szabo 2002-10-31 16:38:39 Re: hi-problem while installing postgressql 7.2 version