trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Wieland <jwiel...@gmail.com>
Subject help with ats plugins: logging, segfaults and malformed content
Date Fri, 16 Jul 2010 00:31:41 GMT
Hello group,  I'm running an up to date (Revision: 964088) of ATS on 64bit
ubuntu using the official ec2 images as a forward proxy.

I'm now attempting to write a plugin that will inject a line of html into
the body of the response content for every request the proxy serves.  ATS is
supplied with a bunch of example plugins that give me a great starting point
but I'm having a couple problems.

1. I can't seem to get the ' INKDebug("debug-hello", "Hello World!\n");' as
log by the hello.so plugin into either stdout or into syslog.  I added the
following options to records.config, but still no log messages

CONFIG proxy.config.diags.output.diag SE
CONFIG proxy.config.diags.output.debug SE
CONFIG proxy.config.diags.output.status SE
CONFIG proxy.config.diags.output.note SE
CONFIG proxy.config.diags.output.warning SE
CONFIG proxy.config.diags.output.error SE
CONFIG proxy.config.diags.output.fatal SE
CONFIG proxy.config.diags.output.alert SE
CONFIG proxy.config.diags.output.emergency SE


2. I compiled and successfully loaded in hello.so example plugin.  However
when I load in the null-transform.so plugin I get Segmentation faults after
about 3-4 requests:

root@ip-10-251-163-xxx:/usr/local# ./bin/traffic_server
[TrafficServer] using root directory '/usr/local'
[Jul 15 23:44:52.866] {140596841482000} STATUS: opened
/usr/local/var/log/trafficserver/diags.log
NOTE: Traffic Server received Sig 11: Segmentation fault
./bin/traffic_server - STACK TRACE:
Segmentation fault


3. When trying out the example plugin
append-transform.so /usr/local/etc/trafficserver/content_injection

and the inside the file content_injection I have:
<span>foo bar baz</span>



About 9 out of 10 times I get just the appended html


jwieland@ws-jwieland-lin2:~$ curl -v -x 184.73.156.165:8080
http://www.google.com
* About to connect() to proxy 184.73.156.165 port 8080 (#0)
*   Trying 184.73.156.165... connected
* Connected to 184.73.156.165 (184.73.156.165) port 8080 (#0)
> GET http://www.google.com HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/
3.12.6.2 zlib/1.2.3 libidn/1.9 libssh2/1.2.2
> Host: www.google.com
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 OK
< Date: Fri, 16 Jul 2010 00:04:15 GMT
< Expires: -1
< Cache-Control: private, max-age=0
< Content-Type: text/html; charset=ISO-8859-1
< Set-Cookie: xxxxxxx
< Server: ATS/2.1.2-unstable
< X-XSS-Protection: 1; mode=block
< Content-Length: 25
< Age: 1
< Proxy-Connection: keep-alive
< Via: HTTP/1.1 ip-10-251-163-160 (ApacheTrafficServer/2.1.2-unstable [c sSf
])
<
<span>foo bar baz</span>
* Connection #0 to host 184.73.156.165 left intact
* Closing connection #0

The 1/10 I would get the entire document with the addition.  I made sure I
restarted the server, I've set the

CONFIG proxy.config.http.cache.http INT 0

to make sure I'm not serving up a cached hit.  And I'm using curl to make
sure it is not a browser cache.


Thanks in advance for your help,

Jason Wieland

Mime
View raw message