when server appdomain restart, client reconnect with previous group token in querystring, sometimes the group is not added in server #2207

Closed
Xiaohongt opened this Issue Jun 25, 2013 · 3 comments

Projects

None yet

2 participants

@Xiaohongt
Contributor

Functional impact:
In repro there were 6 clients and joined group before server rebuild, after server rebuild or web.config change, all clients reconnected with the previous group token in querystring, and 4 clients were still in the group and can receive message sent to the group, but 2 clients were not in the group in server anymore and can't receive message sent to the group, and the 2 clients can't be added in group anymore ( server return error "A task was canceled" when add that connection to group).

Repro:
1). We can use SignalR sample HubConnectionAPI, update client to join group e.g. group++1 after connection start
2). Request about 9 clients ( 3 webSockets, 3 foreverFrame, 3 serverSentEvents)
3). Add space in the app web.cofig and save it, then clients will reconnect

Actual result:
Many times some webSockets connection become not in the group in server after reconnect, serverSentEvents connection also had repro too.

tracing:
Trace_Issue#2207.zip in https://skydrive.live.com/?cid=7230a11e3a3e316b&id=7230A11E3A3E316B%21455

I added trace for DefaultSubscription.cs, in signalr.bus.log.txt we can see that after reconnect, webSockets 9cf410cc-4d41-4ed5-9679-e6179b0afc0e repro, the Key in _cursors become below which is not right for 9cf410cc-4d41-4ed5-9679-e6179b0afc0:

0 h-HubConnectionAPI
1 hc-HubConnectionAPI.a28e8937-a3ca-4947-9bab-6fc520ad0853
2 c-a28e8937-a3ca-4947-9bab-6fc520ad0853
3 ack-a28e8937-a3ca-4947-9bab-6fc520ad0853
4 c-abd685e7-6cd5-48e0-8bf9-81adfc43428b

Note, in tracing:
webSockets 3c56f8ac-737e-448c-bfca-47ba4d42d18c also repro this issue too
webSockets 4addbe64-0492-4166-90ad-d3332b626d57 repro issue #2290

@davidfowl davidfowl was assigned Jul 15, 2013
@davidfowl
Member

@Xiaohongt Try the checksum branch and see if it fixes the issue.

@davidfowl
Member

@Xiaohongt the connection id doesn't change, it's the same connection id across app domain restarts. The point of the change is to add a checksum to the payload that identifies if the app domain has been recycled or not. I just want to verify that the current change fixes the problem.

@Xiaohongt Xiaohongt was assigned Jul 23, 2013
@Xiaohongt
Contributor

verified cursor keys are not messed up when app domain restart

@Xiaohongt Xiaohongt closed this Jul 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment