Thread: Re: [HACKERS] Core dump in regression tests.
> Thomas A. Szybist" <szybist@boxhill.com> > > Bruce Momjian <maillist@candle.pha.pa.us> > > > > Again, if someone wants to conditionally compile the directories to find > > the offending file, I am sure we can get a fix for it. > > > > At first look it seems to be: backend/catalog/indexing.c. > Maybe Keith can confirm? > > Thanks, Tom, I recompiled the latest cvs with -O2 and found that the crash on table creation was NOT now failing so I'm a little confused :-( I'm just updating my cvs, and will do another build and see how things go. If only I had the same failures as before I'd be able to confirm your suspicions on indexing.c Til Later, Keith.
> > Thomas A. Szybist" <szybist@boxhill.com> > > > Bruce Momjian <maillist@candle.pha.pa.us> > > > > > > Again, if someone wants to conditionally compile the directories to find > > > the offending file, I am sure we can get a fix for it. > > > > > > > At first look it seems to be: backend/catalog/indexing.c. > > Maybe Keith can confirm? > > > > Thanks, > > Tom, > > I recompiled the latest cvs with -O2 and found that the crash on > table creation was NOT now failing so I'm a little confused :-( > > I'm just updating my cvs, and will do another build and see how > things go. > > If only I had the same failures as before I'd be able to confirm > your suspicions on indexing.c I have found a problem in indexing.c. In CatalogIndexFetchTuple(), there is a particulary weird do..while loop, and in trying to clean it up as part of the megapatch, I broke it and thought I had it fixed. It appears it may still be broken. The ReleaseBuffer(buffer) call could happen even if no valid tuple is returned because buffer has a random value. I am running a test now, and will post the fix as soon as I am sure it works. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
> I recompiled the latest cvs with -O2 and found that the crash on > table creation was NOT now failing so I'm a little confused :-( > > I'm just updating my cvs, and will do another build and see how > things go. > > If only I had the same failures as before I'd be able to confirm > your suspicions on indexing.c > > Til Later, > Keith. > > > OK, I am applying my patch now. I certainly fixes a potential problem, so I suspect it will fix the problems you are seeing. Thomas, perhaps it will fix the regression problems too. No way to know. Here is the new while loop. Much better. --------------------------------------------------------------------------- sd = index_beginscan(idesc, false, num_keys, skey); while (indexRes = index_getnext(sd, ForwardScanDirection)) { ItemPointer iptr; iptr = &indexRes->heap_iptr; tuple = heap_fetch(heapRelation, SnapshotNow, iptr, &buffer); pfree(indexRes); if (HeapTupleIsValid(tuple)) break; } -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
In message <199808302324.TAA28018@candle.pha.pa.us>, Bruce Momjian writes: > > I recompiled the latest cvs with -O2 and found that the crash on > > table creation was NOT now failing so I'm a little confused :-( > > > > I'm just updating my cvs, and will do another build and see how > > things go. > > > > If only I had the same failures as before I'd be able to confirm > > your suspicions on indexing.c > > > > Til Later, > > Keith. > > > > > > > > OK, I am applying my patch now. I certainly fixes a potential problem, > so I suspect it will fix the problems you are seeing. > > Thomas, perhaps it will fix the regression problems too. No way to > know. > > Here is the new while loop. Much better. > > --------------------------------------------------------------------------- > > > sd = index_beginscan(idesc, false, num_keys, skey); > while (indexRes = index_getnext(sd, ForwardScanDirection)) > { > ItemPointer iptr; > > iptr = &indexRes->heap_iptr; > tuple = heap_fetch(heapRelation, SnapshotNow, iptr, &buffer); > pfree(indexRes); > if (HeapTupleIsValid(tuple)) > break; > } > > -- > Bruce Momjian | 830 Blythe Avenue > maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 > + If your life is a hard drive, | (610) 353-9879(w) > + Christ can be your backup. | (610) 853-3000(h) > I tried patching indexing.c with this new loop--no luck. I just checked out a fresh copy, still no luck. I don't understand why it now works for Keith. Yesterday I tried this on Solaris, but I was bitten by not having flock. Tom Szybist szybist@boxhill.com