[SERVER-6616] Unclear error message with running build with SRW on Windows 2008 Created: 27/Jul/12  Updated: 10/Dec/14  Resolved: 10/Sep/14

Status: Closed
Project: Core Server
Component/s: Usability
Affects Version/s: 2.2.0-rc0
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Sridhar Nanjundeswaran Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Azure osFamily=1 VM which is equivalent to Windows 2008
Download the Windows x64 build with SRW Lock (2008+)


Attachments: PNG File 2008SRWError.PNG    
Issue Links:
Depends
Participants:

 Description   

Run mongod.exe. Expect an error that says this build can only be used with Windows 7/2008 R2 or later. Instead getting a windows dialog which says entry point not found (see attachment).



 Comments   
Comment by Eric Milkie [ 27/Jul/12 ]

The google solution sounds easier, though, I agree. It would be quite a bit of work to implement the hack correctly.

Comment by Tad Marshall [ 27/Jul/12 ]

If the functions we want are listed in the Import Table, then you will get the entry-not-found error when trying to load mongod.exe. If you want to link to something else and then patch the Import Table at runtime, that's what I was thinking of as a "hacky/clever" solution. It could be done if it was felt to be worthwhile.

Comment by Eric Milkie [ 27/Jul/12 ]

We could try dynamically linking the function as a dummy call at startup only, and then use a static link for the actual use calls.

Comment by Tad Marshall [ 27/Jul/12 ]

This can't really be fixed without taking a performance hit, and this build's reason for existing is for high performance. The usual way of solving problems like this is to link to the potentially missing routines on-the-fly by using GetProcAddress, but then every call to any SRW routine will go through an extra indirection. These are inlined throughout the code, so unless we do something hacky/clever we'd take a hit on code bloat and speed. The benefits of a hacky/clever solution would go to the users who are running the wrong build but the cost would go to the people running the right build. It's probably better to just make sure that the expected error message about the entry point is easy to Google for so users don't lose much time over it.

Generated at Thu Feb 08 03:12:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.