Applet / AppServer / AppBridge Data Races #287
Labels
No Label
applications
BLOCKED
bug
design
duplicate
enhancement
fixed?
funding-needed
help wanted
infrastructure
invalid
payments
qubes
question
ready-for-implementation
refactor
spam
tapir-server
testing
tor
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cwtch.im/cwtch#287
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Run the integration test with -race and they will appear...
A result of some vague data ownership because of the number of different ways these can be composed.
=== RUN TestCwtchPeerIntegration
2019/11/12 12:30:35 connectivity/torProvider.go [DBUG] dialing system tor control port
2019/11/12 12:30:35 connectivity/torProvider.go [DBUG] connected to control port
2019/11/12 12:30:35 connectivity/torProvider.go [DBUG] torversions: [0 4 3 0-alpha-dev]
2019/11/12 12:30:35 connectivity/torProvider.go [DBUG] OK version 0.4.3.0-alpha-dev
No server found!
Starting cwtch server...
2019/11/12 12:30:35 server/serverConfig.go [INFO] Loading config from server-test.json
2019/11/12 12:30:35 server/serverConfig.go [INFO] Saving config to server-test.json
Establishing Tor hidden service: u6wjmla6guqwfwbzcdr3wbjbryiueawvsobwqx6dvpvzcgvl3w7b2zid...
2019/11/12 12:30:35 app/app.go [DBUG] NewApp(./storage)
2019/11/12 12:30:35 app/appBridge.go [INFO] ab.listen()
2019/11/12 12:30:35 app/appClient.go [INFO] Created new App Client
WARNING: DATA RACE
Read at 0x00c00013a588 by goroutine 24:
cwtch.im/cwtch/event/bridge.(*pipeBridge).Read()
/home/sarah/workspace/src/cwtch.im/cwtch/event/bridge/pipeBridge.go:279 +0x67e
cwtch.im/cwtch/app.(*applicationBridge).listen()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appBridge.go:21 +0xe1
Previous write at 0x00c00013a588 by goroutine 18:
cwtch.im/cwtch/event/bridge.(*pipeBridge).handleConns()
/home/sarah/workspace/src/cwtch.im/cwtch/event/bridge/pipeBridge.go:175 +0x8b
cwtch.im/cwtch/event/bridge.(*pipeBridge).connectionManager()
/home/sarah/workspace/src/cwtch.im/cwtch/event/bridge/pipeBridge.go:101 +0x477
Goroutine 24 (running) created at:
cwtch.im/cwtch/app.NewAppClient()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:26 +0x2fa
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:150 +0xb6d
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
Goroutine 18 (running) created at:
cwtch.im/cwtch/event/bridge.NewPipeBridgeClient()
/home/sarah/workspace/src/cwtch.im/cwtch/event/bridge/pipeBridge.go:61 +0x198
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:148 +0xad8
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
2019/11/12 12:30:35 app/appService.go [INFO] Created new App Service
Creating Alice...
2019/11/12 12:30:35 app/app.go [DBUG] CreatePeer(alice)
2019/11/12 12:30:35 app/appBridge.go [INFO] ab.listen()
2019/11/12 12:30:35 app/appBridge.go [DBUG] listen() got ReloadClient for app
2019/11/12 12:30:35 app/appService.go [INFO] app Service handleEvent ReloadClient
2019/11/12 12:30:35 app/appBridge.go [DBUG] listen() got ACNStatus for app
2019/11/12 12:30:35 app/appBridge.go [DBUG] listen() got ReloadDone for app
2019/11/12 12:30:36 server/server.go [INFO] cwtch server running on cwtch:u6wjmla6guqwfwbzcdr3wbjbryiueawvsobwqx6dvpvzcgvl3w7b2zid.onion:9878
Creating Bob...
2019/11/12 12:30:36 app/app.go [DBUG] CreatePeer(bob)
Creating Carol...
2019/11/12 12:30:36 app/appClient.go [INFO] appClient CreatePeer carol
2019/11/12 12:30:36 app/appBridge.go [DBUG] listen() got CreatePeer for app
2019/11/12 12:30:36 app/appService.go [INFO] app Service handleEvent CreatePeer
2019/11/12 12:30:36 app/appService.go [INFO] app Service create peer carol asdfasdf
2019/11/12 12:30:36 app/applets.go [DBUG] storing plugin for h76uhjrojpkq5wrnpctsmwxrox4xwjbcxd2nt64aa22dh5pajm7wciyd [0xc0000a0ae0]
2019/11/12 12:30:36 app/app.go [DBUG] CreatePeer(carol)
Alice created: h76uhjrojpkq5wrnpctsmwxrox4xwjbcxd2nt64aa22dh5pajm7wciyd
Bob created: f7jfga6lw6tm73z6tdh5o5j6pz4ugd46mvs4kn7lyquspjyiihchwmid
2019/11/12 12:30:36 app/appBridge.go [DBUG] listen() got NewPeer for app
WARNING: DATA RACE
Write at 0x00c000138180 by goroutine 24:
runtime.mapassign_faststr()
/home/sarah/go/src/runtime/map_faststr.go:202 +0x0
cwtch.im/cwtch/app.(*applicationClient).newPeer()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:78 +0x64b
cwtch.im/cwtch/app.(*applicationClient).handleEvent()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:45 +0x312
cwtch.im/cwtch/app.(*applicationClient).handleEvent-fm()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:39 +0x4b
cwtch.im/cwtch/app.(*applicationBridge).listen()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appBridge.go:29 +0x269
Previous read at 0x00c000138180 by goroutine 8:
runtime.mapiterinit()
/home/sarah/go/src/runtime/map.go:802 +0x0
cwtch.im/cwtch/app.(*appletPeers).ListPeers()
/home/sarah/workspace/src/cwtch.im/cwtch/app/applets.go:63 +0xa9
cwtch.im/cwtch/app.(*applicationClient).ListPeers()
:1 +0x47
cwtch.im/cwtch/app/utils.WaitGetPeer()
/home/sarah/workspace/src/cwtch.im/cwtch/app/utils/utils.go:15 +0x189
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:175 +0x1254
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
Goroutine 24 (running) created at:
cwtch.im/cwtch/app.NewAppClient()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:26 +0x2fa
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:150 +0xb6d
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
Goroutine 8 (running) created at:
testing.(*T).Run()
/home/sarah/go/src/testing/testing.go:960 +0x651
testing.runTests.func1()
/home/sarah/go/src/testing/testing.go:1202 +0xa6
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
testing.runTests()
/home/sarah/go/src/testing/testing.go:1200 +0x521
testing.(*M).Run()
/home/sarah/go/src/testing/testing.go:1117 +0x2ff
main.main()
_testmain.go:44 +0x223
2019/11/12 12:30:36 app/appBridge.go [DBUG] listen() got ACNStatus for app
2019/11/12 12:30:36 app/appBridge.go [DBUG] listen() got ACNStatus for zsezs7dvytfflvr7fyhadxkuymmv42w4cgbop7fj2gnwfacqey7magyd
WARNING: DATA RACE
Read at 0x00c00030a748 by goroutine 8:
cwtch.im/cwtch/app.(*appletPeers).ListPeers()
/home/sarah/workspace/src/cwtch.im/cwtch/app/applets.go:63 +0xdd
cwtch.im/cwtch/app.(*applicationClient).ListPeers()
:1 +0x47
cwtch.im/cwtch/app/utils.WaitGetPeer()
/home/sarah/workspace/src/cwtch.im/cwtch/app/utils/utils.go:15 +0x189
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:175 +0x1254
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
Previous write at 0x00c00030a748 by goroutine 24:
cwtch.im/cwtch/app.(*applicationClient).newPeer()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:78 +0x663
cwtch.im/cwtch/app.(*applicationClient).handleEvent()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:45 +0x312
cwtch.im/cwtch/app.(*applicationClient).handleEvent-fm()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:39 +0x4b
cwtch.im/cwtch/app.(*applicationBridge).listen()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appBridge.go:29 +0x269
Goroutine 8 (running) created at:
testing.(*T).Run()
/home/sarah/go/src/testing/testing.go:960 +0x651
testing.runTests.func1()
/home/sarah/go/src/testing/testing.go:1202 +0xa6
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
testing.runTests()
/home/sarah/go/src/testing/testing.go:1200 +0x521
testing.(*M).Run()
/home/sarah/go/src/testing/testing.go:1117 +0x2ff
main.main()
_testmain.go:44 +0x223
Goroutine 24 (running) created at:
cwtch.im/cwtch/app.NewAppClient()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:26 +0x2fa
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:150 +0xb6d
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
==================
WARNING: DATA RACE
Read at 0x00c0002ee080 by goroutine 8:
cwtch.im/cwtch/peer.(*cwtchPeer).GetProfile()
/home/sarah/workspace/src/cwtch.im/cwtch/peer/cwtch_peer.go:201 +0x3a
cwtch.im/cwtch/app.(*appletPeers).ListPeers()
/home/sarah/workspace/src/cwtch.im/cwtch/app/applets.go:64 +0x135
cwtch.im/cwtch/app.(*applicationClient).ListPeers()
:1 +0x47
cwtch.im/cwtch/app/utils.WaitGetPeer()
/home/sarah/workspace/src/cwtch.im/cwtch/app/utils/utils.go:15 +0x189
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:175 +0x1254
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
Previous write at 0x00c0002ee080 by goroutine 24:
cwtch.im/cwtch/app.(*applicationClient).newPeer()
/home/sarah/workspace/src/cwtch.im/cwtch/peer/cwtch_peer.go:91 +0x522
cwtch.im/cwtch/app.(*applicationClient).handleEvent()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:45 +0x312
cwtch.im/cwtch/app.(*applicationClient).handleEvent-fm()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:39 +0x4b
cwtch.im/cwtch/app.(*applicationBridge).listen()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appBridge.go:29 +0x269
Goroutine 8 (running) created at:
testing.(*T).Run()
/home/sarah/go/src/testing/testing.go:960 +0x651
testing.runTests.func1()
/home/sarah/go/src/testing/testing.go:1202 +0xa6
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
testing.runTests()
/home/sarah/go/src/testing/testing.go:1200 +0x521
testing.(*M).Run()
/home/sarah/go/src/testing/testing.go:1117 +0x2ff
main.main()
_testmain.go:44 +0x223
Goroutine 24 (running) created at:
cwtch.im/cwtch/app.NewAppClient()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:26 +0x2fa
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:150 +0xb6d
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
==================
WARNING: DATA RACE
Read at 0x00c000312460 by goroutine 8:
cwtch.im/cwtch/app.(*appletPeers).ListPeers()
/home/sarah/workspace/src/cwtch.im/cwtch/app/applets.go:64 +0x14a
cwtch.im/cwtch/app.(*applicationClient).ListPeers()
:1 +0x47
cwtch.im/cwtch/app/utils.WaitGetPeer()
/home/sarah/workspace/src/cwtch.im/cwtch/app/utils/utils.go:15 +0x189
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:175 +0x1254
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
Previous write at 0x00c000312460 by goroutine 24:
reflect.Value.SetString()
/home/sarah/go/src/reflect/value.go:1717 +0x69
encoding/json.(*decodeState).literalStore()
/home/sarah/go/src/encoding/json/decode.go:1010 +0x319f
encoding/json.(*decodeState).value()
/home/sarah/go/src/encoding/json/decode.go:443 +0x2dc
encoding/json.(*decodeState).object()
/home/sarah/go/src/encoding/json/decode.go:823 +0x21db
encoding/json.(*decodeState).value()
/home/sarah/go/src/encoding/json/decode.go:429 +0xaf
encoding/json.(*decodeState).unmarshal()
/home/sarah/go/src/encoding/json/decode.go:179 +0x254
encoding/json.Unmarshal()
/home/sarah/go/src/encoding/json/decode.go:106 +0x1e4
cwtch.im/cwtch/model.(*Profile).GetCopy()
/home/sarah/workspace/src/cwtch.im/cwtch/model/profile.go:478 +0x16a
cwtch.im/cwtch/storage.ReadProfile()
/home/sarah/workspace/src/cwtch.im/cwtch/storage/profile_store.go:148 +0x254
cwtch.im/cwtch/app.(*applicationClient).newPeer()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:58 +0x11b
cwtch.im/cwtch/app.(*applicationClient).handleEvent()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:45 +0x312
cwtch.im/cwtch/app.(*applicationClient).handleEvent-fm()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:39 +0x4b
cwtch.im/cwtch/app.(*applicationBridge).listen()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appBridge.go:29 +0x269
Goroutine 8 (running) created at:
testing.(*T).Run()
/home/sarah/go/src/testing/testing.go:960 +0x651
testing.runTests.func1()
/home/sarah/go/src/testing/testing.go:1202 +0xa6
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
testing.runTests()
/home/sarah/go/src/testing/testing.go:1200 +0x521
testing.(*M).Run()
/home/sarah/go/src/testing/testing.go:1117 +0x2ff
main.main()
_testmain.go:44 +0x223
Goroutine 24 (running) created at:
cwtch.im/cwtch/app.NewAppClient()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:26 +0x2fa
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:150 +0xb6d
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
==================
WARNING: DATA RACE
Read at 0x00c000312490 by goroutine 8:
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:176 +0x1297
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
Previous write at 0x00c000312490 by goroutine 24:
reflect.Value.SetString()
/home/sarah/go/src/reflect/value.go:1717 +0x69
encoding/json.(*decodeState).literalStore()
/home/sarah/go/src/encoding/json/decode.go:1010 +0x319f
encoding/json.(*decodeState).value()
/home/sarah/go/src/encoding/json/decode.go:443 +0x2dc
encoding/json.(*decodeState).object()
/home/sarah/go/src/encoding/json/decode.go:823 +0x21db
encoding/json.(*decodeState).value()
/home/sarah/go/src/encoding/json/decode.go:429 +0xaf
encoding/json.(*decodeState).unmarshal()
/home/sarah/go/src/encoding/json/decode.go:179 +0x254
encoding/json.Unmarshal()
/home/sarah/go/src/encoding/json/decode.go:106 +0x1e4
cwtch.im/cwtch/model.(*Profile).GetCopy()
/home/sarah/workspace/src/cwtch.im/cwtch/model/profile.go:478 +0x16a
cwtch.im/cwtch/storage.ReadProfile()
/home/sarah/workspace/src/cwtch.im/cwtch/storage/profile_store.go:148 +0x254
cwtch.im/cwtch/app.(*applicationClient).newPeer()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:58 +0x11b
cwtch.im/cwtch/app.(*applicationClient).handleEvent()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:45 +0x312
cwtch.im/cwtch/app.(*applicationClient).handleEvent-fm()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:39 +0x4b
cwtch.im/cwtch/app.(*applicationBridge).listen()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appBridge.go:29 +0x269
Goroutine 8 (running) created at:
testing.(*T).Run()
/home/sarah/go/src/testing/testing.go:960 +0x651
testing.runTests.func1()
/home/sarah/go/src/testing/testing.go:1202 +0xa6
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
testing.runTests()
/home/sarah/go/src/testing/testing.go:1200 +0x521
testing.(*M).Run()
/home/sarah/go/src/testing/testing.go:1117 +0x2ff
main.main()
_testmain.go:44 +0x223
Goroutine 24 (running) created at:
cwtch.im/cwtch/app.NewAppClient()
/home/sarah/workspace/src/cwtch.im/cwtch/app/appClient.go:26 +0x2fa
cwtch.im/cwtch/testing.TestCwtchPeerIntegration()
/home/sarah/workspace/src/cwtch.im/cwtch/testing/cwtch_peer_server_integration_test.go:150 +0xb6d
testing.tRunner()
/home/sarah/go/src/testing/testing.go:909 +0x199
Carol created: zsezs7dvytfflvr7fyhadxkuymmv42w4cgbop7fj2gnwfacqey7magyd
2019/11/12 12:30:36 app/app