thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Craig <ben.cr...@ni.com>
Subject Re: Thread dies in TThreadedServer task
Date Wed, 04 Jun 2014 13:17:56 GMT
Which OS?  Broken pipe signal handling differs wildly between Windows, 
Mac, Linux, BSD, etc.
Which version of Thrift?

If you are using Mac, and Thrift 0.9.1, then you may want to look at 
THRIFT-2019 and its associated .patch.
https://issues.apache.org/jira/browse/THRIFT-2019

"Kohn, Rodolfo" <rodolfo.kohn@intel.com> wrote on 06/03/2014 05:44:07 PM:

> From: "Kohn, Rodolfo" <rodolfo.kohn@intel.com>
> To: "user@thrift.apache.org" <user@thrift.apache.org>, 
> Date: 06/03/2014 05:45 PM
> Subject: Thread dies in TThreadedServer task
> 
> Hello,
> I'm working with C++ Thrift and I'm using TThreadedServer with 
> TBinaryProtocolFactory and TBufferedTransportFactory.
> When a new connection is received in accept, a task is created and 
> executed as a runnable.
> When the connection with the client is broken for some reason (I 
> don't know whether it received a RST but I suppose so), the 
> following line makes the thread die:
> 
> !input_->getTransport()->peek()
> 
> I found the problem occurs inside TBufferTransports.h in method
> bool peek()
> in the following line:
> setReadBuffer(rBuf_.get(), transport_->read(rBuf_.get(), rBufSize_));
> 
> I suppose this is because the thread is getting a broken pipe signal
> that is not properly handled but I would like to ask the list 
> whether this makes sense and how this could be solved.
> 
> Thanks,
> Rodolfo
> 
> 
> 
> 
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message