http://bugs.winehq.org/show_bug.cgi?id=29905
Bug #: 29905 Summary: Microsoft Visual Studio 2008: attaching to process fails with "unknown error: 0x80070003" (support of "Session" namespace for named objects needed) Product: Wine Version: 1.4-rc3 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: wineserver AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net Classification: Unclassified
Hello,
prerequisite: 'winetricks -q dotnet30'
Unfortunately for installation of Visual Studio 2008 Professional/Enterprise editions you have to resort to hacks.
NOTE: Remote debugging capability is not available in Visual Studio 2005/2008 express editions (free for download).
Bug 29354 (installer fails due to ProductID being set during client side "ValidateProductID" standard action -> don't set property)
Bug 10601 (GAC API for managed assembly installation needs reparse point/junction API support -> force msi_install_assembly()/IAssemblyCache_InstallAssembly to succeed on failure)
The installer still fails in the end but it's enough to have a "half" usable IDE/build environment (.NET Framework 3.5 and some .NET service packs get skipped due to Mono registry/fake mess while other components fail to install).
Unlike Visual Studio 2005 which uses wtsapi (bug 29903), Visual Studio 2008 retrieves the process list by different means and displays the process in "standard" transport mode.
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Microsoft Visual Studio 9.0/Common7/IDE
$ wine ./devenv.exe --- snip ---
1) Menu "extras" -> "attach to process" 2) select one process, click "attach"
It starts the debugging environment but fails half-through with "unknown error: 0x80070003"
--- snip --- ... 0082:Call KERNEL32.ProcessIdToSessionId(00000085,0032e5f0) ret=3f083224 0082:Ret KERNEL32.ProcessIdToSessionId() retval=00000001 ret=3f083224 ... 0082:Call KERNEL32.CreateFileMappingW(ffffffff,0032e604,00000004,00000000,0000003c,0032e610 L"Session\0\Microsoft_VS90_causality_sharedmemory-133") ret=3f089149 0082:Ret KERNEL32.CreateFileMappingW() retval=00000000 ret=3f089149 0082:Call KERNEL32.GetLastError() ret=3f08897a 0082:Ret KERNEL32.GetLastError() retval=00000003 ret=3f08897a ... 0082:Call KERNEL32.FormatMessageW(00001300,00000000,80070003,00000400,0032e638,00000000,00000000) ret=3f2b9072 0082:Ret KERNEL32.FormatMessageW() retval=00000000 ret=3f2b9072 ... 0082:Call oleaut32.SysAllocString(03d19b60 L"Der Vorgang wird nicht unterst\00fctzt. Unbekannter Fehler: 0x80070003.") ret=3f247a9f ... --- snip ---
For communication between target and debugger a shared memory location is created. The shared memory (file mapping) is created using a special namespace syntax: "Session\0\Microsoft_VS90_causality_sharedmemory-133"
Wineserver doesn't support "Session<id>" yet, hence CreateFileMappingW() fails.
(another run with +server):
--- snip --- 0009: create_mapping( access=000f000f, attributes=00000080, protect=00000043, size=0000003c, file_handle=0000, objattr={rootdir=0010,sd={control=00000004,owner=<not present>,group=<not present>,sacl={},dacl={{AceType=ACCESS_ALLOWED_ACE_TYPE,Mask=10000000,AceFlags=0,Sid={S-1-5-21-0-0-0-1000}}}},name=L"Session\0\Microsoft_VS90_causality_sharedmemory-18"} ) 0009: create_mapping() = OBJECT_PATH_NOT_FOUND { handle=0000 } --- snip ---
Source: http://source.winehq.org/git/wine.git/blob/ba715798094896e8b98fc5803e16b00fa...
"Kernel Object Namespaces":
http://msdn.microsoft.com/en-us/library/aa382954.aspx
--- quote --- ... In addition to the "Global" prefix, client processes can use the "Local" prefix to explicitly create an object in their session namespace. These keywords are case sensitive.
The "Session" prefix is reserved for system use and you should not use it in names of kernel objects. ...
<user comments>
This documentation effectively states that 'Global', 'Local' and 'Session' are all valid as name prefixes (but not as names).
There appears to be no documentation that says 'Session' cannot be used as a prefix or that it is reserved for use as a prefix.
By referring to 'Session' as it does, it strongly implies that this a fully legal and valid way to enable applications in one session to interact with applications in another session.
I think Microsoft should consider adding more detail about whether 'Session' is or is not valid for use by developers, and if so exactly what it can and cannot be used for.
[user reponse] Global\ refers to the Global Namespace, Local\ refers to the current session's namespace, Session\x\ refers to x's namespace where x is the session id (not LUID or anything special, just a counter) --- quote ---
"Memory mapped files from XP to Vista"
http://blogs.msdn.com/b/maartenb/archive/2008/05/07/memory-mapped-files-from...
--- quote --- ... Online search for "sessions\1\basenamedobject" gives hits that point to Terminal Services. There appear to be Local Global and Session namespaces. So prior to Vista and Server 2008 all services shared the same namespace as the first user logging in to the machine. This was session 0. With Vista this is no longer the case. Just like all compatibility issues it is explained in the cookbook. --- quote ---
There is a workaround for this problem.
You can force a "normal" shared memory mapping name by setting to WinVer to "Windows 2000" prior running the IDE. Some components don't really support running WinVer < "Windows XP" anymore hence this might break some stuff (VS2008 refuses to install with W2K mode).
At least this prevents the error message when attaching. It doesn't really break/pause the remote process (might be bug 25462).
Regards