Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA16688; Thu, 30 Jan 92 06:03:01 -0800
Message-Id: <9201301403.AA16688@postgres.Berkeley.EDU>
From: U-E99999-Stephen Williams <williams_stephen_d@ae.ge.com>
Subject: Re: Bug Report
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
To: mer@postgres.berkeley.edu
Date: Thu, 30 Jan 92 8:27:54 EST
Cc: postgres@postgres.berkeley.edu
In-Reply-To: <9201300038.AA08974@postgres.Berkeley.EDU>; from "Postgres Mailing Archive" at Jan 29, 92 4:38 pm
Mailer: Elm [revision: 64.9]

> 
> you write:
> >   We have transported Postgres v3.1 to run on an SGI. The only real bug
> > encountered is located in postmaster.c in the following area
> > 
> > 
> > 	switch (status) {
> > 	case STATUS_OK:
> > 	  ConnStartup (port);
> > 	  ActiveBackends = TRUE;
> > 	  PortDestroy (port) ;
> > 	  baseMask &= ~ port->mask;
> > 	  ListDelete (curr) ;
> > 
> > 
> > PortDestroy ends with a call free(port).  ...
> 
> Yeah, Neil McQuaige recently pointed this out to us as he discovered it 
> while doing a SysV port.
> 
> 
> Jeff Meredith
> mer@postgres.berekeley.edu
> 
Could someone forward me any wisdom, bugs, etc. for a SysV port?

I have Postgres almost completely ported to ISC 386 Unix SysV3.2 Rel.3.

I have had the backend working perfectly (apparently, ran benchmarks, etc),
but have had severe trouble with the Postmaster.  The worst problem was
that when the above PortDestroy was called, the port was being closed
in the child also!!!  I think this is a bug in ISC TCP/IP (which is
really library layer on top of streams drivers/calls).  I commented out
the PortDestroy call for now (yes, I know I will run out of file 
descriptors eventually....)  I don't think the above change will
solve the problem, let me know if you disagree.  I checked port
by single stepping the frontend and postmaster and using netstat -a.

I now have the backend starting up correctly, with a socket, but it
still can't communicate to the frontend (it exits after a short time
with a 0 exit code, so no postmaster error...).

BTW, this was with 3.0 and I have just merged in 3.1 with my changes.
I will be back to debugging mode shortly.
Note that I am using gcc 1.40...

Thanks.
sdw
--
Stephen D. Williams     SDW Systems (513) 439-5428   GE AEG (513) 552-5237
ICBM: 39 34N 85 15W     Internet: williams_stephen_d@ae.ge.com CIS 76244,210
                        sdw@world.std.com
Object Oriented R&D     By Horse: 10028 Village Tree Ct., Miamisburg, OH 45342
