Return-Path: Delivered-To: apache-bugdb-archive@hyperreal.org Received: (qmail 28012 invoked by uid 6000); 10 Oct 1998 04:00:10 -0000 Received: (qmail 27876 invoked by uid 2001); 10 Oct 1998 04:00:02 -0000 Received: (qmail 26930 invoked by uid 2012); 10 Oct 1998 03:56:52 -0000 Message-Id: <19981010035652.26929.qmail@hyperreal.org> Date: 10 Oct 1998 03:56:52 -0000 From: Chris Bradley Reply-To: furrier@iglou.com To: apbugs@hyperreal.org X-Send-Pr-Version: 3.2 Subject: general/3174: TransferLog with pipe hangs server on SIGHUP restart Sender: apache-bugdb-owner@apache.org Precedence: bulk >Number: 3174 >Category: general >Synopsis: TransferLog with pipe hangs server on SIGHUP restart >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Fri Oct 9 21:00:02 PDT 1998 >Last-Modified: >Originator: furrier@iglou.com >Organization: apache >Release: 1.3.2 and 1.3.3 >Environment: Sun Sparc / Solaris 2.5.1 at latest recommended patch level as of October 9th GCC 2.8.1 Uname: SunOS mayserv 5.5.1 Generic_103640-20 sun4u sparc SUNW,Ultra-1 >Description: Apache 1.3.3 (as well as 1.3.2) experiences a hang during a SIGHUP invoked restart if the directory "LogTransfer" is set to a piped program under Solaris 2.5.1. It doesn't matter what the piped program does. You could have a sh script of simply "cat > /tmp/foobar" and the problem is still reproducable. Basically, when doing a SIGHUP on the server, it will kill off all children processes *except* the TransferLog script. For some reason, it wont die with a regular SIGTERM that Apache tries to send it. Eventually, however, Apache appears to get more forceful and eventually kills it off with a -9 signal (I suppose), but it takes almost 20 minutes it seems. After that, it works fine. Most curiously, a graceful restart (with a SIGUSR1) works perfectly every time with no delays at all. The piped process dies immediately and restarts like it should. It almost appears like a signal masking problem with SIGHUP restarts with regards to TransferLog piped processes. >How-To-Repeat: Take any Solaris system running 2.5.1 (or maybe even 2.6) and set the TransferLog to a piped program. Make the piped program do something simple like "cat > /tmp/foobar". Then, start apache. After it's running, SIGHUP the server. You will see all the children httpd's die off immediately, but the server will then hang for up to 15 minutes. If you then start all over and use a SIGUSR1 instead, it will work fine. >Fix: Not familiar enough with Apache's or Solaris' signaling code to recommend a fix. >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]