Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jjohn (22)

jjohn
  (email not shown publicly)
http://taskboy.com/
AOL IM: taskboy3000 (Add Buddy, Send Message)

Perl hack/Linux buff/OSS junkie.

Journal of jjohn (22)

Friday October 19, 2001
10:56 PM

A tragedy of Expats (again)

[ #1032 ]

Taskboy.com and Pudge.net are on the same server. This machine has an unusually apache set up: one apache server answers on port 80 and uses name-based virtual servers to handle Taskboy and Pudge.net. The virtual server conf actually palms the requests off to another apache process (configured with mod_perl) running on local host. Responses are then proxied back through the first apache process. Sound confusing? It is. Now, let's throw XML-RPC into the mix.

mod_perl, Apache and XML::Parser don't mix without special care. Why? Because XML::Parser and Apache each have their own expat libraries. Since mod_perl jams these two things into the same process space, seg faults happen whenever a mod_perl script (like an XML-RPC client) tries to use XML::Parser.

The solution is to compile Apache without expat, which isn't hard.

The server config mentioned above made this problem really obscure. I was getting 502 proxy errors from the server on port 80. This was bugging me out until I check its error_log and noticed the seg faulting children. Then it clicked.

I'll resolve this problem tomorrow (there are also two versions of Perl on the system, so I need to be awake when compiling).

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Don't forget that perl 5.6.1 is /usr/bin/perl6 ... :-)
    • /usr/bin/perl is 5.004x; /usr/local/bin/perl is 5.6.1. This led to a fun round of "what the hell isn't the module I just installed showing up?!"
  • Apache 1.3.22 fixes this long standing bug, as long as you have the DSO libexpat installed before you compile Apache, and also use XML::Parser 2.30.