-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[.NET Core] Event source traces revision - Part 1 & 2 #867
Conversation
71fc2eb
to
6b71c02
Compare
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnection.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlTransaction.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs
Show resolved
Hide resolved
LGTM, it looks better now. |
@cheenamalhotra is there a part 3? i'm working through a diff of some files and it's struck me that this PR has changed netcore but not netfx |
Yes, I'm working on Managed SNI and TDS Parser layers (PR on way..) |
Ok. I'll put an item on my ever-expanding list of things to do. I'm working to try and get as much shared or synced between netfx and netcore so these new changes stand out. Doing a single file at a time would leave the netfx tracing in a bad state so it'll need to be done in a single PR at a later date. |
Ok, thanks for keeping up with that! Please also keep your branches up-to-date and resolve conflicts in case you encounter (hopefully not many, since they're just trace changes). At this point, our primary focus is on solving #659 and #422, and these improvements are helpful in investigations. |
I was going to have a look at #659 over the holiday but was diverted. My thought was to start in the mars connection demultiplexing code and make sure that the lookup was locked/concurrent safe because that was the only way I could think it would be possible to get a packet to the wrong virtual connection. On #422 sadly the answer is that they shouldn't do what they're trying to do. It's a limitation of the way it works and getting around that required platform specific non-threadpool IO. I wrote up a big post on 13th December after I'd spent a few days on it. I'd be happy to talk that through with you if you think it'd help As always, I'll try and avoid conflicts. |
That would be nice! Please check my last comment on #659 maybe it rings a bell to you. it doesn't seem a concurrency issue, it's more due to uncleared information. To cut short, data from first connection is arriving in the "receivedPacketQueue" even after we closed the first connection (sent it to pool) since the physical connection is still active which is dequeued in second connection's query. There should be a cleanup/disposal happening before putting connection to pool (so we don't listen to more packets) or after connection is reactivated (cleanup everything) [I'm still trying to establish this part]. We do perform fResetConnection, so that's not related, because when RESET happens the queue already contains data on the client side. We should be cleaning up MarsHandle or packets which are still connected to StateObj on the connection in pooling. For #422, I have some ideas to try, but we'll come to that after this more serious issue. |
The PR standardizes event source traces with additional info added where applicable like Client Connection Id, SPID, etc. as they're extremely helpful while debugging. I'll be working on all other classes (most importantly .NET Core) including Managed SNI later once this gets merged to avoid conflicts.