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
http://bugs.winehq.org/show_bug.cgi?id=29905
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25462 Depends on| |29354, 10601
--- Comment #1 from Anastasius Focht focht@gmx.net 2012-02-15 15:39:04 CST --- Hello,
filling fields.
Regards
http://bugs.winehq.org/show_bug.cgi?id=29905
--- Comment #2 from Vitaliy Margolen vitaliy-bugzilla@kievinfo.com 2012-02-15 21:46:26 CST --- Created attachment 38899 --> http://bugs.winehq.org/attachment.cgi?id=38899 0001-server-Add-sessions-directory-and-0-session-symlink.patch
Something like this should work.
http://bugs.winehq.org/show_bug.cgi?id=29905
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #3 from Anastasius Focht focht@gmx.net 2012-02-16 14:29:35 CST --- Hello Vitaliy,
--- quote --- Something like this should work. --- quote ---
yes, the named objects (shared memory mappings) are created/opened in "session" namespace.
Regards
http://bugs.winehq.org/show_bug.cgi?id=29905
--- Comment #4 from Anastasius Focht focht@gmx.net 2012-02-16 16:09:35 CST --- Hello,
unfortunately I had WinVer still set to "Windows 2000", hence it worked due to fallback.
With "XP" mode (default) it still fails.
--- snip --- 0009:Call KERNEL32.CreateFileMappingW(ffffffff,0032e604,00000004,00000000,0000003c,0032e610 L"Session\0\Microsoft_VS90_causality_sharedmemory-68") ret=3f089149 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-68"} ) 0009: create_mapping() = OBJECT_PATH_NOT_FOUND { handle=0000 } 0009:Ret KERNEL32.CreateFileMappingW() retval=00000000 ret=3f089149 --- snip ---
The "Sessions" directory and symlinks are there.
You can use the very useful object manager namespace viewer "winobj" from "sysinternals" to peek into wineserver at runtime.
http://technet.microsoft.com/en-us/sysinternals/bb896657
Running "winobj" on Windows (>=XP) might give some insight how the session directories/symlinks/objects are organized.
Regards
http://bugs.winehq.org/show_bug.cgi?id=29905
Vitaliy Margolen vitaliy-bugzilla@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #38899|0 |1 is obsolete| |
--- Comment #5 from Vitaliy Margolen vitaliy-bugzilla@kievinfo.com 2012-02-16 22:09:17 CST --- Created attachment 38918 --> http://bugs.winehq.org/attachment.cgi?id=38918 0001-server-Add-sessions-directory-and-0-session-symlink.patch
Oh I see why it didn't work. "\BaseNamedObjects\Session" should point to "\Sessions". Here is a new version.
PS. Yeah, I know winobj very well. It's been part of my toolkit for a number of years.
http://bugs.winehq.org/show_bug.cgi?id=29905
--- Comment #6 from Anastasius Focht focht@gmx.net 2012-02-17 01:29:46 CST --- Hello Vitaliy,
yes it works now. "winobj" shows the section objects in "BaseNamedObjects".
Regards
http://bugs.winehq.org/show_bug.cgi?id=29905
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |d4e78d61e1dde09c1faa6aa057c | |1ebdb99de30d0 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #7 from Austin English austinenglish@gmail.com 2012-02-17 14:01:20 CST --- (In reply to comment #6)
Hello Vitaliy,
yes it works now. "winobj" shows the section objects in "BaseNamedObjects".
Regards
http://source.winehq.org/git/wine.git/commitdiff/d4e78d61e1dde09c1faa6aa057c...
http://bugs.winehq.org/show_bug.cgi?id=29905
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org 2012-02-24 12:48:46 CST --- Closing bugs fixed in 1.4-rc5.
https://bugs.winehq.org/show_bug.cgi?id=29905 Bug 29905 depends on bug 10601, which changed state.
Bug 10601 Summary: Microsoft .NET Framework: GAC API for managed assembly installation needs reparse point/junction API support (.NET Framework 2.0, 3.0, 4.0 installers and other apps that make use of GAC API) https://bugs.winehq.org/show_bug.cgi?id=10601
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE
https://bugs.winehq.org/show_bug.cgi?id=29905
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://web.archive.org/web | |/20200226201149/http://down | |load.microsoft.com/download | |/8/1/d/81d3f35e-fa03-485b-9 | |53b-ff952e402520/VS2008ProE | |dition90dayTrialENUX1435622 | |.iso Keywords| |download