You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2010/08/17 19:30:02 UTC
DO NOT REPLY [Bug 49768] New: Piped Log over /bin/sh/ -c
https://issues.apache.org/bugzilla/show_bug.cgi?id=49768
Summary: Piped Log over /bin/sh/ -c
Product: Apache httpd-2
Version: 2.3-HEAD
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: mod_log_config
AssignedTo: bugs@httpd.apache.org
ReportedBy: l.declercq@nuxwin.com
Hello ;
With Apache version 2.2.16 (under Debian Squeeze) I've problem with a Piped log
script.
Explanation:
When run under Debian Lenny (Apache version 2.2.9), Apache spawn the log script
directly. So, only one process appert when I run the 'px aux' command'.
Example for the Piped Error log:
root 1253 0.0 0.2 5208 1364 pts/0 S+ 18:16 0:00 /usr/bin/perl
/var/www/ispcp/engine/ispcp-apache-logger -e
But under the latest Apache version (2.2.16), the script seem to be run over
the '/bin/sh -c' command.
root 1550 0.0 0.0 1748 484 pts/0 S+ 18:16 0:00 /bin/sh -c
/var/www/ispcp/engine/ispcp-apache-logger -e
root 1551 0.0 0.2 5208 1364 pts/0 S+ 18:16 0:00 /usr/bin/perl
/var/www/ispcp/engine/ispcp-apache-logger
I don't know why apache process like this now but this way is not good for me
because now, I unable to trap any signal from my perl script.
Some info about my configuration:
My relevant Apache configuration:
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I
%O" ispcplog
CustomLog "| /var/www/ispcp/engine/ispcp-apache-logger" ispcplog
ErrorLog "| /var/www/ispcp/engine/ispcp-apache-logger -e"
dev:/home/nuxwin# uname -a
Linux dev 2.6.26-2-686 #1 SMP Mon Jun 21 05:58:44 UTC 2010 i686 GNU/Linux
root@ispcp:~# apachectl -V
Server version: Apache/2.2.16 (Debian)
Server built: Jul 24 2010 20:24:16
Server's Module Magic Number: 20051115:24
Server loaded: APR 1.4.2, APR-Util 1.3.9
Compiled using: APR 1.4.2, APR-Util 1.3.9
Architecture: 32-bit
Server MPM: Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/worker"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/apache2"
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="mime.types"
-D SERVER_CONFIG_FILE="apache2.conf"
root@ispcp:~# uname -a
Linux ispcp 2.6.32-5-686 #1 SMP Sat Jul 24 02:27:10 UTC 2010 i686 GNU/Linux
Note: Sorry for my poor English, I'm french.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49768] Piped Log over /bin/sh/ -c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49768
--- Comment #1 from Laurent Declercq <l....@nuxwin.com> 2010-08-17 13:33:24 EDT ---
Update:
Truly uname result for my squeeze:
root@ispcp:/etc/apache2/sites-available# uname -a
Linux ispcp 2.6.32-5-686 #1 SMP Sat Jul 24 02:27:10 UTC 2010 i686 GNU/Linux
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49768] [FIXED] Piped Log over /bin/sh/ -c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49768
--- Comment #5 from Rainer Jung <ra...@kippdata.de> 2010-08-22 11:19:46 EDT ---
*** Bug 49798 has been marked as a duplicate of this bug. ***
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49768] Piped Log over /bin/sh/ -c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49768
Laurent Declercq <l....@nuxwin.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|2.3-HEAD |2.2.15
--- Comment #2 from Laurent Declercq <l....@nuxwin.com> 2010-08-17 13:50:38 EDT ---
Fixed:
Lake of documentation.
Lenny have Apache 2.2.9 so no problem but Debian Squeeze has Apache 2.2.16 and
since Apache 2.2.12 :
*) New piped log syntax: Use "||process args" to launch the given process
without invoking the shell/command interpreter. Use "|$command line"
(the default behavior of "|command line" in 2.2) to invoke using shell,
consuming an additional shell process for the lifetime of the logging
pipe program but granting additional process invocation flexibility.
[William Rowe]
Info get from the Changelog. Please Update the documentation.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49768] [FIXED] Piped Log over /bin/sh/ -c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49768
Dan Poirier <po...@pobox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49768] [FIXED] Piped Log over /bin/sh/ -c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49768
Rainer Jung <ra...@kippdata.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|mod_log_config |Documentation
--- Comment #3 from Rainer Jung <ra...@kippdata.de> 2010-08-17 14:19:25 EDT ---
Note that calling the piped logger using "/bin/sh -c" didn't change during the
2.2.x lifetime. But shells differ in what they actually do when using "-c".
Some of them fork the final program and some exec. So depending on that the
logger stays as a child of the shell, or the shell is immediately replaced with
the piped logger as the immediate child of Apache.
The new syntax lets you choose to not involve the shell at all. Default is
still using the shell! The incompatibility here is likely due to a changed
shell behaviour on your platform.
You can test the shell behaviour on your old and new platforms without using
Apache via calling
/bin/sh -c "sleep 60" &
directly in a shell, and then checking in the process list, whether you can see
the shell *and* the sleep command, or only the sleep command.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49768] [FIXED] Piped Log over /bin/sh/ -c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49768
Laurent Declercq <l....@nuxwin.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |l.declercq@nuxwin.com
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49768] [FIXED] Piped Log over /bin/sh/ -c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49768
Laurent Declercq <l....@nuxwin.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Piped Log over /bin/sh/ -c |[FIXED] Piped Log over
| |/bin/sh/ -c
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49768] [FIXED] Piped Log over /bin/sh/ -c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49768
Dan Poirier <po...@pobox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 49768] [FIXED] Piped Log over /bin/sh/ -c
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49768
--- Comment #4 from Laurent Declercq <l....@nuxwin.com> 2010-08-17 15:50:17 EDT ---
Re ;
You right on this issue:
On Lenny:
nuxwin 4433 0.0 0.0 3016 504 pts/4 S 21:47 0:00 sleep 60
# ls -la /bin/sh
lrwxrwxrwx 1 root root 4 avr 28 10:27 /bin/sh -> bash
On Squeeze:
root 2421 0.3 0.0 1748 484 pts/1 S 21:45 0:00 /bin/sh -c
sleep 60
root 2422 0.0 0.0 3420 496 pts/1 S 21:45 0:00 sleep 60
On squeeze:
# ls -la /bin/sh
lrwxrwxrwx 1 root root 4 9 août 02:51 /bin/sh -> dash
It's the reason. It's just shell version issue.
Thank for your explaination here. You can close this ticket.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org