server process exited with exit code -1073741819 on 8.2 Windows

From: "JEAN-PIERRE PELLETIER" <pelletier_32(at)sympatico(dot)ca>
To: pgsql-bugs(at)postgresql(dot)org
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: server process exited with exit code -1073741819 on 8.2 Windows
Date: 2006-12-20 17:55:05
Message-ID: BAY133-F1911BDA71E26212169F50595CF0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

Tom:
Sorry to email you directly but the mailing lists seem to be down
and you fixed a similar problem I reported back in October.

I just upgraded to PostgreSQL 8.2 and have a function
which crashes PostgreSQL 8.2 while logging these messages:

server process exited with exit code -1073741819
terminating any other active server processes

It crashes under Windows XP Service Pack 2 and Windows Server 2003.
Note that it worked fine with PostgreSQL 8.1

Strangely, Yesterday I got it working a few hours by calling it with
select * from UDFActualPerformanceVsStandard($1,$2::CHAR) from within
another plpgsql function but then it got back to crashing.

Thanks,
Jean-Pierre Pelletier
e-djuster

To Reproduce:

CREATE TABLE Claim (
ClaimId INTEGER NOT NULL,
AssociatePersonId INTEGER NULL,
IsOnSite BOOLEAN NOT NULL
);

CREATE TABLE SubTask (
TaskCode VARCHAR(3) NOT NULL,
subTaskId SMALLINT NOT NULL,
ReportTaskCode VARCHAR(2) NULL
);

CREATE TABLE WorkEntry (
DurationHour INTERVAL(0) NULL,
TaskCode VARCHAR(3) NULL,
SubTaskId SMALLINT NULL,
PersonId INTEGER NOT NULL,
ClaimId INTEGER NULL,
ExtensionNo CHAR(1) NULL
);

INSERT INTO Claim values (1,0,false);

CREATE TYPE UDTActualPerformanceVsStandard AS (
ClaimId INTEGER,
ExtensionNo CHAR,
IsStandard BOOLEAN,
StandardRoleId SMALLINT,
PersonId INTEGER,
ReportTaskCode VARCHAR,
PersonOrStandardRoleTaskCountItem BIGINT,
PersonOrStandardRoleTaskDistanceKm DECIMAL,
PersonOrStandardRoleTaskDurationHour INTERVAL
);

CREATE OR REPLACE FUNCTION UDFActualPerformanceVsStandard(
PClaimId INTEGER,
PExtensionNo CHAR
) RETURNS SETOF UDTActualPerformanceVsStandard AS $$
DECLARE
isOnSite BOOLEAN;
associatePersonId INTEGER;
ResultRow UDTActualPerformanceVsStandard%ROWTYPE;
BEGIN
SELECT INTO isOnSite, associatePersonId C.IsOnSite,
C.AssociatePersonId FROM Claim C WHERE PClaimId = C.ClaimId;

FOR resultRow IN
SELECT
PClaimId AS ClaimId,
PExtensionNo AS ExtensionNo,
IsStandard,
NULL AS StandardRoleId,
PersonId,
ReportTaskCode,
SUM(PersonOrStandardRoleTaskCountItem),
SUM(PersonOrStandardRoleTaskDistanceKm),
SUM(PersonOrStandardRoleTaskDurationHour)
FROM
(SELECT
FALSE AS IsStandard,
WE.PersonId,
ST.ReportTaskCode,
CAST(NULL AS BIGINT) AS PersonOrStandardRoleTaskCountItem,
CAST(NULL AS DECIMAL) AS PersonOrStandardRoleTaskDistanceKm,
SUM(WE.DurationHour) AS PersonOrStandardRoleTaskDurationHour
FROM
WorkEntry WE

INNER JOIN SubTask ST
ON WE.TaskCode = ST.TaskCode
AND WE.SubTaskId = ST.SubTaskId
WHERE
WE.ClaimId = PClaimId
AND WE.ExtensionNo = PExtensionNo
GROUP BY
WE.PersonId,

ST.ReportTaskCode
UNION ALL
SELECT
FALSE,
associatePersonId,
'DE',
NULL,
NULL,
NULL
) NamedSubselect
WHERE
PersonOrStandardRoleTaskCountItem IS NOT NULL
OR PersonOrStandardRoleTaskDistanceKm IS NOT NULL
OR PersonOrStandardRoleTaskDurationHour IS NOT NULL
OR (associatePersonId = personId AND 'DE' = ReportTaskCode)
GROUP BY
IsStandard,
PersonId,
ReportTaskCode
LOOP
RETURN NEXT resultRow;
END LOOP;

RETURN;
END;
$$ LANGUAGE PLPGSQL STABLE;

select * from UDFActualPerformanceVsStandard(1,'A');

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2006-12-20 18:31:11 Re: server process exited with exit code -1073741819 on 8.2 Windows
Previous Message Matthias.Pitzl 2006-12-20 14:20:25 Re: BUG #2844: gmake install fails