Subject: Sparc and SunOS 4.1.3 -- postmaster problem

From: [email-masked] (Krys Kochut)
Date: Fri, 13 May 94 18:37:30 EDT

Hi,

I am trying to install 4.2 beta on a Sparc running SunOS 4.1.3.
The whole installation ('bmake all install') ended with no problems,
so did the subsequent initdb.  However, when I am trying to run
the postmaster, I get an almost immediate core dump.  As far as
I can tell, I followed the installation instructions faithfully.
Is my problem with the postmaster an already known problem?  If so,
what can I do to correct it?

Thanks!

Krys Kochut

[email-masked]

CS, Univerity of Georgia
Athens, Ga. 30602

(706) 542-2911

===============================================================================
    To add/remove yourself from the POSTGRES mailing list: send mail with 
    the subject line ADD or DEL to "[email-masked]"

    If this fails, send mail to "[email-masked]" and
    a human will deal with it.  DO NOT post to the "postgres" mailing list.
===============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Fri, 13 May 94 17:13:11 -0700

[email-masked] (Krys Kochut) writes:
> the postmaster, I get an almost immediate core dump.

try making the following change to src/backend/postmaster.c.  a guy 
at xerox parc looked at this; the version of getcwd(3) in his library 
interacts in awful ways with the installation of signal handlers in 
postmaster.  i've never seen the problem (we have the stockiest of 
stock 4.1.3 and 4.1.3_U1 installations -- like, not even mandatory 
patches, i think) but he stepped through it with the debugger on his 
machine and that's what he found.  i *think* this will work.

if it doesn't i'll have to change calls to getcwd(3) (the posix routine)
to getwd(3) (the bsd-specific routine) just for sunos4.  man, i *hate* 
doing stuff like that.

*** 1.77	1994/02/09 00:12:24
--- postmaster.c	1994/05/07 00:13:34
***************
*** 1,5 ****
  /*
!  * $Header: /usr/local/devel/postgres/src/backend/postmaster/RCS/postmaster.c,v 1.77 1994/02/09 00:12:24 aoki Exp $
   *
   *	POSTMASTER
   *
--- 1,5 ----
  /*
!  * $Header: /usr/local/devel/postgres/src/backend/postmaster/RCS/postmaster.c,v 1.78 1994/05/07 00:09:19 aoki Exp $
   *
   *	POSTMASTER
   *
***************
*** 168,181 ****
  
      progname = argv[0];
  
-     signal(SIGCHLD, reaper);
-     signal(SIGTTIN, SIG_IGN);
-     signal(SIGTTOU, SIG_IGN);
-     signal(SIGHUP, pmdie);
-     signal(SIGINT, pmdie);
-     signal(SIGTERM, pmdie);
-     signal(SIGCONT, dumpstatus);
- 
      /* for security, no dir or file created can be group or other accessible */
      (void) umask((mode_t) 0077);
  
--- 168,173 ----
***************
*** 303,308 ****
--- 295,308 ----
      if (silentflag)
  	pmdaemonize();
  
+     signal(SIGCHLD, reaper);
+     signal(SIGTTIN, SIG_IGN);
+     signal(SIGTTOU, SIG_IGN);
+     signal(SIGHUP, pmdie);
+     signal(SIGINT, pmdie);
+     signal(SIGTERM, pmdie);
+     signal(SIGCONT, dumpstatus);
+ 
      status = ServerLoop(ServerSock);
  
      ExitPostmaster(status != STATUS_OK);
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki