You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Brian Geffon <br...@gmail.com> on 2011/08/09 07:46:31 UTC

bnull-transform.c: SIGPIPE on connection termination

Hello,
I'm using the bnull-transform example and sometimes if connections are
terminated abruptly it can cause a SIGPIPE, I've spent a good amount
of time trying to track down the cause and have been unable to do so.
Also, the bnull-transform.c code isn't up to date with the latest API
so I attached a patch that will correct the datatypes in
handle_buffering() from int to int64_t, also, I added a few casts to
prevent errors when compiling with -Wall.

To reproduce the bug I'm using ab with a high level of concurrency and
killing ab to force the connections closed, the following command will
demonstrate this:

for (( ; ; )) do ab -n 10000 -c 210 http://127.0.0.1:8000/skeleton &
sleep 2; killall ab; done;

After a few iterations of killing ab it should cause a SIGPIPE in
traffic_server. As I've said, I've looked into this for quite a while
before emailing this list so any help or advice would be greatly
appreciated.

Best,
Brian

Re: bnull-transform.c: SIGPIPE on connection termination

Posted by Leif Hedstrom <zw...@apache.org>.
On 08/08/2011 11:46 PM, Brian Geffon wrote:
> Hello,
> I'm using the bnull-transform example and sometimes if connections are
> terminated abruptly it can cause a SIGPIPE, I've spent a good amount
> of time trying to track down the cause and have been unable to do so.
> Also, the bnull-transform.c code isn't up to date with the latest API
> so I attached a patch that will correct the datatypes in
> handle_buffering() from int to int64_t, also, I added a few casts to
> prevent errors when compiling with -Wall.

Is this by chance when running TS under gdb, in a call to write() ? If 
so, see the 'debugging' section on the Confluence Wiki, it's a known 
problem with gdb (and easy to work around). If not, we'd need to see a 
trace from this crasher I think.

Cheers,

-- Leif