[ 
https://issues.apache.org/jira/browse/THRIFT-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603739#action_12603739
 ] 

Kevin Ballard commented on THRIFT-21:
-------------------------------------

I'm going to go ahead and say this is a non-issue. I find it perfectly 
believable that all modern OS's do in fact implement accept() in a thread-safe 
manner, and even if that is not the case, ThreadPoolServer is going to be 
obsoleted by NonblockingServer very shortly.

> TThreadPoolServer has dangerous thread-safety issue in accepting connections
> ----------------------------------------------------------------------------
>
>                 Key: THRIFT-21
>                 URL: https://issues.apache.org/jira/browse/THRIFT-21
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Ruby)
>            Reporter: Kevin Ballard
>
> TThreadPoolServer currently accepts incoming connections in threads. This 
> means that at any time, as long as the thread pool is not completely full of 
> running connections, there are multiple threads currently blocking on the 
> #accept call. This is dangerous because the accept syscall is not documented 
> as being thread-safe. The only reason this actually works in ruby is because 
> of the cooperative threading, but if this library is used in any ruby 
> interpreter that supports native threads (e.g. MacRuby, jruby, etc) I would 
> expect it to start manifesting strange bugs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to