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
Fix x86 packing issues in System.Data.OleDb #33899
Conversation
src/libraries/System.Data.OleDb/src/ArchitectureSpecificHelpers.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Data.OleDb/src/ArchitectureSpecificHelpers.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Data.OleDb/src/ArchitectureSpecificHelpers.cs
Outdated
Show resolved
Hide resolved
@FreddyD-GH The direction looks good. @jader1313 had mentioned these
And you had mentioned a test case at #32509 (comment) |
cc @jkotas @maryamariyan |
Also @FreddyD-GH Can you look at the pipeline for the failures. There is inline initialization of static members and an issue with formatting of OleDbDataReader.cs
|
@saurabh500 I have no objections to your changes. However, I do not have all the prerequisites in my environment to build the entire project, so I basically have a smaller project that I can compile and I just copied the changes over. I'm not very well-versed on what Github offers, but would there be an easy way for you to just pickup what I have done and make the necessary changes, so that you can confirm it actually builds properly using your build system? |
@FreddyD-GH Sounds good. I will take this forward. |
Also thanks for the contribution. Much appreciated. |
Fix formatting
As far as the tests, it's a similar issue, but my tests don't convert over easily. For the tests, I had the one in #32509 for the OleDbConnectionStringBuilder. It looks like there is already a test for For using (OleDbConnection connection = new OleDbConnection(connStr))
{
connection.Open();
string db = connection.Database;
string ver = connection.ServerVersion;
} |
src/libraries/System.Data.OleDb/src/ArchitectureSpecificHelpers.cs
Outdated
Show resolved
Hide resolved
Not to get ahead of myself, but is there anything special that needs to be done to mark this PR along with #32207 as a servicing candidate? The x86 packing problems should be completely resolved with these changes. |
The servicing changes need to be taken to the respective servicing branch in the dotnet/corefx repo and then tagged with the appropriate tag to have an offline review initiated. |
Mono failure is known issue #32377 |
I have added the tests to this PR and run the tests on my dev machine in x86 configuration. @FreddyD-GH The CI is running tests only on x64 configuration. This is because there were unexpected exceptions when ACE and JET drivers were installed simultaneously. The CI was modified to install only the x64 driver. Edit: |
@saurabh500 assuming you are considering servicing for this -- it looks like the cutoff for 3.1.4 (may) is 4/14 so I'd bring it no later than a few days earlier. Of course if you service, the more folks on this issue that can consume the bits out of master and verify they are good, the more likely they are to feel comfortable about approving it |
@danmosemsft I will target sending the servicing PR by 4/2 i.e. Thursday next week, so that there is some time for validations from the consumers of System.Data.OleDb to build confidence in the change. The servicing PR will have changes from #32207 and from this PR. @jader1313 @FreddyD-GH @lauxjpn can you folks try the nightly feed and see if the binaries with this change fixes the issues. More details in the comment at #981 (comment) |
@saurabh500 I can confirm that the EFCore.Jet test suite of about 15K tests (and configured to use OLE DB) now runs without crash inside an x86 process with the latest preview ( |
@saurabh500 I just tried on a project that I tried to convert to .NET Core many months ago and I can confirm that it finally works on x86 as well (using ACE/Jet driver). Also, someone (that I believe was from Microsoft) posted this link more recently for the nightly NuGet package feed: https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet5/nuget/v3/index.json Perhaps the dotnet/runtime repo docs could be updated to make the correct nightly build feed more discoverable? I don't think that it'd be too crazy to have a small docs section for "Nightly Builds" or even something as simple as: https://github.com/FreddyD-GH/runtime/commit/5ee341c5e44fb06efaedc3c54b4638f90e77b843?diff=split. I know that, for me, when you guys first mentioned a nightly package feed, I found it super-difficult to find an actual URL of the feed mentioned anywhere. |
Hooray for the positive validation. Have you guys verified that x64 is still working fine? @FreddyD-GH could you throw up a quick PR with that Readme edit and we can have the right person confirm that's the appropriate feed? |
@danmosemsft I can confirm that x64 is working exactly in our tests as before. (I wouldn't go so far to say it's working fine though. It still suffers from |
@danmosemsft I can also confirm that in my other project, both .NET Core x86 and x64 run without issues. I have also started the requested PR here: #34241 @danmosemsft @saurabh500 My understanding is that your primary goal with the libraries like System.Data.OleDb is to align .NET Core with the behavior of .NET Framework. So, if the issue that @lauxjpn mentions happens on both .NET Core and .NET Framework, do you think anyone would actually take action if we filed a new issue for it on dotnet/runtime? The issue is still non-deterministic, but @lauxjpn has done a good job of isolating the bug and making it reproducible. |
Thanks for the validations. I will start on the servicing PR. @FreddyD-GH
If you find an issue please file it. I will look into it. |
@saurabh500 Did this ever PR (and #32207) ever make it to servicing? I didn't see it in the other repo. Sounds like it may have missed the April 10-15 deadline, which would be unfortunate. |
@saurabh500 What is the status on this making it into a servicing release of 3.1?
|
Well, with .NET 5 being released tomorrow, I guess we will now be able to use the 5.0 version of While the .NET 5.0 release of I would really like to know what happened there. /cc @danmosemsft |
@lauxjpn I think the problem was is that ownership of this moved to the team of @ajcvickers since this PR was closed, and he was not tagged on this closed PR so he didn't see it. I was tagged, but didn't notice - sorry about that. As a general rule you can find the owners of an area here https://github.com/dotnet/runtime/blob/master/docs/area-owners.md and tag them directly. Also it often helps to open a new issue, rather than post on a closed PR or issue. Still, we should have noticed. |
@danmosemsft I had no idea that Arthur is in charge now. This might make the Thanks for the link about the area owner page. Might become handy in the future. |
@lauxjpn Bit swamped right now, but let's get together with @roji and @JeremyLikness about this specifically, but also how you are using OleDb generally and with EF Core. |
@ajcvickers Yeah, that is a good idea. I am currently also more concentrated on our Pomelo release for EF Core 5 than our Jet release for EF Core 3.1. How is next month for you? The immediate issue we had here is resolved with the 5.0 release anyway (though there remain other OLE DB, ODBC, ADO and DAO related issues, but not all necessarily reported yet). |
@lauxjpn Next month would be great. I'll keep a note on my backlog. |
@ajcvickers Can you get me in touch with someone who maintains the Jet/Access ODBC driver/provider? |
@lauxjpn My team owns the ADO.NET providers for OleDb and ODBC. That being said, we are not experts in this area and these providers are basically in maintenance mode. My understanding is that there are many inconsistences and unsupported scenarios for these providers, and at first glance this looks like something that isn't supported by ODBC. It's not totally inconceivable that we could take a PR to add support, but it would need to be driven by the community and would need to be non-breaking for existing apps. |
@ajcvickers I believe the issue is one or two levels down the rabbit hole, either in the native ODBC implementation or in the Jet ODBC driver. It's not so much that we want to fix it, its more a question of, whether we missed something or there exists an option that is not documented. The things we are interested in in regards to the Jet ODBC driver are:
|
@lauxjpn Let's get on a call and discuss this and ODBC in general. Can you email with availability for next week, or whenever works for you? /cc @JeremyLikness @roji @bricelam |
Fixes #32509
The PR fixes the remaining structure packing problems when running in an x86 process, building upon the work done in #32207. This PR resolves the remaining issues by duplicating the classes in question, but changing the pack to 2 instead of 8. A common interface is also added to both the duplicated and original classes, so that references can be passed around in an architecture-neutral manner.
Edit: this PR has been submitted at the request of @saurabh500.