Fw: PortalHeapMemoryFree error in OpenACS

From: "Brian Mueller" <brian(at)twotomatoes(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Fw: PortalHeapMemoryFree error in OpenACS
Date: 2000-08-12 19:07:35
Message-ID: 000e01c00490$94787d60$4e2dced1@brianm
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


----- Original Message -----
From: Brian Mueller
To: pgsql-bugs(at)postgresql(dot)org
Sent: Monday, August 07, 2000 10:18 AM
Subject: PortalHeapMemoryFree error in OpenACS

============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Brian Mueller
Your email address : brian(at)twotomatoes(dot)com

System Configuration
---------------------
Architecture (example: Intel Pentium) : intel 686

Operating System (example: Linux 2.0.26 ELF) : RedHat Linux 6.1

PostgreSQL version (example: PostgreSQL-6.5.1): PostgreSQL-7.0.2

Compiler used (example: gcc 2.8.0) : gcc egcs-2.91.66


Select version() = PostgreSQL 7.0.2 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66

Please enter a FULL description of your problem:
------------------------------------------------

When doing a large query from either an OpenACS 3.2.2 web page (/intranet/employees/admin/index.tcl) or from psql, I get the following error:
NOTICE: PortalHeapMemoryFree: 0x0x41a37610 not in alloc set!
NOTICE: PortalHeapMemoryFree: 0x0x41a37cc8 not in alloc set!
NOTICE: PortalHeapMemoryFree: 0x0x41a37ca0 not in alloc set!
ERROR: btree scan list trashed; can't find 0x0x41a37bf0

The PostgreSQL.org doxlist faq says the following...
5.2) What does the message "NOTICE:PortalHeapMemoryFree:
0x402251d0 not in alloc set!" mean?

You are pfree'ing something that was not palloc'ed.
Beware of mixing malloc/free and palloc/pfree.

...I'm not sure what to do with this information.

The postmaster process looks like so
PID TTY STAT TIME COMMAND
476 ? S 0:04 /usr/local/pgsql/bin/postmaster -B 1000 -S -o -S 8000 -D/usr/local/pgsql/data
Other inserts and queries can be run in this and other databases through psql or from other OpenACS web pages.
Thanks for your help.

The troublesome query (either half of the union can be run successfully):
select users.user_id , coalesce(info.salary, 0) as salary,
users.last_name || ', ' || users.first_names as name,
info.supervisor_id, info.years_experience as
n_years_experience, info.salary_period, info.referred_by,
to_char(info.start_date,'Mon DD, YYYY') as
start_date_pretty,
(case when info.project_lead_p = 't'
then 'Yes'::varchar else 'No'::varchar end) as project_lead,
(case when info.team_leader_p = 't'
then 'Yes'::varchar else 'No'::varchar end) as team_lead,
(case when supervisor_id is NULL
then 'missing'
else (select s.first_names || ' ' || s.last_name
from users s where s.user_id=supervisor_id) end) as supervisor_name,
(case when info.referred_by is NULL
then 'nobody'
else (select r.first_names || ' ' || r.last_name
from users r where r.user_id=referred_by) end) as referral_name
from users_active users, im_employee_info info,
user_group_map ugm
where users.user_id = ugm.user_id
and ugm.group_id = 8
and users.user_id = info.user_id
union
select users.user_id , 0 as salary, users.last_name || ', ' ||
users.first_names as name,
'' as supervisor_id, '' as n_years_experience, '' as
salary_period, '' as referred_by,
'' as start_date_pretty,
'No'::varchar as project_lead,
'No'::varchar as team_lead,
'missing' as supervisor_name,
'nobody' as referral_name
from users_active users, user_group_map ugm
where users.user_id = ugm.user_id
and ugm.group_id = 8
and not exists (select 1 from im_employee_info
where user_id = users.user_id)
order by upper(users.last_name),upper(users.first_names)

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------


Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2000-08-12 23:25:57 Re: Fw: PortalHeapMemoryFree error in OpenACS
Previous Message Tom Lane 2000-08-11 15:56:18 Re: CLUSTER makes table vanish :(