WineHQ
Bug Tracking Database – Bug 35166

 Bugzilla

 

Last modified: 2021-07-25 14:39:41 UTC  

NVIDIA CUDA Toolkit v5.5 installer fails (NtQueryKey with KeyNameInformation info class unsupported on server side)

Bug 35166 - NVIDIA CUDA Toolkit v5.5 installer fails (NtQueryKey with KeyNameInformation info class unsupported on server side)
NVIDIA CUDA Toolkit v5.5 installer fails (NtQueryKey with KeyNameInformation ...
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: wineserver
1.7.8
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
https://web.archive.org/web/201404102...
: download, Installer
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-12-18 16:06 UTC by Anastasius Focht
Modified: 2021-07-25 14:39 UTC (History)
0 users

See Also:
Regression SHA1:
Fixed by SHA1: 56aa5d8a5f805fb21c9d91a0cc945351a8b78acf
Distribution: ---
Staged patchset:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anastasius Focht 2013-12-18 16:06:32 UTC
Hello folks,

with bug 35144 fixed the installer still fails.

The installer is wrapped. Let it unpack first and then CTRL+C when the error dialog box is shown for easier reproducing.
Run the extracted main installer.

Relevant part of trace log:

--- snip ---
$ pwd
/home/focht/.wine/drive_c/NVIDIA/CUDA

$ WINEDEBUG=+tid,+seh,+relay,+server wine ./setup.exe >>log.txt 2>&1
...

0023:Call advapi32.RegOpenKeyExW(80000002,011e0f10 L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{2DA75DC7-0865-4BAD-BA86-074500CC350E}",00000000,00000001,01f6e1dc) ret=101ba81a
0023: open_key( parent=001c, access=00000001, attributes=00000000, name=L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{2DA75DC7-0865-4BAD-BA86-074500CC350E}" )
0023: open_key() = 0 { hkey=00ac }
0023:Ret  advapi32.RegOpenKeyExW() retval=00000000 ret=101ba81a
...
0023:Call KERNEL32.LoadLibraryW(00149068 L"C:\\windows\\system32\\NTDLL.DLL") ret=101aa158
0023:Ret  KERNEL32.LoadLibraryW() retval=7bc10000 ret=101aa158
0023:Call KERNEL32.GetProcAddress(7bc10000,10258070 "NtQueryKey") ret=101a9d6f
0023:Ret  KERNEL32.GetProcAddress() retval=7bc21f68 ret=101a9d6f
...
0023:Call ntdll.NtQueryKey(000000ac,00000003,00000000,00000000,01f6e20c) ret=101cee1c
0023: enum_key( hkey=00ac, index=-1, info_class=3 )
0023: enum_key() = INVALID_PARAMETER { subkeys=0, max_subkey=0, max_class=0, values=0, max_value=0, max_data=0, modif=0, total=0, namelen=0, name=L"", class=L"" }
0023:Ret  ntdll.NtQueryKey() retval=c000000d ret=101cee1c
0023:Call advapi32.LsaNtStatusToWinError(c000000d) ret=101bbfc4
0023:Ret  advapi32.LsaNtStatusToWinError() retval=00000057 ret=101bbfc4
0023:Call ntdll.RtlAllocateHeap(00110000,00000000,00000020) ret=101e2d58
0023:Ret  ntdll.RtlAllocateHeap() retval=00130900 ret=101e2d58
0023:Call KERNEL32.RaiseException(e06d7363,00000001,00000003,01f6e18c) ret=101e6a02
0023:trace:seh:raise_exception code=e06d7363 flags=1 addr=0x7b83a8ef ip=7b83a8ef tid=0023
0023:trace:seh:raise_exception  info[0]=19930520
0023:trace:seh:raise_exception  info[1]=01f6e1a8
0023:trace:seh:raise_exception  info[2]=102bc340
0023:trace:seh:raise_exception  eax=7b826921 ebx=7b8ba000 ecx=19930520 edx=01f6e0d4 esi=01f6e178 edi=01f6e140
0023:trace:seh:raise_exception  ebp=01f6e118 esp=01f6e0b4 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00000283
0023:trace:seh:call_stack_handlers calling handler at 0x10207179 code=e06d7363 flags=1
...
0023:Call KERNEL32.OutputDebugStringW(0251d608 L"     46.115 |    ERROR: [NVI2.NVInstaller] 2173@CNVInstaller::AddInstalledPackages : COM error: Exception {0x80070057; File: Registry.cpp; Line: 1086}. \n") ret=1001aa05
0023:Ret  KERNEL32.OutputDebugStringW() retval=01f6d810 ret=1001aa05 
--- snip ---

The strange thing is that the client side code (ntdll) really looks like it supports 'KeyNameInformation' info class in enumerate_key():

Source: http://source.winehq.org/git/wine.git/blob/97645d7a1a9eec6100c637534620ac6811622794:/dlls/ntdll/reg.c#l206

--- snip ---
 211 static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS info_class,
212                void *info, DWORD length, DWORD *result_len )
213
214 {
215     NTSTATUS ret;
216     void *data_ptr;
217     size_t fixed_size;
218
219     switch(info_class)
220     {
221     case KeyBasicInformation: data_ptr = ((KEY_BASIC_INFORMATION *)info)->Name; break;
222     case KeyFullInformation: data_ptr = ((KEY_FULL_INFORMATION *)info)->Class; break;
223     case KeyNodeInformation: data_ptr = ((KEY_NODE_INFORMATION *)info)->Name; break;
224     case KeyNameInformation: data_ptr = ((KEY_NAME_INFORMATION *)info)->Name; break;
225     default:
226         FIXME( "Information class %d not implemented\n", info_class );
227         return STATUS_INVALID_PARAMETER;
228     }
229     fixed_size = (char *)data_ptr - (char *)info;
230
231     SERVER_START_REQ( enum_key )
232     {
233         req->hkey = wine_server_obj_handle( handle );
234         req->index = index;
235         req->info_class = info_class;
236         if (length > fixed_size) wine_server_set_reply( req, data_ptr, length - fixed_size );
237         if (!(ret = wine_server_call( req )))
238         {
239             switch(info_class)
240             {
...
288             case KeyNameInformation:
289                 {
290                     KEY_NAME_INFORMATION keyinfo;
291                     fixed_size = (char *)keyinfo.Name - (char *)&keyinfo;
292                     keyinfo.NameLength = reply->namelen;
293                     memcpy( info, &keyinfo, min( length, fixed_size ) );
294                 }
295                 break;
296             }
297             *result_len = fixed_size + reply->total;
298             if (length < *result_len) ret = STATUS_BUFFER_OVERFLOW;
299         }
300     }
301     SERVER_END_REQ;
302     return ret;
303 }
--- snip ---

If we take a look at the server side ... surprise:

Source: http://source.winehq.org/git/wine.git/blob/ea919d9de483223777948422e5c134bd73791ba0:/server/registry.c#l863

--- snip ---
864 static void enum_key( const struct key *key, int index, int info_class,
865                        struct enum_key_reply *reply )
866 {
...
886     switch(info_class)
887     {
888     case KeyBasicInformation:
889         classlen = 0; /* only return the name */
890         /* fall through */
891     case KeyNodeInformation:
...
897     case KeyFullInformation:
...
919     default:
920         set_error( STATUS_INVALID_PARAMETER );
921         return;
922     }
...
--- snip ---

The server needs to support KeyNameInformation info class.

$ sha1sum cuda_5.5.20_winxp_general_32.exe 
19003fc955795e1a0d01d3e72b2df91c109d1e43  cuda_5.5.20_winxp_general_32.exe

$ du -sh cuda_5.5.20_winxp_general_32.exe
460M	cuda_5.5.20_winxp_general_32.exe

$ wine --version
wine-1.7.8-258-g15b3ff2

Regards
Comment 1 Nikolay Sivov 2013-12-19 02:03:14 UTC
After that fixed it complains about Visual Studio not installed, and that's certainly a valid complaint for my prefix.

http://www.winehq.org/pipermail/wine-patches/2013-December/129042.html
Comment 2 Anastasius Focht 2013-12-19 13:44:53 UTC
Hello folks,

this is fixed by commit http://source.winehq.org/git/wine.git/commitdiff/56aa5d8a5f805fb21c9d91a0cc945351a8b78acf

Thanks Nikolay

--- snip ---
$ pwd
/home/focht/.wine/drive_c/NVIDIA/CUDA

$ WINEDEBUG=+tid,+seh,+relay wine ./setup.exe >>log.txt 2>&1
...
0025:Call advapi32.RegOpenKeyExW(80000002,011edce8 L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{2DA75DC7-0865-4BAD-BA86-074500CC350E}",00000000,00000001,01f7e1dc) ret=101ba81a
0025:Ret  advapi32.RegOpenKeyExW() retval=00000000 ret=101ba81a
...
0025:Call KERNEL32.LoadLibraryW(00149068 L"C:\\windows\\system32\\NTDLL.DLL") ret=101aa158
0025:Ret  KERNEL32.LoadLibraryW() retval=7bc10000 ret=101aa158
0025:Call KERNEL32.GetProcAddress(7bc10000,10258070 "NtQueryKey") ret=101a9d6f
0025:Ret  KERNEL32.GetProcAddress() retval=7bc21f68 ret=101a9d6f
...
0025:Call ntdll.NtQueryKey(000000ac,00000003,00000000,00000000,01f7e20c) ret=101cee1c
0025:Ret  ntdll.NtQueryKey() retval=80000005 ret=101cee1c
0025:Call advapi32.LsaNtStatusToWinError(80000005) ret=101bbfc4
0025:Ret  advapi32.LsaNtStatusToWinError() retval=000000ea ret=101bbfc4
0025:Call ntdll.RtlAllocateHeap(00577000,00000008,00000050) ret=101f1268
0025:Ret  ntdll.RtlAllocateHeap() retval=02527158 ret=101f1268
0025:Call ntdll.NtQueryKey(000000ac,00000003,02527158,00000050,01f7e20c) ret=101cee1c
0025:Ret  ntdll.NtQueryKey() retval=00000000 ret=101cee1c
...
0025:Call KERNEL32.GetLastError() ret=10057aaa
0025:Ret  KERNEL32.GetLastError() retval=00000000 ret=10057aaa
0025:Call advapi32.RegCloseKey(000000ac) ret=100579ea
0025:Ret  advapi32.RegCloseKey() retval=00000000 ret=100579ea
...
--- snip ---

$ wine --version
wine-1.7.8-278-g53dc001

Regards
Comment 3 Alexandre Julliard 2013-12-20 12:43:46 UTC
Closing bugs fixed in 1.7.9.
Comment 4 Alexandre Julliard 2014-01-10 14:46:47 UTC
Removing 1.6.x milestone from bugs included in 1.6.2.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers