[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2017-01-28 Thread James E. King, III (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15844157#comment-15844157
 ] 

James E. King, III commented on THRIFT-3855:


@jfarrell can close it if we believe this issue has already been resolved; just 
trying to get a handle on the pull request backlog. :)

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2017-01-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15843896#comment-15843896
 ] 

ASF GitHub Bot commented on THRIFT-3855:


Github user pbennett commented on the issue:

https://github.com/apache/thrift/pull/1113
  
I was asked to close this pull request in 
https://issues.apache.org/jira/browse/THRIFT-3855 but I'm not the submitter of 
this pull request nor can I accept it.


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2017-01-27 Thread James E. King, III (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15843854#comment-15843854
 ] 

James E. King, III commented on THRIFT-3855:


[~patrickb] If you believe that the issue has already been resolved, could you 
close your pull request (https://github.com/apache/thrift/pull/1113)?  Thanks.

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-10-12 Thread Jens Geyer (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15569609#comment-15569609
 ] 

Jens Geyer commented on THRIFT-3855:


Good. And 0.10.0 is on the way ...

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-10-11 Thread Patrick Bennett (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15567209#comment-15567209
 ] 

Patrick Bennett commented on THRIFT-3855:
-

Looks like this was fixed already in the latest code.  Even though it still 
shows 0.9.3 in changes and elsewhere, the latest revisions had Stop() added to 
TServerSocket.Interrupt() which fixes my problem as well.

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-10-11 Thread Patrick Bennett (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15565712#comment-15565712
 ] 

Patrick Bennett commented on THRIFT-3855:
-

I just modified the generated .go code and got it working fine.  It's a very 
trivial patch (add that Close line).  I'm just surprised no one noticed this 
before?  No one tried to stop an idle server?

I was never able to get thrift building cleanly locally with the solutions or 
cmake generated files and vc14 (vs2015) so I can't test the changes locally for 
submitting a patch.  If I stay with thrift I may go back to it in earnest.  So 
far the performance is about 4-5x slower than grpc (although grpc seems 
completely broken for ruby/windows clients so thrift is only working solution 
for me at the moment).

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-10-10 Thread Jens Geyer (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15563630#comment-15563630
 ] 

Jens Geyer commented on THRIFT-3855:


[~patrickb]
What about providing an updated patch? 


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-10-10 Thread Patrick Bennett (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15563236#comment-15563236
 ] 

Patrick Bennett commented on THRIFT-3855:
-

I didn't see it anywhere else but my problem is actually that Stop doesn't 
actually interrupt the waiting Accept call. 
If I start my service and something calls Stop (my ctrl-c handler) then it just 
'hangs' until a new client connects. 
AcceptLoop calls Accept in a loop and Accept blocks until the server accepts a 
new connection, so there's nothing to actually 'stop' the server in that accept.
The problem is that SimpleServer.Stop calls Interrupt (which sets the 
interrupted variable in ServerSocket [in my case]) but doesn't do anything to 
abort the open listener.
If I change SimpleServer Stop to
```
func (p *TSimpleServer) Stop() error {
p.quit <- struct{}{}
p.serverTransport.Interrupt()
p.serverTransport.Close()

return nil
}
```
Then it works fine.

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-10-01 Thread Aki Sukegawa (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15538486#comment-15538486
 ] 

Aki Sukegawa commented on THRIFT-3855:
--

[~patrickb] thanks for describing the problems.
It seems to be broken by my commit last week (THRIFT-2835).
I'll update vcxproj and readme.
But I don't what was happening for your CMake build.
We're building it fine without "-DBIN_INSTALL_DIR=" flag on our windows CI (and 
without link errors).


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-30 Thread Jens Geyer (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15537280#comment-15537280
 ] 

Jens Geyer commented on THRIFT-3855:


So the VS project it's obviously completely utterly broken and I did something 
wrong, because for me it works. Too bad. Sorry, no idea.

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-30 Thread Patrick Bennett (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15537144#comment-15537144
 ] 

Patrick Bennett commented on THRIFT-3855:
-

No, it doesn't work as-is.  Not even close.  The readme.me file in compiler/cpp 
says to use winflex/bison and then at the end says not to use it but to use the 
one from 
https://jaisantonyk.wordpress.com/2008/03/16/lex-and-yaccbison-in-windows/ 
instead. 
All the links on that page are dead, so can't use that.
So renaming winflexbison binaries and putting in path doesn't work either.
The solution references src/thriftl.ll when it's really in src/thrift/thriftl.ll
It continues to ripple through in fact..  Basically the solution/vcxproj file 
is completely broken as checked in.
So let's try cmake.  It looks like its more current.
Yet, trying cmake as directed using cmake .. yields the error:
CMake Error at CMakeLists.txt:156 (install):
  install TARGETS given no RUNTIME DESTINATION for executable target
  "thrift-compiler".
