Re: After upgrade to 6.5: Weird Apache2 perl_module behavior

2019-06-19 Thread Harald Klimach
Hi Sam,

> Bug report here: https://bz.apache.org/bugzilla/show_bug.cgi?id=63516
Great! Thanks a lot for tracking this down and the suggested patch in that 
ticket.
I’ll give that a try.

Best,
Harald



After upgrade to 6.5: Weird Apache2 perl_module behavior

2019-04-25 Thread Harald Klimach
Hi there,

I’ve upgraded to 6.5 and now run into some trouble with Apache2.
I am using Redmine and some Perl script from them for access
limitation to some parts.
I am also using the dav_svn_module and the authz_svn_module.

After the upgrade I now get segmentation faults when running
httpd2. It looks like this is coming from the apache2/mod_perl.so.
But somehow there seems to be an interrelation with the dav_svn
module. After the Redmine module failed for some reason, and
I deactivate it, it still runs into segmentation faults until I deactivate
the svn modules and run apache with that configuration.
After it ran once without those modules I can activate them again
and start apache without running into a segmentation fault.
Maybe it is totally unrelated, and the segmentation faults only
happen by chance.
I don’t really know how to proceed to figure out the problem.
The segfault signal gets in ktrace reported like this:

92855 httpd2   PSIG  SIGSEGV SIG_DFL code SEGV_MAPERR<1> addr=0x35331a76028 
trapno=6

The backtrace from the core file states:
#0  strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:59
#1  0x0350daf0dcfd in ap_array_str_contains () from /usr/local/sbin/httpd2
#2  0x0350daf01341 in ap_read_config () from /usr/local/sbin/httpd2
#3  0x0350daefbc16 in main () from /usr/local/sbin/httpd2

I am struggeling to get this down to something reproducible, but it eludes.
It looks like I can provoke the segmentation fault with the Redmine.pm script
(http://www.redmine.org/projects/redmine/repository/entry/trunk/extra/svn/Redmine.pm)
but after commenting it out, the failure persists as long as the perl_module is
loaded by Apache. As written above, I need to run the Apache without the svn
Modules, and afterwards it seems to work again.

Is there some caching involved for the perl modules?

This is with the mpm_prefork, when I run apache in debug (-X), I can avoid the
segmentation fault with Redmine.pm if I deactivate the svn modules.

How can I go about figuring out what is going wrong here?

Thanks!
Harald



Re: Relayd, how to relay-to based on path

2015-01-04 Thread Harald Klimach
Hey,

thanks a lot for your kind reply, and sorry for this late answer.

 In the Paper Recent work in OpenBSD relayd from 2013 there is an
 example with: match request path /images relay-to 10.1.1.1
 Basically I need that and a second statement with
 match request path /app relay-to 10.1.1.2

 on case this was not answered yet:
 
 Use the following in your protocols section:
 
match request path /some/path/** forward to extratable
 
 You need something like
 
forward to extratable port www mode roundrobin \
check http / code 200 timeout 1000
 
 in your relay section as well.


This is great, it seems to work like a charm! My configuration now has two 
tables
defined rails and apache. In the protocols section, I have then

match request path /collab/** forward to rails
match request path /svn/** forward to apache
match request path /hg/** forward to apache

and in the relay section I got:

forward to apache port 
forward to rails port 8000

That was a nice holiday present, thank you!
Harald



Relayd, how to relay-to based on path

2014-11-30 Thread Harald Klimach
Hello,
I am trying to substitute a nginx proxy by relayd and would like to
forward connections to different backends, based on the path in the
request.
In the Paper Recent work in OpenBSD relayd from 2013 there is an
example with: match request path /images relay-to 10.1.1.1
Basically I need that and a second statement with
match request path /app relay-to 10.1.1.2
But, the relay-to option apparently is gone by now, and the filter
need to be put into the protocol section. I tried to use to relays
with the same listen on statement, but this results only in the
second one overwriting the first one. Is it still possible with the
new syntax to achieve conditional relays to different servers based
on the request path? If so, how? I think, I somehow need to get
some information from the protocol section into the relay to base the
forward to decision on, but I have no clue how to achieve that.

Thanks a lot for any pointers!
Harald