[Rt-commit] rt branch, 4.0/test-fcgi-socket-path, created. rt-4.0.2-187-geb2853c
Alex Vandiver
alexmv at bestpractical.com
Wed Oct 5 15:00:25 EDT 2011
The branch, 4.0/test-fcgi-socket-path has been created
at eb2853c7a5312ab23561c768d4dacb478892bc95 (commit)
- Log -----------------------------------------------------------------
commit 846e57ab117ef16e55ff3bba4f5e1394f4fbb5ad
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Oct 5 14:45:35 2011 -0400
Wrap FastCgiServer onto multiple lines for legibility
diff --git a/t/data/configs/apache2.2+fastcgi.conf.in b/t/data/configs/apache2.2+fastcgi.conf.in
index efb1ee8..44c353b 100644
--- a/t/data/configs/apache2.2+fastcgi.conf.in
+++ b/t/data/configs/apache2.2+fastcgi.conf.in
@@ -28,7 +28,11 @@ LogLevel debug
AddDefaultCharset UTF-8
-FastCgiServer %%RT_SBIN_PATH%%/rt-server.fcgi -processes 1 -idle-timeout 180 -initial-env RT_SITE_CONFIG=%%RT_SITE_CONFIG%% -initial-env RT_TESTING=1
+FastCgiServer %%RT_SBIN_PATH%%/rt-server.fcgi \
+ -processes 1 \
+ -idle-timeout 180 \
+ -initial-env RT_SITE_CONFIG=%%RT_SITE_CONFIG%% \
+ -initial-env RT_TESTING=1
Alias /NoAuth/images/ %%DOCUMENT_ROOT%%/NoAuth/images/
ScriptAlias / %%RT_SBIN_PATH%%/rt-server.fcgi/
commit eb2853c7a5312ab23561c768d4dacb478892bc95
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Oct 5 14:47:21 2011 -0400
Specify a shorter socket path when running tests under mod_fastcgi
UNIX socket paths are required to fit in the size of the sun_path field
of a sockaddr_un, which is a char[108] on modern Linux machines, or a
char[104] on OS X. Apache will error out if the socket path for the
fastcgi server is longer than this limit.
By default, the socket path is generated by taking the FastCgiIpcDir and
appending an md5sum of the fastcgi process' path, user, and group.
Since 8f40138, the per-test tmpdir's path is longer for tests with
longer filenames. This, combined with the 32-character md5sum, can
cause the generated socket path to be greater than the 108 or 104
character limit, if the top level rt/ directory is not close to the
filesystem root.
Remove (32 - length("socket")) = 26 characters from the socket path by
setting the socket path explicitly. This is still possible to overflow;
a more robust fix would be to place the socket under /tmp, but this
removes some of the locality of the temporary files. Care would also
need to be exercised in the naming of the socket, as mod_fastcgi
generates the same md5sum for all test runs, as they all have the same
fastcgi server path, user, and group.
diff --git a/t/data/configs/apache2.2+fastcgi.conf.in b/t/data/configs/apache2.2+fastcgi.conf.in
index 44c353b..3ec36dd 100644
--- a/t/data/configs/apache2.2+fastcgi.conf.in
+++ b/t/data/configs/apache2.2+fastcgi.conf.in
@@ -5,8 +5,6 @@ ServerAdmin root at localhost
%%LOAD_MODULES%%
-FastCgiIpcDir %%TMP_DIR%%
-
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User @WEB_USER@
@@ -29,6 +27,7 @@ LogLevel debug
AddDefaultCharset UTF-8
FastCgiServer %%RT_SBIN_PATH%%/rt-server.fcgi \
+ -socket %%TMP_DIR%%/socket \
-processes 1 \
-idle-timeout 180 \
-initial-env RT_SITE_CONFIG=%%RT_SITE_CONFIG%% \
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list