pg_user crash

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: pg_user crash
Date: 1998-09-10 19:13:27
Message-ID: 199809101913.PAA06162@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

OK, I have a way to debug this.

Add to palloc and pfree a printf like:

printf("palloc: %d\n", mem);
printf("pfree : %d\n", mem);

The printf's should go after the memory is allocated in palloc, and
before it is free'ed in pfree().

and then run the backend and issue the query causing the problem, and
grab the lines from the postmaster log file. Check the last pfree
value, because that is the one that is crashing it. Check the list to
see if it has been palloc'ed. If it has, was it pfree'ed by someone
else, and who palloc'ed it. If it is not on the list, figure out how it
got on to the palloc list.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)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)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Taral 1998-09-10 19:59:49 pg_user backtrace -- with ElectricFence (looks useful :)
Previous Message Bruce Momjian 1998-09-10 18:54:04 Re: [HACKERS] Missing headers Windows NT port