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

Jens Geyer reopened THRIFT-3855:
--------------------------------

I get a strange error here. To be honbest,. I have no idea what is going on, 
but I can reproduce it 100% of the time.

{code}
--- FAIL: TestShutdownServerAndClients (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference 
[recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x810085c]

goroutine 43 [running]:
panic(0x8403880, 0x1880a038)
        /usr/local/go/src/runtime/panic.go:481 +0x326
testing.tRunner.func1(0x1894c660)
        /usr/local/go/src/testing/testing.go:467 +0x14f
panic(0x8403880, 0x1880a038)
        /usr/local/go/src/runtime/panic.go:443 +0x3fd
sync/atomic.CompareAndSwapUint64(0x1880f844, 0x0, 0x0, 0x1, 0x0)
        /usr/local/go/src/sync/atomic/asm_386.s:76 +0xc
thrift.(*TSimpleServer).Stop(0x1880f840, 0x0, 0x0)
        /home/jens/Thrift/lib/go/test/gopath/src/thrift/simple_server.go:154 
+0x5d
tests.TestShutdownServerAndClients(0x1894c660)
        
/home/jens/Thrift/lib/go/test/gopath/src/tests/multiplexed_protocol_test.go:158 
+0x63
testing.tRunner(0x1894c660, 0x86592fc)
        /usr/local/go/src/testing/testing.go:473 +0x8f
created by testing.RunTests
        /usr/local/go/src/testing/testing.go:582 +0x6f2
FAIL    tests   0.046s
ok      dontexportrwtest        0.031s
Makefile:663: recipe for target 'check' failed
{code}

The line where it happens is the newly introduced CompareAndSwapInt64(). I've 
checked all possible and impossible pointers in that area, and everything looks 
fine to me. Yet still calling {{make && make check}} within the {{/lib/go}} 
folder fails with the above error. 

Environment is openSuse (32 bit), 
Go version is go1.6.3 Linux/386.


> 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)

Reply via email to