So I guess I have to learn about cmake now...
Guess I *really* have to use cmake with the -D BIN_INSTALL_DIR= flag.
So I run that... it builds the projects, build them... and it compiles but I 
get tons of linker errors.

So... yeah... it's a mess.  Clearly it's not being built based on the 
instructions as listed.


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-30 Thread Jake Farrell (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15537133#comment-15537133
 ] 

Jake Farrell commented on THRIFT-3855:
--

hey [~asm0dey], the 0.10.0 release candidate is in process, you can follow 
THRIFT-3775 for progress. We have had some issues with our CI and tooling and 
have been working through them and with the new changes we are making hope to 
get back to a more regular release cadence. 

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-30 Thread Jens Geyer (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15537100#comment-15537100
 ] 

Jens Geyer commented on THRIFT-3855:


Next release is 0.10.0, [~jfarrell] may be able to tell you more about the 
timeline.

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-30 Thread Paul Finkelshteyn (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15537067#comment-15537067
 ] 

Paul Finkelshteyn commented on THRIFT-3855:
---

Is it possible that we could just backport commits with changes of Stop() 
method to some new brunch for bugfix 0.9.4 release?

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-30 Thread Jens Geyer (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15537013#comment-15537013
 ] 

Jens Geyer commented on THRIFT-3855:


I agree too. :-(

> Building the thrift compiler for windows looks to be a bit of a morass. 

It's actually not. You need WinFlexBison and some not too old version of Visual 
Studio, and that's it. Couldn't be much easier.

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-30 Thread James E. King, III (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15536604#comment-15536604
 ] 

James E. King, III commented on THRIFT-3855:


It sounds like what you are looking for is regular, timely releases - perhaps 
even more frequent patch releases to fix bugs.  I agree with you on that.

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-30 Thread Patrick Bennett (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15536523#comment-15536523
 ] 

Patrick Bennett commented on THRIFT-3855:
-

I'm not sure I follow.  If there are nasty bugs that should be fixed why 
wouldn't a new version be released?  I'd like to just 'use' thrift, not develop 
it, and building the thrift compiler for windows looks to be a bit of a morass. 
 
Is this project one that basically assumes everyone that uses it runs off tip 
and builds it all themselves with no particular release process?


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-30 Thread Jens Geyer (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15536266#comment-15536266
 ] 

Jens Geyer commented on THRIFT-3855:


As Thrift is still below 1.0 we usually do not publish updates to released 
packages. The fix will be part of the next release, anyonewho needs it is free 
to cherrypick it from here or from master. 

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-29 Thread James E. King, III (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15534873#comment-15534873
 ] 

James E. King, III commented on THRIFT-3855:


A fix was put into the stop logic for 0.10.0 which is currently only available 
if you get the master branch from github.  We're starting the process of 
rolling out the next release that includes the fix.  If you could, please try 
that and see if the issue is still there using your test so we can see if the 
issue has already been addressed or if we need to open a new defect.

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-29 Thread Patrick Bennett (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15534859#comment-15534859
 ] 

Patrick Bennett commented on THRIFT-3855:
-

I wasn't using an old version at all.  I was just using the official 
'production' version of thrift (0.9.3) from https://thrift.apache.org/.
Looking again right now, that's what still shows for download.
If it's not something people should be using, shouldn't it be updated?

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-29 Thread Paul Finkelshteyn (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15533727#comment-15533727
 ] 

Paul Finkelshteyn commented on THRIFT-3855:
---

[~patrickb] looks like you're using old version of server.

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-29 Thread Jens Geyer (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15533694#comment-15533694
 ] 

Jens Geyer commented on THRIFT-3855:


Hi [~patrickb], did you check this against current master?

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-28 Thread Patrick Bennett (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15530847#comment-15530847
 ] 

Patrick Bennett commented on THRIFT-3855:
-

Not sure if this is related but thrift 0.9.3 generates code such that even one 
call to Stop() hangs.
If I set up a handler to trap ctrl-c/sigint (so that I can gracefully term my 
own goroutines) like so:
quitChan := make(chan os.Signal)

// trap ctrl-c - and gracefully stop service
signal.Notify(quitChan, os.Interrupt)
go func() {
<-quitChan
consoleTopic.Status(ctx, "...exiting")
server.Stop()
}()
server.Serve()  // <--- this never returns!



> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-26 Thread Paul Finkelshteyn (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15525072#comment-15525072
 ] 

Paul Finkelshteyn commented on THRIFT-3855:
---

Thank you! Now we're waiting for 0.10 version!

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: Paul Finkelshteyn
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15524043#comment-15524043
 ] 

