Mail Archives: cygwin-developers/2001/02/05/11:38:52
--ufue5COskYMJ/eYn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
PostgreSQL running on 1.1.7 (and earlier) had a minor (but annoying)
postmaster shutdown problem. If more than one client connected
concurrently to postmaster (i.e., the PostgreSQL backend), then
the postmaster process would not shutdown cleanly. By "cleanly," I
mean that it would take a random number of "kill -s SIGTERM" attempts
before postmaster would terminate. Further, the greater the number of
concurrent clients the greater the number of kills before postmaster
would finally exit.
I have been working with Yutaka tanida off and on to try to get to the
bottom of this problem. See attached for his latest attempt.
Magically the problem seems to be solved in the latest Cygwin CVS. Did
someone commit a patch that would correct this problem?
Thanks,
Jason
--
Jason Tishler
Director, Software Engineering Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp. Fax: +1 (732) 264-8798
82 Bethany Road, Suite 7 Email: Jason DOT Tishler AT dothill DOT com
Hazlet, NJ 07730 USA WWW: http://www.dothill.com
--ufue5COskYMJ/eYn
Content-Type: message/rfc822
Content-Disposition: inline
Received: from dothill.com (artecon [206.6.181.5])
by ny.dothill.com (8.9.3/8.9.3) with ESMTP id HAA20104
for <jt AT ny DOT dothill DOT com>; Fri, 19 Jan 2001 07:37:02 -0500
Received: from nsv1002.zaq.ne.jp (nsv1002.zaq.ne.jp [210.224.35.4])
by dothill.com (8.9.1b+Sun/8.9.1) with SMTP id EAA20722
for <Jason DOT Tishler AT dothill DOT com>; Fri, 19 Jan 2001 04:08:37 -0800 (PST)
Received: (qmail 22878 invoked from network); 19 Jan 2001 21:23:47 +0900
Received: from zaqd3875806.zaq.ne.jp (HELO media2k) (211.135.88.6)
by nsvm09.zaq.ne.jp with SMTP; 19 Jan 2001 21:23:47 +0900
Date: Fri, 19 Jan 2001 21:19:34 +0900
From: Yutaka tanida <yutaka AT hi-net DOT zaq DOT ne DOT jp>
To: Jason Tishler <Jason DOT Tishler AT dothill DOT com>
Subject: Re: [PORTS] (Cygwin) postmaster shutdown problem
Cc: pgsql-ports AT postgresql DOT org
In-Reply-To: <20010118082914 DOT B1092 AT dothill DOT com>
References: <20010115230456 DOT 4812 DOT YUTAKA AT hi-net DOT zaq DOT ne DOT jp> <20010118082914 DOT B1092 AT dothill DOT com>
Message-Id: <20010119210905 DOT 2797 DOT YUTAKA AT hi-net DOT zaq DOT ne DOT jp>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------_3A682E61279402B4F5D0_MULTIPART_MIXED_"
Content-Transfer-Encoding: 7bit
X-Mailer: Becky! ver. 2.00.01
--------_3A682E61279402B4F5D0_MULTIPART_MIXED_
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Jason,
> On Mon, Jan 15, 2001 at 11:42:13PM +0900, Yutaka tanida wrote:
> > > > Sorry , I have a mistake.
> > > I'm not sure that I understand your above comment. Does it mean that your
> > > patch has a mistake in it?
> >
> > Oh, my mistake is that attached patch can'tfix this problem. It fixes
> > some problem on PostgreSQL , but can't fix it.
>
> Are you still attempting to fix this problem? Please do not interpret
> this as a request. I will understand if you do not want or have time to
> continue with this effort. I just need to know whether or not I should
> start to debug myself.
Today, I'm working on this and finally create a patch against cygwin
1.1.7 . This patch fixes PostgreSQL's problem , but attatched C program
doesn't work correctly.
---
Yutaka tanida<yutaka AT hi-net DOT zaq DOT ne DOT jp>
---- testsig.c
#include<signal.h>
#include<unistd.h>
#include<stdio.h>
#include<errno.h>
void recvsig(int);
static sigset_t unblock,block,old;
int main() {
int pid=getpid();
int pid2=-1;
int i=0,k=0;
char buffer[8];
signal(SIGUSR1,recvsig);
signal(SIGUSR2,recvsig);
sigfillset(&block);
sigemptyset(&unblock);
sigprocmask(SIG_SETMASK,&block,&old);
for(k=0;k<10;k++) {
kill(pid,SIGUSR1);
}
sleep(2);
for(i=0;i<10;i++) {
sigprocmask(SIG_SETMASK,&unblock,&old);
sleep(0);
kill(pid,SIGUSR2); //comment this!
}
}
void recvsig(int sig) {
switch(sig) {
case SIGUSR1:
printf("SIGUSR1\n");
break;
case SIGUSR2:
printf("SIGUSR2\n");
break;
default:
printf("UNKNOWN\n");
break;
}
usleep(100000);
}
--------_3A682E61279402B4F5D0_MULTIPART_MIXED_
Content-Type: application/octet-stream; name="signalfix.diff"
Content-Disposition: attachment;
filename="signalfix.diff"
Content-Transfer-Encoding: base64
KioqIGN5Z3dpbi0xLjEuNy0xL3dpbnN1cC9jeWd3aW4vZXhjZXB0aW9ucy5jYy5vcmlnCVR1ZSBE
ZWMgMjYgMDE6NDM6MTcgMjAwMAotLS0gY3lnd2luLTEuMS43LTEvd2luc3VwL2N5Z3dpbi9leGNl
cHRpb25zLmNjCUZyaSBKYW4gMTkgMjE6MTU6MTEgMjAwMQoqKioqKioqKioqKioqKioKKioqIDYy
NCw2MzAgKioqKgogICAgc2lnc2F2ZS5yZXRhZGRyX29uX3N0YWNrID0gcmV0YWRkcl9vbl9zdGFj
azsKICAgIHNpZ3NhdmUub2xkbWFzayA9IG15c2VsZi0+Z2V0c2lnbWFzayAoKTsJLy8gUmVtZW1i
ZXIgZm9yIHJlc3RvcmF0aW9uCiAgICAvKiBGSVhNRTogTm90IG11bHRpLXRocmVhZCBhd2FyZSAq
LwohICAgc2lnc2F2ZS5uZXdtYXNrID0gbXlzZWxmLT5nZXRzaWdtYXNrICgpIHwgc2lnYS5zYV9t
YXNrIHwgU0lHVE9NQVNLIChzaWcpOwogICAgc2lnc2F2ZS5mdW5jID0gKHZvaWQgKCopKGludCkp
IGhhbmRsZXI7CiAgICBzaWdzYXZlLnNpZyA9IHNpZzsKICAgIHNpZ3NhdmUuc2F2ZWRfZXJybm8g
PSAtMTsJCS8vIEZsYWc6IG5vIGVycm5vIHRvIHNhdmUKLS0tIDYyNCw2MzAgLS0tLQogICAgc2ln
c2F2ZS5yZXRhZGRyX29uX3N0YWNrID0gcmV0YWRkcl9vbl9zdGFjazsKICAgIHNpZ3NhdmUub2xk
bWFzayA9IG15c2VsZi0+Z2V0c2lnbWFzayAoKTsJLy8gUmVtZW1iZXIgZm9yIHJlc3Rvc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