Sunday, 13 May 2007
|
| RewriteRule: Parenthesis not capturing Garth Winter Webb 13:26:42 |
| | Hello, I'm trying to use the RewriteRule directive to rewrite a simple request. I've added these lines to a VirtualHost section of an apache running on 'my.host' listening on port 80:
RewriteEngine on
RewriteLog "/tmp/rewrite.log" RewriteLogLevel 9 RewriteRule ^/(.+) http://my.host:8600/somepath/$1 [P]
When I make a request like this:
http://my.host/foo
I see these 5 lines in my rewrite log:
192.168.1.124 - - [16/Feb/2003:12:14:09 -0800] [my.host/sid#80d18a4][rid#80e0794/initial] (2) init rewrite engine with requested uri /foo 192.168.1.124 - - [16/Feb/2003:12:14:09 -0800] [my.host/sid#80d18a4][rid#80e0794/initial] (3) applying pattern '^/(.*)' to uri '/foo' 192.168.1.124 - - [16/Feb/2003:12:14:09 -0800] [my.host/sid#80d18a4][rid#80e0794/initial] (2) rewrite /foo -> http://my.host:8600/somepath/ 192.168.1.124 - - [16/Feb/2003:12:14:09 -0800] [my.host/sid#80d18a4][rid#80e0794/initial] (2) forcing proxy-throughput with http://my.host:8600/somepath/ 192.168.1.124 - - [16/Feb/2003:12:14:09 -0800] [my.host/sid#80d18a4][rid#80e0794/initial] (1) go-ahead with proxy request proxy:http://my.host:8600/somepath/ [OK]
For some reason the parenthesis are not capturing and $1 contains an empty string. The parenthesis HAD to match because otherwise the rule ("A '/' followed by at least one character") would have failed and I would not have gotten these log messages. What am I missing here?
Thanks,
-- Garth Winter Webb <garth@perijove.com>
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org
|
| | 2 answer | Add comment |
Friday, 11 May 2007
|
| RFC: Devel::Profiler::Plugins::Template Geoffrey Young 18:13:37 |
| | hi all
I spent some time this week adding hooks for template toolkit into Devel::Profiler. you can find the code here
http://www.modperlcookbook.org/~geoff/modules/experimental/Devel-Profiler-Plugins-Template-0.01.tar.gz
I'm not entirely convinced of the namespace, which is why it's not on CPAN yet. but I'd appreciate it if folks could give it a whirl when they have the chance.
--Geoff
from the docs:
use Devel::Profiler::Plugins::Template; # enable TT hooks use Devel::Profiler; # required
...
much hackery is involved, so it's not guaranteed to work on all platforms, versions of perl, or versions of TT. but if it does work, your C<dprofpp> results will look like this
%Time ExclSec CumulS #Calls sec/call Csec/c Name 3.20 0.048 0.048 1794 0.0000 0.0000 Encode::_utf8_on 1.27 0.019 0.028 2 0.0095 0.0140 TT::PROCESS::get_standard_nav 0.00 0.000 0.000 2 0.0000 0.0000 TT::INCLUDE::layout_2fframe_2fhead_2ett
which corresponds to something like
[% BLOCK get_standard_nav %] ... [% END %]
[% PROCESS get_standard_nav %] [% INCLUDE layout/frame/head.tt %]
note that the TT results are right alongside of your normal perl calls, which I find very convenient.
...
oh, and this probably won't work so well unless you have the current Devel::Profiler code from svn:
http://sourceforge.net/projects/devel-profiler/
but it might.
|
| | Add comment |
Thursday, 10 May 2007
|
| Mod_proxy _balancer and weblogic 8.1 Arun Kumar 06:10:57 |
| | Hi all, We plan to use mod_proxy_balancer in our environment...our backend server is weblogic 8.1 sp2. we currently using apache 2.2 and weblogic..... weblogic 8.1 is not having plugin for apache 2.2 therefore we plan to go for mod_proxy Please let me session stickiness will work in mod_proxy_balancer and weblogic. Regards, Arun
--------------------------------- Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. |
| | 1 answer | Add comment |
Wednesday, 9 May 2007
|
| explaining the dcfg bug (was: What can I do ...) Torsten Foertsch 14:30:52 |
| | Hi Fred,
On Wednesday 09 May 2007 10:42, Fred Moyer wrote:
I have been following this somewhat, but not grokking all of it. Can you write a test that shows the change and its effect? I was poking around that area of the code for the stacked handlers bug so I understand some of it but a test would be really be helpful here. Well, I have thought of that myself but I was not able to produce a simple test case. It is simple to get the memory corrupted (just call $r->push_handlers twice for the same phase) but it's hard to predict when the segfault will occur since it depends completely on your memory mgmt implementation.
But I can explain the bug more thoroughly.
modperl_handler_lookup_handlers is declared this way:
MpAV **modperl_handler_lookup_handlers(modperl_config_dir_t *dcfg, modperl_config_srv_t *scfg, modperl_config_req_t *rcfg, apr_pool_t *p, int type, int idx, modperl_handler_action_e action, const char **desc)
It is called at startup to configure handlers in server/per_dir config and at request time to configure handlers in request config.
At startup when there is no request it is called with rcfg==0. p is in this case a longer living pool.
At request time it is passed rcfg!=0 and the request pool in p.
The function initializes avp=0 and ravp=0.
Then it says
avp = &dcfg->handlers_per_dir[idx]; if (rcfg) { ravp = &rcfg->handlers_per_dir[idx]; }
(The scfg->handlers_per_srv case is similar)
So, avp now points to an array element inside dcfg while ravp at request time points to an array element inside rcfg. At startup it remains 0.
Later the function ensures that avp!=0 and then does this
if (ravp && !*ravp) { if (*avp) { /* merge with existing configured handlers */ *ravp = apr_array_copy(p, *avp); } else { /* no request handlers have been previously pushed or set */ *ravp = modperl_handler_array_new(p); } } else if (!*avp) { /* directly modify the configuration at startup time */ *avp = modperl_handler_array_new(p); }
The arrays dcfg->handlers_per_dir and rcfg->handlers_per_dir are initially set to all NULL pointers. If an element is 0 it means there is no handler set for this phase. Otherwise it points to an apr_array.
So, at startup time we have to make sure that *avp points to an apr_array and return that while at request time *ravp should point to an apr_array and that should be returned.
Let's first look what happens at startup. rcfg==NULL and hence ravp==NULL. The "else if" checks whether the appropriate element of dcfg is already initialized. If not it is assigned an empty apr_array. Here the program works correct.
Now at request time. rcfg!=NULL and hence ravp!=NULL. *ravp may be NULL if there is no handler set yet.
The "if (ravp && !*ravp)" works correct if *ravp is NULL. In this case (the first time $r->push_handlers is called) *ravp gets initialized.
But if the code is run a second time the if condition is false because *ravp is already set. In this case we must do nothing but simply return ravp.
So we hit the else if branch. If now *avp is NULL we initialize it. And this is wrong. To cite from Nick Kew book:
When processing a request, use the fields of the request_rec - in particular, the request pool and the request configuration vector. Treat everything else as read-only.
In our case we modify a structure which is valid until server shutdown and write there a pointer that is allocated from the request pool since p in
*avp = modperl_handler_array_new(p);
is the request pool.
So how can it be that *avp is NULL at request time? That simply means there has been no handler configured at startup time.
What possible solutions are there? Let's have a look at the code for the other
case MP_HANDLER_ACTION_SET:
Here it says
if (ravp) { } else if (*avp) { } else { }
This is correct because no else branch is entered if ravp!=NULL.
For the ACTION_PUSH case we can do it the same way:
if (ravp) { if( !*ravp ) { if (*avp) { /* merge with existing configured handlers */ *ravp = apr_array_copy(p, *avp); } else { /* no request handlers have been previously pushed or set */ *ravp = modperl_handler_array_new(p); } } } else if (!*avp) { /* directly modify the configuration at startup time */ *avp = modperl_handler_array_new(p); }
or the way the original patch did:
if (ravp && !*ravp) { } else if (ravp) { /* ravp is already initialized: do nothing */ } else if (!*avp) { }
So the bug reduces to
if (a) { if (b) { } } else if (c) { }
not being the same as
if (a && b) { } else if (c) { }
Hope that helps, Torsten
|
| | Add comment |
Saturday, 5 May 2007
|
| Can apache 2.0.52 impact a Subversion lock-file command? Ted Trahan 23:50:36 |
| | I am using Subversion and accessing it through Apache (http protocol). Both Subversion and Apache are running on a Red Hat Enterprise Linux server. TortoiseSVN is the Subversion client running on Windows XP.
We have the following revisions: RHEL 4WS Httpd 2.0.52 Subversion 1.3.2 TortoiseSVN 1.3.5
Problem: I am able to read and write to the project in the repository. However, executing a file-lock command returns "Error: Lock request failed: 405 Method Not Allowed (http://mydomain)".
My understanding is that failure to lock a file archived in a source code control repository such as Subversion is not the same as the LockFile apache maintains as specified in the LockFile directive. Therefore I don't believe this is related to Apache's ability to access its own LockFile.
The permissions on the server's /home/svn/<repos>/locks directory are the same as other repository directories (conf/, hooks/, etc) which work, so I wouldn't expect this to be a permissions problem.
In a search of the web and list archives, I find two reasons why the lock command might not work: -the feature is not supported by the version of apache -the feature was not available prior to Subversion 1.2.1
I have a more recent version of Subversion, so I don't believe that to be a cause of the problem. Also, I find little in the Apache FAQ regarding file locking in general, let alone file lock problems since this apache release.
I get the same error using both TSVN and (as a sanity check) svn.exe. So I don't think it's a configuration problem specific to the TortoiseSVN client.
Any ideas where else I might look? Any ideas on whether Apache really has an impact on Subversion's file-lock command?
I appreciate any help you can give me.
Thanks, Ted
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org
|
| | Add comment |
Thursday, 3 May 2007
|
| threaded server + scope=handler: modperl_response_handler vs. modperl_response_handler_cgi Torsten Foertsch 15:32:45 |
| | Hi,
in case of a threaded server modperl_response_handler runs this code:
#ifdef USE_ITHREADS interp = modperl_interp_select(r, r->connection, r->server); aTHX = interp->perl; #endif
while modperl_response_handler_cgi runs this:
#ifdef USE_ITHREADS interp = modperl_interp_select(r, r->connection, r->server); aTHX = interp->perl; if (MpInterpPUTBACK(interp)) { rcfg->interp = interp; } #endif
then both call via modperl_response_handler_run and modperl_callback_per_dir modperl_callback_run_handlers which does then:
#ifdef USE_ITHREADS if (r && !c && modperl_interp_scope_connection(scfg)) { c = r->connection; } if (r || c) { interp = modperl_interp_select(r, c, s); aTHX = interp->perl; } else { /* Child{Init,Exit}, OpenLogs */ aTHX = scfg->mip->parent->perl; PERL_SET_CONTEXT(aTHX); } #endif
This means in both cases modperl_interp_select is called twice but for the perl-script case rcfg->interp = interp is set.
modperl_interp_select first looks if rcfg->interp is set and returns it. Only if it's not it looks at other places for an interpreter.
This means a perl-script handler needs 1 interpreter to handle the response phase while a modperl handler needs 2.
I noticed that with "PerlTrace i". I had installed handlers for Trans, MapToStorage, Fixup and Response. 2 interpreters were configured.
With a modperl handler I got this:
After Fixup: modperl_tipool_putback_base: all items idle: interp_pool_dump: listp==0x9467668, interp==0x8277740, requests=3 interp_pool_dump: listp==0xb78f2a0, interp==0xa3385a0, requests=0
"requests=3" means modperl_interp_select was run 3 times, once for Trans, once for MapToStorage and once for Fixup.
After Response: modperl_tipool_putback_base: all items idle: interp_pool_dump: listp==0x9467668, interp==0x8277740, requests=4 interp_pool_dump: listp==0xb78f2a0, interp==0xa3385a0, requests=1
Now it shows requests=4 for the first interpreter but requests=1 for the 2nd. I would have expected requests=4 and requests=0.
After scrutinizing the code I tried a perl-script handler and got this output.
After Fixup: modperl_tipool_putback_base: all items idle: interp_pool_dump: listp==0xc1235e8, interp==0x87ef068, requests=3 interp_pool_dump: listp==0xa5315e8, interp==0xc7ee558, requests=0
After Response: modperl_tipool_putback_base: all items idle: interp_pool_dump: listp==0xc1235e8, interp==0x87ef068, requests=4 interp_pool_dump: listp==0xa5315e8, interp==0xc7ee558, requests=0
This is what I'd have expected.
Torsten
|
| | 1 answer | Add comment |
Wednesday, 2 May 2007
|
| PerlCleanupHandler semantic? Torsten Foertsch 16:47:56 |
| | Hi,
what should the exact semantic of a PerlCleanupHandler be when PerlInterpScope==handler?
I am not asking what it is but what it should be.
A PerlCleanupHandler can be installed in httpd.conf or via $r->add_config or by $r->{push|set}_handlers.
a) all cleanup handlers are called when the request is over. In this case I think the interpreter should stick to the request just like with scope==request.
b) cleanups are called when the interpreter is released. With scope==handler this means cleanups are run just after the first phase that needs an interpreter. Now one can argue that only the cleanups installed by {push|set}_handlers in the same phase are to be called when the interpreter is destroyed but handlers installed via httpd.conf or add_config are to be called when the request is over. Variations on this theme are possible.
Torsten
|
| | 1 answer | Add comment |
Tuesday, 1 May 2007
|
| Interpreter scope Torsten Foertsch 21:16:36 |
| | Hi,
the default interpreter scope is request. That means a certain interpreter is locked during the whole request cycle. I use modperl mostly in the pre-response phases plus sometimes as an output filter. But I use pnotes to pass data between the phases. If I understand it correctly this forbids a handler interpreter scope. Now I'd like to release the interpreter in most cases just before the response phase. So it can be reused by another request while the current request sends its data over a possibly slow network.
Is that reasonable?
Is there something like $r->release_interp_after_this_phase()?
If not what is the right place to start looking/patching? And what pitfalls are there to watch out?
Torsten
|
| | 3 answer | Add comment |
|
| Re: threaded server + scope=handler + PerlCleanupHandler: another similar bug Torsten Foertsch 14:24:10 |
| | On Monday 30 April 2007 22:22, Philippe M. Chiasson wrote:
And that doesn't seem logical at all. In all cases, since the initial int= erpreter is tied up in modperl_response_handler() a new one shouldn't be needed to= dispatch that handler part. I have found similar bug. Try
$r->push_handlers(PerlCleanupHandler=>'some_named_function')
from a TranslationHandler or so.
modperl_interp_unselect calls modperl_config_request_cleanup --> modperl_config_request_cleanup --> modperl_callback_per_dir --> modperl_callback_run_handlers --> modperl_interp_select.
modperl_interp_select then selects another interpreter to do the cleanup.
Then at the end of modperl_callback_run_handlers modperl_interp_unselect is called for the interpreter that did the cleanup. Now the story repeats eating up all interpreters.
When push_handlers is called from a mod_perl response handler the same behavior is seen due to the previous bug, the missing rcfg->interp.
However with a perl-script handler something changes. Now the right interp is found in rcfg->interp. But nevertheless it recurses because modperl_callback_run_handlers calls modperl_interp_unselect while modperl_callback_run_handlers was actually called from modperl_interp_unselect. In the end I got a segfault.
So, I think either modperl_interp_unselect or modperl_config_request_cleanup needs a flag that says "do not recurse". Maybe interp->flags is a good place for a flag that says "in unselect" or so.
Or maybe a cleaner way is to use interp->refcnt. Simply increment it each time modperl_interp_select returns it. For what I can see refcnt isn't used at all by now. Yes, on a second thought that is what I'd prefer.
Thoughts?
Torsten
|
| | Add comment |
Saturday, 28 April 2007
|
| [bug] Apache2::SizeLimit on FreeBSD Jonathan Vanasco 03:54:38 |
| | this is just a reposting from the MP main list, per Philip's request.
The full posting is: From: jvanasco@2xlp.com Subject: bug(s) in FreeBSD Apache2::SizeLimit ? Date: March 30, 2007 1:44:21 PM EDT To: modperl@perl.apache.org
using Apache2::SizeLimit on bsd raises an error for 'bsd_size_check' not being a valid function.
The error is from a typo -- "&bsd_size_check;" is called, but "_bsd_size_check" is defined.
renaming the function resolves this specific issue.
===== $HOW_BIG_IS_IT = \&bsd_size_check; == snip == # rss is in KB but ixrss is in BYTES. # This is true on at least FreeBSD, OpenBSD, NetBSD # Philip M. Gollucci sub _bsd_size_check { my @results = BSD::Resource::getrusage(); my $max_rss = $results[2]; my $max_ixrss = int ( $results[3] / 1024 ); return ( $max_rss, $max_ixrss ); } =====
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | SyndiClick.com | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | FindMeOn.com - The cure for Multiple Web Personality Disorder | Web Identity Management and 3D Social Networking | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | RoadSound.com - Tools For Bands, Stuff For Fans | Collaborative Online Management And Syndication Tools | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| | 1 answer | Add comment |
Friday, 27 April 2007
|
| Re: Logging With Mod Perl 2.0 Torsten Foertsch 13:00:01 |
| | On Thursday 26 April 2007 21:10, Tyler Bird wrote:
But I was wondering isn't there anything I can do to mod_perl that will allow a plain warn to send it to my virtualhosts log and not my servers log. without using the $r->warn() syntax The problem is you need a $r object for that. In MP1 there was a global one. In MP2 there is not.
Your problem can possibly be solved by using PerlOptions +GlobalRequest plus modifying the warn function by either setting $SIG{__WARN__} or *CORE::GLOBAL::warn=sub{...}
*CORE::GLOBAL::warn=sub { (Apache2::RequestUtil->request || Apache2::ServerUtil->server)->warn(@_); }
Torsten
|
| | Add comment |
Thursday, 26 April 2007
|
| Re: MP 2.0.3 & Apache 2.2.3 -> auth tests fail Geoffrey Young 22:23:43 |
| | Back to 2.2.4 - MP2.0.3 worked with one alteration. It seems that > ap_get_server_version is not only depreciated, but also changed > functionality. That is... one test fails because it calls > get_server_version, expects "Apache 2.2.4 (Unix)" but gets "Apache > 2.2.4". ugh. I guess we haven't been paying attention. the relevant changes are these:
Changes with Apache 2.2.4
*) The full server version information is now included in the error log at startup as well as server status reports, irrespective of the setting of the ServerTokens directive. ap_get_server_version() is now deprecated, and is replaced by ap_get_server_banner() and ap_get_server_description(). [Jeff Trawick]
Changes with Apache 2.3.0
*) ap_get_server_version() has been removed. Third-party modules must now use ap_get_server_banner() or ap_get_server_description(). [Jeff Trawick]
so we'll need to address these.
fwiw, there are lots of changes in 2.2.0 and above that simplay haven't been incorporated into mod_perl yet, simply for lack of developer tuits. so, help/patches in this respect most welcome. come on and join dev@perl.a.o if you're interested
This can be solved by applying the following patch: But note that this is not a backwards compatible patch. yeah, we can't bork back compat. but there is a way to maintain compat between moving APIs via modperl_apache_compat.c. right now that file is empty, but you can see what entries would look like by peeking at old versions in svn.
I suspect what we'd want would be to hack the map to
o add ap_get_server_banner and ap_get_server_description to the apache function map and mark them both as mod_perl implemented
o add code to modperl_apache_compat.(c|h) to implement stubs for those routines if not currently defined, or callback to them if defined
o mark ap_get_server_version as mod_perl implemented
o add a stub for ap_get_server_version if not defined with a warning that the function is deprecated (else issue the callback)
we did a similar workaround for something else, but I forget what it was. svn history will know, however.
--Geoff
|
| | 5 answers | Add comment |
|
| [OT] Is anyone running Apache on Windows Vista? Steve Hay 14:50:11 |
| | Apologies for a slightly off-topic question, but I've had no response to an ASF Bugzilla bug report or a question on users@httpd.apache.org
http://issues.apache.org/bugzilla/show_bug.cgi?id=41611 http://marc.info/?l=apache-httpd-users&m=117706082102936&w=2
so I thought I'd try my luck here.
In short, I can't get Apache httpd running as a service on Windows Vista (with or without mod_perl), and I'm wondering if others have experienced the same problem and know how to fix it.
Apache 1.x httpd runs fine in a command prompt (rather than as a service), so I'm positive it isn't a configuration issue, at least as far as httpd is concerned.
--
|
| | Add comment |
Tuesday, 24 April 2007
|
| [RELEASE CANDIDATE] mod_perl-1.30 RC1 Philippe M. Chiasson 23:49:17 |
| | The mod_perl 1.30 release candidate #1 has arrived. It can be downloaded here:
http://www.apache.org/~gozer/mp1/mod_perl-1.30-rc1.tar.gz
MD5 : 639e045d782a667111146a70b7948dfa SHA1: 942eaffe4570a9060b3a0ed7de52ac902d054cbb
The summary of what has changed since 1.29 are (from Changes):
SECURITY: CVE-2007-1349 (cve.mitre.org) fix unescaped variable interpolation in Apache::PerlRun regular expression to prevent regex engine tampering. reported by Alex Solovey [Randal L. Schwartz <merlyn@stonehenge.com>, Fred Moyer <fred@redhotpenguin.com>]
Pull in the new Apache-SizeLimit from http://svn.apache.org/repos/asf/perl/Apache-SizeLimit/trunk and obsolete the previous lib/Apache/SizeLimit.pm. [Philip M. Gollucci]
Fix an Apache::(Registry|PerlRun) bug caused by special characters in the url [kolya@mail.ru]
Display a more verbose message if Apache.pm can't be loaded [Geoffrey Young]
Fix incorrect win32 detection in Apache::SizeLimit reported by Matt Phillips <mphillips@virage.com> [Philippe M. Chiasson]
The print-a-scalar-reference feature is now deprecated and documented as such [Stas]
fix "PerlSetVar Foo 0" so that $r->dir_config('Foo') returns 0, not undef [Geoffrey Young]
for some reason .pm files during the modperl build see $ENV{PERL5LIB} set in Makefile.PL, which is used for generating Makefiles, as "PERL5LIB=/path:/another/path" instead of "/path:/another/path" essentially rendering this env var useless. I'm not sure why, may be MakeMaker kicks in somewhere. Trying to workaround by s/PERL5LIB/PERL5LIB_ENV/, using anything that's not PERL5LIB. [Stas]
change $INC{$key} = undef; to delete $INC{$key}; in PerlFreshRestart [Geoffrey Young]
Fix a bug in Makefile.PL for Win32 where it would, in certain cases, pick up the wrong Perl include directory [Steve Hay]
------------------------------------------------------------------------ Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
|
| | 14 answers | Add comment |
|
| [Fwd: foundation: r10592 - in /foundation/officers: cclas.txt grants.txt] Geoffrey Young 23:49:17 |
| | it seems the Apache::Reload grant has been recorded by the ASF secretary. when I find the time I'll notify incubator, or figure out the next step so we can import the code.
--Geoff
-------- Original Message -------- Subject: foundation: r10592 - in /foundation/officers: cclas.txt grants.txt Date: Mon, 26 Mar 2007 14:15:06 -0000 From: jim@apache.org Reply-To: members@apache.org To: foundation-cvs@apache.org
Author: jim Date: Mon Mar 26 07:15:04 2007 New Revision: 10592
Log: Add in:
CCLA for Tomad R Grant for RDFStore Grant for Apache::Reload
|
| | 13 answers | Add comment |
|
| [Fwd: Call for Papers Opens for ApacheCon US 2007] Philip M. Gollucci 05:25:14 |
| | -- ------------------------------------------------------------------------ Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF
Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching.
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org |
| | 4 answer | Add comment |
Monday, 23 April 2007
|
| COND_WAIT in modperl_tipool Torsten Foertsch 08:59:41 |
| | Hi,
is there a reason not to use APR mutex and condition variables in the tipool implementation but instead Perl's COND_... and MUTEX_... macros?
The reason I am asking is that after some heavy load generated with ab over a GBit link I have seen request timeouts and what is worse apache processes hanging around not accepting connections. Then I patched mod_perl/mod_status to report the waiting in COND_WAIT via the scoreboard and saw there were some requests hanging in this state after all traffic has been finished.
The really bad thing about that is that the hanging process is alive for the master apache. So, it's share of the scoreboard is blocked and MaxClients is practically lowered by ThreadsPerChild.
I have then changed the tipool implementation to use apr_thread_cond_timedwait with a timeout of 0.5 sec instead of COND_WAIT. The problem seems gone.
I know the problem lies probably not in mod_perl but in the pthread lib on my Linux (NPTL 2.5). But maybe it is saver programming not to wait forever. The more as it is not determined in what order threads are awakened by a pthread_cond_signal.
Normally when a worker apache waits for requests it has one thread waiting in ap_mpm_pod_check, one in apr_pollset_poll and a lot of other threads waiting somewhere else (see thread 3 below). When a process hangs in the state I have described the first 2 threads are missing. I guess it has reached its MaxRequestsPerChild and is about to exit but cannot finish all threads.
(gdb) btt 1 [Switching to thread 1 (Thread -1214036288 (LWP 17042))]#0 0xb7f08410 in ?? () #0 0xb7f08410 in ?? () #1 0xbfc8beb8 in ?? () #2 0x00000001 in ?? () #3 0xbfc8beb3 in ?? () #4 0xb7d2302b in __read_nocancel () from /lib/libpthread.so.0 #5 0x08092d59 in ap_mpm_pod_check (pod=0x8717ad8) at pod.c:54 #6 0x08090748 in child_main (child_num_arg=0) at worker.c:1258 #7 0x080908f4 in make_child (s=0x80b7f48, slot=0) at worker.c:1341 #8 0x08090e08 in perform_idle_server_maintenance () at worker.c:1543 #9 0x08091038 in server_main_loop (remaining_children_to_start=0) at worker.c:1646 #10 0x0809139e in ap_mpm_run (_pconf=0x80b60a8, plog=0x80e4160, s=0x80b7f48) at worker.c:1748 #11 0x08062b7e in main (argc=3, argv=0xbfc8c294) at main.c:717 (gdb) btt 2 [Switching to thread 2 (Thread 1388235664 (LWP 17244))]#0 0xb7f08410 in ?? () #0 0xb7f08410 in ?? () #1 0x52bec318 in ?? () #2 0x00000004 in ?? () #3 0x08f81ea0 in ?? () #4 0xb7ca49f6 in __epoll_wait_nocancel () from /lib/libc.so.6 #5 0xb7d89fc4 in apr_pollset_poll (pollset=0x8f81e68, timeout=-1, num=0x52bec35c, descriptors=0x52bec358) at poll/unix/epoll.c:239 #6 0x0808f633 in listener_thread (thd=0x8f289e8, dummy=0x8bf7fa0) at worker.c:687 #7 0xb7d8dbc8 in dummy_worker (opaque=0x8f289e8) at threadproc/unix/thread.c:138 #8 0xb7d1c112 in start_thread () from /lib/libpthread.so.0 #9 0xb7ca42ee in clone () from /lib/libc.so.6 (gdb) btt 3 [Switching to thread 3 (Thread 1396628368 (LWP 17243))]#0 0xb7f08410 in ?? () #0 0xb7f08410 in ?? () #1 0x533ed318 in ?? () #2 0x000000c8 in ?? () #3 0x00000000 in ?? ()
Torsten
|
| | 1 answer | Add comment |
Sunday, 22 April 2007
|
| Apache module can't create new thread on RedHat 8 Jessica Wei 21:18:45 |
| | hi, there
We have an own Apache module which works fine with Apach 1.3.27 on Linux for years. This week I update the RedHat 7.2 to RedHat 8 and reinstall the Apache server, it suddenly doesn't work. When Apache starst up, it loads this module and trys do some initialization. When the module want's create a new thread using "pthread_create()", it is stuck there and never goes further.
I'm a newbie for Apache module and RedHat, so the problem may be apprently and shameful. Could someone help he?
Jessica |
| | Add comment |
Wednesday, 18 April 2007
|
| A-SL, mp1, mp2 Philip M. Gollucci 04:48:49 |
| | Hi,
Does anyone have any objections to me moving /trunk-unstable back to trunk for Apache-SizeLimit and re-integrating to mp1.
Also, I think there were 2-3 patches to mp1 code base that need applying/reviewing.
-- ------------------------------------------------------------------------ Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF
Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching.
|
| | 3 answer | Add comment |
Tuesday, 10 April 2007
|
| A Study on Free/Open Source Software Defect Management Anu Gupta DCSA 10:07:17 |
| | Dear Perl Contributors,
I am really thankful to Free/Open Source Software development community for their overwhelming response to the survey on practices and problems of defect management in Free/Open Source Software projects.
If you have not participated ealier, you may spend a few minutes now too.
The Online Questionnaire is available at:
http://anu.puchd.ac.in/phpESP/public/survey.php?name=FOSS_Defect_Survey
I hope you have found all the questions interesting and thought-provoking. Your answers will be kept anonymous.The data thus collected will only be used for research purpose. The insights gained from the study can further help us to extract publicly accessible defect data and determine impact of defect management practices on software quality. The results of study will soon be communicated to you.
Thank You
With regards,
Anu Gupta Senior Lecturer Department of Computer Science and Applications, Panjab University, Chandigarh. INDIA
In case of any problem in accessing/using the above mentioned link please contact: E-mail: anugupta@pu.ac.in anugupta98@gmail.com
|
| | Add comment |
Friday, 30 March 2007
|
| [ANNOUNCE] Apache-SizeLimit 0.91 Philippe M. Chiasson 09:43:21 |
| | This release is a minor release of Apache-SizeLimit, with one small bugfix. The main reason this release is coming out is to make the upcoming mod_perl-1.30 release possible. Enjoy.
file: $CPAN/authors/id/G/GO/GOZER/Apache-SizeLimit-0.91.tar.gz size: 15957 bytes md5: 5320549cca8fe8241a7ec0de8293ac75
=item 0.91 2007-03-29
Fix Can't call method "child_terminate" on an undefined value By add_cleanup_handler() pass $r to _exit_if_to_big() via shift [David Wheeler <david@kineticode.com>]
------------------------------------------------------------------------ Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
|
| | Add comment |
Thursday, 29 March 2007
|
| [RELEASE CANDIDATE] mod_perl-1.30 RC2 (and Apache-SizeLimit 0.91-RC3) Philippe M. Chiasson 21:45:23 |
| | This release is basically exactly the same as RC1 with the exception that it includes Apache-SizeLimit RC3 (both to be released simultaneously once the RCs are golden)
Grab them here: http://people.apache.org/~gozer/mp1/mod_perl-1.30-rc2.tar.gz http://people.apache.org/~gozer/mp1/Apache2-SizeLimit-0.91-rc3.tar.gz
------------------------------------------------------------------------ Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
|
| | 7 answers | Add comment |
Wednesday, 28 March 2007
|
| [RELEASE CANDIDATE] Apache-SizeLimit 0.91 RC4 Philippe M. Chiasson 08:47:51 |
| | This release should be the final RC, the same as what would ship in the latest mod_perl 1.30 RC2.
http://people.apache.org/~gozer/mp1/Apache-SizeLimit-0.91-rc4.tar.gz
Changes since 0.9 :
*********** HEADS UP - SHARED CODE BASE - HEADS UP *********** Apache-SizeLimit has been hybridized. It has been split into 3 packages. 1) Apache::SizeLimit - User API for httpd 1.3.x / mod_perl 1.x 2) Apache2::SizeLimit - User API for httpd 2.x / mod_perl 2.x
3) Apache::SizeLimit::Core - Interal Shared Functionality _NEVER_ use this module directly. [Philip M. Gollucci <pgollucci@p6m7g8.com>]
Skip tests on OS X (darwin) due to broken getrusage(3) [Fred Moyer <fred@redhotpenguin.com>, Philip M. Gollucci <pgollucci@p6m7g8.com>]
Fix Can't call method "child_terminate" on an undefined value By add_cleanup_handler() pass $r to _exit_if_to_big() via shift [David Wheeler <david@kineticode.com>]
Added a SUPPORT section to the docs. [Dave Rolsky <autarch@urth.org>]
------------------------------------------------------------------------ Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
|
| | 3 answer | Add comment |
|
| HTTP 302 - cannot access web page from internal network Denise Mangano 07:46:54 |
| | Afternoon all. I have a pretty big problem and could really use some help. I've scoured search engines and archives, and message boards for Linux and networking... But have come up pretty empty handed.
This is my server environment... RedHat Linux 9.0, Apache 1.3.9, Tomcat 4.1.30. My server is on a separate DMZ from our internal network. IP scheme of DMZ is 10.10.X.X, internal network is 192.168.X.X.
My web pages are completely accessible and functional ... To the outside world. However when I try to access the web pages from our internal network I cannot pull up the pages by either IP or domain name. According to our network guys internal requests for my web pages go directly to the 10.10.X.X address instead of going out to the internet and in through the firewall. When I try by domain name nothing appears in my access_log. When I try by IP address an entry appears in my access_log indicated an HTTP 302. Nothing shows up in my error_log - not even when I turn the LogLevel to debug.
When I telnet to port 80 on my web server I get the following output:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>302 Found</TITLE> </HEAD><BODY> <H1>Found</H1> The document has moved <A HREF=3D"http://www.mywebsite.com">here</A>.<P> <HR> <ADDRESS>Apache/1.3.29 Server at www Port 80</ADDRESS> </BODY></HTML>
But this is not displayed to me in a browser when I try it that way. I have ruled out RedHat as the culprit, and my network guy swears the firewall config is right and nothing on the network end is blocking this traffic.... Leaving Apache. The only time I use Redirects at all is for the following:
# The first VirtualHost section is used for requests without a known server name (will handle all other domains that were registered)
<VirtualHost *> DocumentRoot "/usr/local/apache/htdocs" <Directory "/usr/local/apache/htdocs"> Options -Indexes FollowSymLinks MultiViews Includes AllowOverride None Order allow,deny Allow from all </Directory> Redirect /index.html http://www.mywebsite.com
#Add a redirect in for each client so all requests from incorrect domains still get routed Redirect /demo http://www.mywebsite.com/demo Redirect /test http://www.mywebsite.com/test
</VirtualHost>
The purpose of this Virtual host is to make sure that all requests end up on www.mywebsite.com because that is the domain our SSL certificate is issued to. We own 5 other domains that are close to our domain name so this way if www.mywebsites.com is typed in my server automatically redirects it to www.mywebsite.com
Please help While this is not mission critical it does make troubleshooting difficult and I can't roll out my changes to my web app without being able to access it from inside to make sure everything rolls out ok.
Thanks!
Denise Mangano Complus Data Innovations, Inc. 914-747-1200
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org
|
| | 5 answers | Add comment |
Tuesday, 27 March 2007
|
| Re: svn commit: r522672 - /perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm Philip M. Gollucci 22:19:30 |
| | gozer@apache.org wrote:
Author: gozer Date: Mon Mar 26 17:14:13 2007 New Revision: 522672 Log: undo change 522670 You meant 522671, I'll propedit the log message.
-- ------------------------------------------------------------------------ Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF
Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching.
|
| | 1 answer | Add comment |
|