Subject: backend still crashing

From: [email-masked] (Alfredo Sanchez)
Date: Fri, 21 Feb 92 12:39:44 -0800

I'm still having probs with a C program that
causes the backend to crash.
The sequence of operations is as follows
(not very different from one posted previously):
----------------------------------------------
PQsetdb(mydb)
begin
retrieve into temp1 (e1.sid) 
                      from e1 in SIDES 
                      where e1.appid = "X"

retrieve into temp2 (e2.associd) 
                      from e1 in temp1, 
                           e2 in ASSOCS 
                      where e1.sid = e2.sid

retrieve into temp3 (e3.sid) 
                      from e1 in temp1, e2 in temp2, e3 in ASSOCS 
                      where e3.associd = e2.associd 
                        and e3.sid != e1.sid

retrieve portal p1 unique (e1.appid,e1.compid,e1.psid) 
           from e1 in SIDES, e3 in temp3 
           where e1.sid = e3.sid 

	/* ... data used here */

close p1
destroy temp1 
destroy temp2 
destroy temp3
end
PQfinish()
--------------------------------------------
(actually temp1, temp2 and temp3 are generated with 
unique names for each copy of the program being run)
my program works well whenever it's the only one using the db,
but if the monitor is also running, or another copy of the program
runs at the same time, shared memory is corrupted and all of
the backends crash with the message "I've been signalled...",
previously commented.
when tracing its behavior, i introduced a couple of C statements like:

	printf("press enter...\n"); getchar();

between the end of the transaction and the PQfinish call.
misteriously (for me), no problem occurs!
obviously, i don't want my program to be "interactive",
so i need to solve the problem by other means.

any clue?

thanx in advance,

J Alfredo Sanchez H
-------------------
Hypertext Research Lab
Department of Computer Science
Texas A&M University