[ 
https://issues.apache.org/jira/browse/PROTON-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15053133#comment-15053133
 ] 

ASF subversion and git services commented on PROTON-1075:
---------------------------------------------------------

Commit 3f4dc74a4bab7af639a6c8e0bfe4853fb69744dd in qpid-proton's branch 
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=3f4dc74 ]

PROTON-1075: Data races detected in go_test_electron.

Removed un-necessary code to drain the Engine.inject channel, the channel is not
buffered so there cannot be anything to drain. Inject also selects on the done
channel so all goroutines waiting to inject will unblock.

Made endpoint.closed() idempotent, fixing the above revealed that it can be
called twice depending on timing.


> Data races detected in go_test_electron
> ---------------------------------------
>
>                 Key: PROTON-1075
>                 URL: https://issues.apache.org/jira/browse/PROTON-1075
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: go-binding
>    Affects Versions: 0.11
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>             Fix For: 0.12.0
>
>
> I've been consistently seeing this for a little while:
> (It's on an 8 core machine with F23s go 1.5.1).
> Any ideas?
> Andrew
> 8/20 Testing: go_test_electron
> 8/20 Test: go_test_electron
> Command: "/home/andrew/Work/proton/bld/proton-c/bindings/go/electron.test"
> Directory: 
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron
> "go_test_electron" start time: Dec 07 15:48 EST
> Output:
> ----------------------------------------------------------
> ==================
> WARNING: DATA RACE
> Read by goroutine 6:
>   qpid.apache.org/proton.(*Engine).Inject()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go:195
>  +0x
> 57
>   qpid.apache.org/proton.(*Engine).Close()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go:230
>  +0x
> 101
>   qpid.apache.org/electron.(*connection).Close()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go:1
> 37 +0x86
>   qpid.apache.org/electron.closeClientServer()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:78 +0x7e
>   qpid.apache.org/electron.TestClientSendServerReceive.func2()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:101 +0x4c
>   qpid.apache.org/electron.TestClientSendServerReceive()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:158 +0x15fd
>   testing.tRunner()
>       /usr/lib/golang/src/testing/testing.go:456 +0xdc
> Previous write by goroutine 8:
>   qpid.apache.org/proton.(*Engine).Run()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go:320
>  +0x
> a45
>   qpid.apache.org/electron.(*connection).run()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go:1
> 30 +0x49
> Goroutine 6 (running) created at:
>   testing.RunTests()
>       /usr/lib/golang/src/testing/testing.go:561 +0xaa3
>   testing.(*M).Run()
>       /usr/lib/golang/src/testing/testing.go:494 +0xe4
>   main.main()
>       qpid.apache.org/electron/_test/_testmain.go:64 +0x20f
> Goroutine 8 (running) created at:
>   qpid.apache.org/electron.newConnection()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go:1
> 25 +0xb58
>   qpid.apache.org/electron.(*container).Connection()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/container.go:76
>  +0x91
>   qpid.apache.org/electron.newServer.func1()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:50 +0x17d
> ==================
> ==================
> WARNING: DATA RACE
> Read by goroutine 24:
>   qpid.apache.org/proton.(*Engine).Inject()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go:195
>  +0x
> 57
>   qpid.apache.org/proton.(*Engine).Close()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go:230
>  +0x
> 101
>   qpid.apache.org/electron.(*connection).Close()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go:1
> 37 +0x86
>   qpid.apache.org/electron.TestClientReceiver()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:204 +0x4aa
>   testing.tRunner()
>       /usr/lib/golang/src/testing/testing.go:456 +0xdc
> Previous write by goroutine 28:
>   qpid.apache.org/proton.(*Engine).Run()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go:320
>  +0x
> a45
>   qpid.apache.org/electron.(*connection).run()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go:1
> 30 +0x49
> Goroutine 24 (running) created at:
>   testing.RunTests()
>       /usr/lib/golang/src/testing/testing.go:561 +0xaa3
>   testing.(*M).Run()
>       /usr/lib/golang/src/testing/testing.go:494 +0xe4
>   main.main()
>       qpid.apache.org/electron/_test/_testmain.go:64 +0x20f
> Goroutine 28 (running) created at:
>   qpid.apache.org/electron.newConnection()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go:1
> 25 +0xb58
>   qpid.apache.org/electron.(*container).Connection()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/container.go:76
>  +0x91
>   qpid.apache.org/electron.newClient()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:61 +0x153
>   qpid.apache.org/electron.newClientServer()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:71 +0x108
>   qpid.apache.org/electron.TestClientReceiver()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:162 +0x68
>   testing.tRunner()
>       /usr/lib/golang/src/testing/testing.go:456 +0xdc
> ==================
> ==================
> WARNING: DATA RACE
> Read by goroutine 34:
>   qpid.apache.org/proton.(*Engine).Inject()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go:195
>  +0x
> 57
>   qpid.apache.org/proton.(*Engine).Close()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go:230
>  +0x
> 101
>   qpid.apache.org/electron.(*connection).Close()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go:1
> 37 +0x86
>   qpid.apache.org/electron.closeClientServer()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:78 +0x7e
>   qpid.apache.org/electron.TestTimeouts.func2()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:224 +0x4c
>   qpid.apache.org/electron.TestTimeouts()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:271 +0xb83
>   testing.tRunner()
>       /usr/lib/golang/src/testing/testing.go:456 +0xdc
> Previous write by goroutine 36:
>   qpid.apache.org/proton.(*Engine).Run()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go:320
>  +0x
> a45
>   qpid.apache.org/electron.(*connection).run()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go:1
> 30 +0x49
> Goroutine 34 (running) created at:
>   testing.RunTests()
>       /usr/lib/golang/src/testing/testing.go:561 +0xaa3
>   testing.(*M).Run()
>       /usr/lib/golang/src/testing/testing.go:494 +0xe4
>   main.main()
>       qpid.apache.org/electron/_test/_testmain.go:64 +0x20f
> Goroutine 36 (running) created at:
>   qpid.apache.org/electron.newConnection()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go:1
> 25 +0xb58
>   qpid.apache.org/electron.(*container).Connection()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/container.go:76
>  +0x91
>   qpid.apache.org/electron.newServer.func1()
>       
> /home/andrew/Work/proton/src/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.
> go:50 +0x17d
> ==================
> PASS
> Found 3 data race(s)
> <end of output>
> Test time =   1.05 sec
> ----------------------------------------------------------
> Test Failed.
> "go_test_electron" end time: Dec 07 15:48 EST
> "go_test_electron" time elapsed: 00:00:01
> ----------------------------------------------------------



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

Reply via email to