ASF GitHub Bot commented on THRIFT-3855:


Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1094


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1554#comment-1554
 ] 

ASF GitHub Bot commented on THRIFT-3855:


Github user asm0dey commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1094#discussion_r80414179
  
--- Diff: lib/go/thrift/simple_server.go ---
@@ -183,9 +186,6 @@ func (p *TSimpleServer) processRequests(client 
TTransport) error {
log.Printf("error processing request: %s", err)
return err
}
-   if err, ok := err.(TApplicationException); ok && err.TypeId() 
== UNKNOWN_METHOD {
-   continue
-   }
--- End diff --

And again I dunno why one of builds has failed, but it looks like it's 
nothing to do with Fo code.


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15521462#comment-15521462
 ] 

ASF GitHub Bot commented on THRIFT-3855:


Github user asm0dey commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1094#discussion_r80392646
  
--- Diff: lib/go/thrift/simple_server.go ---
@@ -183,9 +186,6 @@ func (p *TSimpleServer) processRequests(client 
TTransport) error {
log.Printf("error processing request: %s", err)
return err
}
-   if err, ok := err.(TApplicationException); ok && err.TypeId() 
== UNKNOWN_METHOD {
-   continue
-   }
--- End diff --

@Jens-G  Reverted back that change. Thank you for review!


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15521453#comment-15521453
 ] 

ASF GitHub Bot commented on THRIFT-3855:


Github user Jens-G commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1094#discussion_r80392522
  
--- Diff: lib/go/thrift/simple_server.go ---
@@ -183,9 +186,6 @@ func (p *TSimpleServer) processRequests(client 
TTransport) error {
log.Printf("error processing request: %s", err)
return err
}
-   if err, ok := err.(TApplicationException); ok && err.TypeId() 
== UNKNOWN_METHOD {
-   continue
-   }
--- End diff --

I would doubt that. If that is true that would probably qualify for a bug 
report. I would not expect a formatting tool to arbitrarily delete valid code 
lines.


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15521408#comment-15521408
 ] 

ASF GitHub Bot commented on THRIFT-3855:


Github user asm0dey commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1094#discussion_r80391820
  
--- Diff: lib/go/thrift/simple_server.go ---
@@ -183,9 +186,6 @@ func (p *TSimpleServer) processRequests(client 
TTransport) error {
log.Printf("error processing request: %s", err)
return err
}
-   if err, ok := err.(TApplicationException); ok && err.TypeId() 
== UNKNOWN_METHOD {
-   continue
-   }
--- End diff --

@Jens-G --^


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15521406#comment-15521406
 ] 

ASF GitHub Bot commented on THRIFT-3855:


Github user asm0dey commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1094#discussion_r80391813
  
--- Diff: lib/go/thrift/simple_server.go ---
@@ -183,9 +186,6 @@ func (p *TSimpleServer) processRequests(client 
TTransport) error {
log.Printf("error processing request: %s", err)
return err
}
-   if err, ok := err.(TApplicationException); ok && err.TypeId() 
== UNKNOWN_METHOD {
-   continue
-   }
--- End diff --

It's removed by gofmt. I thought that gofmt knows better tan me, so I 
didn't revert that change. should I?


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15521359#comment-15521359
 ] 

ASF GitHub Bot commented on THRIFT-3855:


Github user Jens-G commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1094#discussion_r80390991
  
--- Diff: lib/go/thrift/simple_server.go ---
@@ -183,9 +186,6 @@ func (p *TSimpleServer) processRequests(client 
TTransport) error {
log.Printf("error processing request: %s", err)
return err
}
-   if err, ok := err.(TApplicationException); ok && err.TypeId() 
== UNKNOWN_METHOD {
-   continue
-   }
--- End diff --

How is that related? Please explain. 


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15521358#comment-15521358
 ] 

ASF GitHub Bot commented on THRIFT-3855:


Github user Jens-G commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1094#discussion_r80390983
  
