http://bugs.winehq.org/show_bug.cgi?id=33642
Bug #: 33642 Summary: Microsoft SQL Server Management Studio Express 2005: restarting SQL server fails randomly Product: Wine Version: 1.5.30 Platform: x86 URL: http://www.microsoft.com/download/en/details.aspx?id=8 961 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wmi&wbemprox AssignedTo: wine-bugs@winehq.org ReportedBy: djelinski1@gmail.com Classification: Unclassified
Now that Bug #33607 is out of the way, it is possible to restart SQL Server service. The application first stops the service, then checks if it is stopped, and if it is, tries to start it. Starting the service quite often throws an exception, and stack trace reported by the application points to wbemprox.
From the initial investigation it seems to me that calling StartService
temporarily invalidates all existing instances of the service object. Here one thread tries to get SystemName property from the object while another thread tries to restart the service, and getting property throws an exception.
Relevant pieces of +wbemprox,+seh,+tid trace:
0057:trace:wbemprox:wbem_services_GetObject 0x46cad18, L"Win32_Service.Name="MSSQLSERVER"", 0x00000000, (nil), 0xe45dab0, (nil) ... 0057:trace:wbemprox:create_class_object returning iface 0x472eda0 0057:trace:wbemprox:class_object_Get ((nil)) 0x472eda0, L"__PATH", 00000000, 0xe45dc28, 0xe45dd0c, 0xe45dd08 0057:fixme:ole:Context_QueryInterface interface not implemented {51372ae0-cae7-11cf-be81-00aa00a2fa25} 0057:trace:wbemprox:class_object_Get ((nil)) 0x472eda0, L"State", 00000000, 0xe45dc74, 0x1691a54, 0x1691a58 ... 0057:trace:wbemprox:class_object_Get ((nil)) 0x472eda0, L"StartMode", 00000000, 0xe45dd14, 0x1691ec8, 0x1691ecc ... 002f:trace:wbemprox:class_object_Get ((nil)) 0x472eda0, L"SystemName", 00000000, 0x32e380, 0x1696178, 0x169617c 002f:trace:wbemprox:class_object_Get ((nil)) 0x472eda0, L"Name", 00000000, 0x32e37c, 0x16963d8, 0x16963dc ... 0057:trace:wbemprox:wbem_services_ExecMethod 0x46cad18, L"Win32_Service.Name="MSSQLSERVER"", L"StartService", 00000000, (nil), (nil), 0xe45da98, (nil) 0057:trace:wbemprox:grab_table returning 0x7d0b6f90 0057:trace:wbemprox:parse_query wql_parse returned 0 002f:trace:wbemprox:class_object_Get ((nil)) 0x472eda0, L"SystemName", 00000000, 0x32e37c, 0x16965cc, 0x16965d0 002f:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7d0a82c0 ip=7d0a82c0 tid=002f
http://bugs.winehq.org/show_bug.cgi?id=33642
--- Comment #1 from Daniel Jelinski djelinski1@gmail.com 2013-06-04 23:45:23 CDT --- Created attachment 44661 --> http://bugs.winehq.org/attachment.cgi?id=44661 script to create prefix used for testing
Still present in wine-1.5.31-179-g2b9649d
For reference I attached the script I use to recreate wine prefix. It assumes that the installers are downloaded to correct locations, so it needs some tweaking before use.
http://bugs.winehq.org/show_bug.cgi?id=33642
--- Comment #2 from Hans Leidekker hans@meelstraat.net 2013-06-05 01:57:44 CDT --- This may work better now.
http://bugs.winehq.org/show_bug.cgi?id=33642
--- Comment #3 from Daniel Jelinski djelinski1@gmail.com 2013-06-05 02:54:25 CDT --- Hello Hans, Thanks for looking into this. Unfortunately, the recent commits in wbemprox didn't help. Comment 1 above referred to version with "wbemprox: Add a function to resize a table" and "wbemprox: Rewrite IWbemServices::ExecMethod with low-level functions so we can reuse the object instance" already applied. Also, sometimes restarting does not throw exception, but instead shows garbage in place of system name and service name.
http://bugs.winehq.org/show_bug.cgi?id=33642
--- Comment #4 from Daniel Jelinski djelinski1@gmail.com 2013-06-07 16:15:41 CDT --- Traced this one. Basically one thread attempts read data from table just after another thread (calling StopService) clears the table. Since the table is shared between all objects of the same type, this fails. Global variables causing trouble again...
https://bugs.winehq.org/show_bug.cgi?id=33642
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
--- Comment #5 from Austin English austinenglish@gmail.com --- This is your friendly reminder that there has been no bug activity for over a year. Is this still an issue in current (1.7.37 or newer) wine? If so, please attach the terminal output in 1.7.37 (see http://wiki.winehq.org/FAQ#get_log).