Mailing List Archive

[mod_backhand-users] childs die (segmentation violation)
Hi,

I start experimenting mod_backhand on Linux (Mandrake 7.2). I recompiled
my apache (apache_1.3.19) with mod_backhand.
I started tetsing with a minimal config (I did not even attempt to use
Backhand directive on any Directory, I only load the backhand module).

Well, as soon as I use it, childs get killed. Here is my httpd-perl log:

[Wed May 30 15:29:46 2001] [notice] Apache/1.3.19 (Unix) mod_macro/1.1.1
mod_perl/1.25 configured -- resuming normal operations
[Wed May 30 15:33:57 2001] [notice] caught SIGTERM, shutting down
[Wed May 30 15:34:04 2001] [notice] mod_backhand -- UnixSocketDir set to
/home/httpd/server/httpd_perl/backhand
[Wed May 30 15:34:04 2001] [notice] mod_backhand -- Multicast
225.220.221.20:4445 TTL[1] added
[Wed May 30 15:34:04 2001] [notice] mod_backhand -- Multicast accept
128.220.221.0/24
[Wed May 30 15:34:04 2001] [notice] backhand_init(15097) spawning
moderator (PID 15098)
[Wed May 30 15:34:04 2001] [notice] mod_backhand moderator ready to go
[Wed May 30 15:34:04 2001] [notice] Apache/1.3.19 (Unix)
balanced_by_mod_backhand/1.1.1pre4 mod_macro/1.1.1 mod_perl/1.25
configured -- resuming normal operations

and when I perform some requests, I have

[Wed May 30 15:34:11 2001] [notice] child pid 15099 exit signal
Segmentation fault (11)


(I have light httpd_docs front end and heavy httpd-perl back-ends. Only
httpd-perl craches with mod_backhand).

any help/hints for debugging welcome,


Dimi


_____________________________
Dimitri Tombroff
Dimitri.Tombroff@jazzvalley.com
http://www.jazzvalley.com
[mod_backhand-users] childs die (segmentation violation) [ In reply to ]
On Wednesday, May 30, 2001, at 09:56 AM, Dimitri Tombroff wrote:
> [Wed May 30 15:34:04 2001] [notice] mod_backhand -- UnixSocketDir set to
> /home/httpd/server/httpd_perl/backhand
> [Wed May 30 15:34:04 2001] [notice] mod_backhand -- Multicast
> 225.220.221.20:4445 TTL[1] added
> [Wed May 30 15:34:04 2001] [notice] mod_backhand -- Multicast accept
> 128.220.221.0/24

Unless you are running tests on our network here at Hopkins, this IP
block is wrong. You want to put your IP space here. The AcceptStats
line needs to indicate which networks you trust. 225.220.221.20 is a
valid multicast address anywhere, so that should work fine.

> [Wed May 30 15:34:04 2001] [notice] backhand_init(15097) spawning
> moderator (PID 15098)
> [Wed May 30 15:34:04 2001] [notice] mod_backhand moderator ready to go
> [Wed May 30 15:34:11 2001] [notice] child pid 15099 exit signal
> Segmentation fault (11)

I agree that this is not an ideal result :-) If you do not have a
Backhand directive, the mod_backhand handler code shouldn't be run.
That is very strange indeed.

You need to be running mod_backhand on the light-weight instance, not on
the mod_perl instance. It doesn't make any sense to run it on the
mod_perl instance as the request has already been assigned.

You should run mod_backhand on the light-weight instance and spoof as
the backend instance. mod_backhand wasn't originally designed to handle
proxying to the local machine, but it should work fine. The following
lines are important:

# Multicast your statistics, but advertise yourself as 127.0.0.1
MulticastStats 127.0.0.1 225.220.221.20:4445,1
# Use HTTP proxying even when the local machine is
# found to be the best, because the "local machine" is actually
# the mod_perl instance.
BackhandSelfRedirect On

Check out the ApacheCon2001 (April) course notes on www.backhand.org for
more details about the HTTP accelerator configuration.

--
Theo Schlossnagle
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7
[mod_backhand-users] childs die (segmentation violation) [ In reply to ]
Theo Schlossnagle wrote:
>
> On Wednesday, May 30, 2001, at 09:56 AM, Dimitri Tombroff wrote:
> > [Wed May 30 15:34:04 2001] [notice] mod_backhand -- UnixSocketDir set to
> > /home/httpd/server/httpd_perl/backhand
> > [Wed May 30 15:34:04 2001] [notice] mod_backhand -- Multicast
> > 225.220.221.20:4445 TTL[1] added
> > [Wed May 30 15:34:04 2001] [notice] mod_backhand -- Multicast accept
> > 128.220.221.0/24
>
> Unless you are running tests on our network here at Hopkins, this IP
> block is wrong. You want to put your IP space here. The AcceptStats
> line needs to indicate which networks you trust. 225.220.221.20 is a
> valid multicast address anywhere, so that should work fine.
>

Indeed, I did not plan to join your multicast group .. :). In fact, I
got that segv when doing my very first try with mod_backhand,
copying/pasting configuration directives from the sample. Thas's why my
config is, hem, strange.

> > [Wed May 30 15:34:04 2001] [notice] backhand_init(15097) spawning
> > moderator (PID 15098)
> > [Wed May 30 15:34:04 2001] [notice] mod_backhand moderator ready to go
> > [Wed May 30 15:34:11 2001] [notice] child pid 15099 exit signal
> > Segmentation fault (11)
>
> I agree that this is not an ideal result :-) If you do not have a
> Backhand directive, the mod_backhand handler code shouldn't be run.
> That is very strange indeed.
>

Well we have had little time today for that problem, we could at least
catch the segv in httpd-docs with gdb: most probably a byCPU wrong
parameters.

Program received signal SIGSEGV, Segmentation fault.
0x401a757b in byCPU () from /home/httpd/server/bin/mod_backhand.so
(gdb) where
#0 0x401a757b in byCPU () from /home/httpd/server/bin/mod_backhand.so
#1 0x4019f9d3 in makedecision () from
/home/httpd/server/bin/mod_backhand.so
#2 0x401a2538 in backhand_type_checker () from
/home/httpd/server/bin/mod_backhand.so
#3 0x8078f87 in ap_cleanup_method_ptrs ()
#4 0x807903e in ap_find_types ()
#5 0x808cf11 in ap_sub_req_method_uri ()
#6 0x808cf6f in ap_sub_req_lookup_uri ()
#7 0x401a1fd6 in backhand_post_read_request () from
/home/httpd/server/bin/mod_backhand.so
#8 0x8078f87 in ap_cleanup_method_ptrs ()
#9 0x80790de in ap_run_post_read_request ()
#10 0x808851c in ap_read_request ()
#11 0x8084e0e in ap_child_terminate ()
#12 0x80850d8 in ap_child_terminate ()
#13 0x808518c in ap_child_terminate ()
#14 0x80857fc in ap_child_terminate ()
#15 0x808602c in main ()
#16 0x400cbcbe in __libc_start_main () from
/lib/libc.so.6

We got and compiled the latest mod_backhand this morning, will try that
asap and keep debugging.

> ...
> Check out the ApacheCon2001 (April) course notes on www.backhand.org for
> more details about the HTTP accelerator configuration.
>

I will, thanks Theo for the infos and for the quick reply,

Dimi
> --
> Theo Schlossnagle
> 1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
> 2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7
>
> _______________________________________________
> backhand-users mailing list
> backhand-users@lists.backhand.org
> http://lists.backhand.org/mailman/listinfo/backhand-users