You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Jason Greene <ja...@inetgurus.net> on 2000/11/11 06:10:01 UTC
os-solaris/6211: Apache keep alive time outs not working
The following reply was made to PR os-solaris/6211; it has been noted by GNATS.
From: "Jason Greene" <ja...@inetgurus.net>
To: <ml...@home.com>, <Ma...@cs.com>
Cc: <ap...@Apache.Org>
Subject: os-solaris/6211: Apache keep alive time outs not working
Date: Fri, 10 Nov 2000 23:06:34 -0800
I have reproduced your problem and have an explanation.
I ran into the same situation when running apache with mod_casp2(chilisoft asp module)
It appears that their module loads libpthread which translates all system calls into threaded calls.
(Why they did this I have no idea)
While Solaris does a good job at translating them correctly, sigsetjmp is NOT thread safe.
Thus, all alarms should be reset.
sigrelse will work correctly, but a better method is to use setprocmask, which solaris will translate to pthread_setprocmask.
This quick and dirty patch, however, needs to be reworked for other UNIX's.:
--- http_main.c.orig Thu Nov 9 20:33:20 2000
+++ http_main.c Fri Nov 10 23:03:13 2000
@@ -3849,7 +3849,8 @@
struct sockaddr sa_server;
struct sockaddr sa_client;
listen_rec *lr;
-
+ sigset_t alarm_set;
+
/* All of initialization is a critical section, we don't care if we're
* told to HUP or USR1 before we're done initializing. For example,
* we could be half way through child_init_modules() when a restart
@@ -3919,6 +3920,8 @@
signal(SIGURG, timeout);
#endif
#endif
+ sigaddset(&alarm_set,SIGALRM);
+ sigprocmask(SIG_UNBLOCK,&alarm_set,NULL);
signal(SIGALRM, alrm_handler);
#ifdef TPF
signal(SIGHUP, just_die);
If you need any more info let me know.