[jira] [Updated] (THRIFT-4283) TNamedPipeServer race condition in interrupt

2017-09-22 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/THRIFT-4283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Noël Goor updated THRIFT-4283:
---
Fix Version/s: 0.11.0

> TNamedPipeServer race condition in interrupt
> 
>
> Key: THRIFT-4283
> URL: https://issues.apache.org/jira/browse/THRIFT-4283
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Affects Versions: 0.10.0
> Environment: Windows
>Reporter: Jean-Noël Goor
>  Labels: c++
> Fix For: 0.11.0
>
> Attachments: thrift-4283-TNamedPipeServer-race-condition.patch
>
>
> In TNamedPipeServer, there exists a race condition between the 'serve' thread 
> and another thread that would attempt to interrupt it.
> While the 'serve' thread is waiting for clients to connect, it is blocked on 
> a GetOverlappedResult call.
> To stop the server, another thread calls the interrupt function that submits 
> a CANCELIO operation to the TOverlappedSubmissionThread.
> The ::CancelIo function is called, freeing the 'serve' thread with an 
> unsuccessful OvelappedResult which then throws and terminate the server by 
> deleting the serverTransport_.
> All this can happen while the call to interrupt has not yet returned, and 
> even the event signaling the execution of the CANCELIO request might not have 
> been caught.
> In our code, this result in unpredictable behavior (mostly detected as 
> stalled).
> It is very hard to reproduce in test environment as it consists in a running 
> threads race condition.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (THRIFT-4283) TNamedPipeServer race condition in interrupt

2017-08-10 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/THRIFT-4283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Noël Goor updated THRIFT-4283:
---
Labels: c++  (was: )

> TNamedPipeServer race condition in interrupt
> 
>
> Key: THRIFT-4283
> URL: https://issues.apache.org/jira/browse/THRIFT-4283
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Affects Versions: 0.10.0
> Environment: Windows
>Reporter: Jean-Noël Goor
>  Labels: c++
> Attachments: thrift-4283-TNamedPipeServer-race-condition.patch
>
>
> In TNamedPipeServer, there exists a race condition between the 'serve' thread 
> and another thread that would attempt to interrupt it.
> While the 'serve' thread is waiting for clients to connect, it is blocked on 
> a GetOverlappedResult call.
> To stop the server, another thread calls the interrupt function that submits 
> a CANCELIO operation to the TOverlappedSubmissionThread.
> The ::CancelIo function is called, freeing the 'serve' thread with an 
> unsuccessful OvelappedResult which then throws and terminate the server by 
> deleting the serverTransport_.
> All this can happen while the call to interrupt has not yet returned, and 
> even the event signaling the execution of the CANCELIO request might not have 
> been caught.
> In our code, this result in unpredictable behavior (mostly detected as 
> stalled).
> It is very hard to reproduce in test environment as it consists in a running 
> threads race condition.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (THRIFT-4283) TNamedPipeServer race condition in interrupt

2017-08-10 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/THRIFT-4283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Noël Goor updated THRIFT-4283:
---
Attachment: thrift-4283-TNamedPipeServer-race-condition.patch

> TNamedPipeServer race condition in interrupt
> 
>
> Key: THRIFT-4283
> URL: https://issues.apache.org/jira/browse/THRIFT-4283
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Library
>Affects Versions: 0.10.0
> Environment: Windows
>Reporter: Jean-Noël Goor
> Attachments: thrift-4283-TNamedPipeServer-race-condition.patch
>
>
> In TNamedPipeServer, there exists a race condition between the 'serve' thread 
> and another thread that would attempt to interrupt it.
> While the 'serve' thread is waiting for clients to connect, it is blocked on 
> a GetOverlappedResult call.
> To stop the server, another thread calls the interrupt function that submits 
> a CANCELIO operation to the TOverlappedSubmissionThread.
> The ::CancelIo function is called, freeing the 'serve' thread with an 
> unsuccessful OvelappedResult which then throws and terminate the server by 
> deleting the serverTransport_.
> All this can happen while the call to interrupt has not yet returned, and 
> even the event signaling the execution of the CANCELIO request might not have 
> been caught.
> In our code, this result in unpredictable behavior (mostly detected as 
> stalled).
> It is very hard to reproduce in test environment as it consists in a running 
> threads race condition.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)