--- Diff: lib/go/thrift/simple_server.go ---
@@ -183,9 +186,6 @@ func (p *TSimpleServer) processRequests(client 
TTransport) error {
log.Printf("error processing request: %s", err)
return err
}
-   if err, ok := err.(TApplicationException); ok && err.TypeId() 
== UNKNOWN_METHOD {
-   continue
-   }
--- End diff --

I can't see the connection. Please explain.


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-25 Thread Paul Finkelshteyn (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15520419#comment-15520419
 ] 

Paul Finkelshteyn commented on THRIFT-3855:
---

To a pity one test is failed due to some technical reason, I wish it was 
possible to run it again, but I can't.
[~jensg] [~jking] Could you please check my pull request?

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-24 Thread Paul Finkelshteyn (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15519585#comment-15519585
 ] 

Paul Finkelshteyn commented on THRIFT-3855:
---

Hi guys,

I've just submitted pull request, where closing of channel is performed in more 
idiomatic (and more lightweight) way then with CompareAndSwapInt64.
Could you please review it and, if that's ok – than release 0.10 finally? We're 
waiting for python 3 support sooo much...

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-09-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15519537#comment-15519537
 ] 

ASF GitHub Bot commented on THRIFT-3855:


GitHub user asm0dey opened a pull request:

https://github.com/apache/thrift/pull/1094

Fixes THRIFT-3855

Replaced complex CompareAndSwapInt64 with syncOnce.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/asm0dey/thrift master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1094.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1094


commit 762c2573e2275307b26ac78271b66d37065ed5f9
Author: Paul 
Date:   2016-09-24T19:47:58Z

Fixes THRIFT-3855

Replaced complex CompareAndSwapInt64 with syncOnce.




> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Minor
> Fix For: 0.10.0
>
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-07-23 Thread Jens Geyer (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15390688#comment-15390688
 ] 

Jens Geyer commented on THRIFT-3855:



MOD: fix the blocked bug when call Stop() twice or more

When Stop() is called twice or more, and no new connection accepted from 
AcceptLoop(), the Stop() will be blocked because the quit channel is full.
Use a flag to ensure the Stop() executed only once, and no block.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/huaiyun/thrift master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1028.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1028


commit 24d16aaaf20c97a944d22551a8a5215d830546c0
Author: ZhiyuYin 
Date:   2016-06-16T09:28:42Z

MOD: fix the blocked bug when call the Stop() twice or more




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---



> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Priority: Minor
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-07-20 Thread James E. King, III (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15386261#comment-15386261
 ] 

James E. King, III commented on THRIFT-3855:


Hi, sorry, I used this thrift ticket number in an example - please ignore that.

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Priority: Minor
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-07-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15386259#comment-15386259
 ] 

ASF GitHub Bot commented on THRIFT-3855:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1052
  
Please create an Apache Jira ticket in the THRIFT project to cover the 
defect, and put a link to the pull request in there.  In the future if you open 
a ticket first and put the name of the Jira item (like THRIFT-3855) into the 
pull request comments, it will get linked to the Jira ticket automatically.


> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>Priority: Minor
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-06-16 Thread James E. King, III (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15335346#comment-15335346
 ] 

James E. King, III commented on THRIFT-3855:


PR is out, was submitted without a Jira ticket:

https://github.com/apache/thrift/pull/1028

> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3855) In the go simple server, if Stop() is called multiple times it hangs

2016-06-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15335344#comment-15335344
 ] 

ASF GitHub Bot commented on THRIFT-3855:


Github user jeking3 commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1028#discussion_r67457396
  
--- Diff: lib/go/thrift/simple_server.go ---
@@ -149,8 +151,10 @@ func (p *TSimpleServer) Serve() error {
 }
 
 func (p *TSimpleServer) Stop() error {
-   p.quit <- struct{}{}
-   p.serverTransport.Interrupt()
+   if atomic.CompareAndSwapInt64(, 0, 1) {
--- End diff --

I created a Jira item for your issue:

https://issues.apache.org/jira/browse/THRIFT-3855



> In the go simple server, if Stop() is called multiple times it hangs
> 
>
> Key: THRIFT-3855
> URL: https://issues.apache.org/jira/browse/THRIFT-3855
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Library
>Affects Versions: 0.9.3
>Reporter: James E. King, III
>
> From the submitter huaiwan:
> {quote}
> huaiyun commented 18 hours ago
> When Stop() is called twice or more, and no new connection accepted from 
> AcceptLoop(), the Stop() will be blocked because the quit channel is full.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)