[Bug 45835] New: Microsoft Office 2010 installer crashes in ' FormatFilesInUseTemplate' custom action due to ' MsiDatabaseIsTablePersistentW' remote handle failure

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Sep 15 06:11:56 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=45835

            Bug ID: 45835
           Summary: Microsoft Office 2010 installer crashes in
                    'FormatFilesInUseTemplate' custom action due to
                    'MsiDatabaseIsTablePersistentW' remote handle failure
           Product: Wine
           Version: 3.16
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: msi
          Assignee: wine-bugs at winehq.org
          Reporter: focht at gmx.net
      Distribution: ---

Hello folks,

one of the cases mentioned by Dmitry here:

https://bugs.winehq.org/show_bug.cgi?id=45208#c18

--- quote ---
It's probably worth to at least add FIXMEs for the remaining cases when
msihandle2msiinfo() fails, there are still a few cases in MSI code that
don't handle remote handles. Even if not supporting remote handles in
those cases is probably correct behavior, until there's a definitive
test case it would be helpful.
--- quote ---

--- snip ---
006f:trace:msi:ACTION_CustomAction Handling custom action
L"FormatFilesInUseTemplate" (41 L"OCFXCA" L"FormatFilesInUseTemplate") 
...
006f:trace:msi:HANDLE_CustomType1 Calling function L"FormatFilesInUseTemplate"
from L"C:\\users\\focht\\Temp\\msi1457.tmp" 
...
0088:trace:msi:__wine_msi_call_dll_function
{c8004b62-eb13-4455-8ecd-d2449b882195} 
...
0088:trace:msi:alloc_msi_remote_handle 5 -> 1
0088:trace:msi:__wine_msi_call_dll_function calling "FormatFilesInUseTemplate" 
...
0088:Call msi.MsiGetActiveDatabase(00000001) ret=1003cc21
0088:trace:msi:MsiGetActiveDatabase (1)
...
0086:trace:msi:MsiGetActiveDatabase (1) 
...
0088:trace:msi:alloc_msi_remote_handle 0 -> 2
0088:Ret  msi.MsiGetActiveDatabase() retval=00000002 ret=1003cc21
0088:Call ntdll.RtlFreeHeap(00580000,00000000,00580e90) ret=100263bc
0088:Ret  ntdll.RtlFreeHeap() retval=00000001 ret=100263bc
0088:Call msi.MsiDatabaseIsTablePersistentW(00000002,0056fcb0 L"Error")
ret=1003cd5e
0088:trace:msi:MsiDatabaseIsTablePersistentW 2 L"Error"
0088:Ret  msi.MsiDatabaseIsTablePersistentW() retval=00000003 ret=1003cd5e
0088:Call KERNEL32.GetLastError() ret=10027222
0088:Ret  KERNEL32.GetLastError() retval=000000cb ret=10027222
0088:Call KERNEL32.GetLastError() ret=10027222
0088:Ret  KERNEL32.GetLastError() retval=000000cb ret=10027222
0088:Call KERNEL32.RaiseException(e06d7363,00000001,00000003,0056f820)
ret=10025a4e
0088:trace:seh:raise_exception code=e06d7363 flags=1 addr=0x7b4473c3
ip=7b4473c3 tid=0088
0088:trace:seh:raise_exception  info[0]=19930520
0088:trace:seh:raise_exception  info[1]=0056f948
0088:trace:seh:raise_exception  info[2]=1004d798
0088:trace:seh:raise_exception  eax=7b435899 ebx=00000000 ecx=00000000
edx=0056f80c esi=0056f80c edi=0056f7d0
0088:trace:seh:raise_exception  ebp=0056f7a8 esp=0056f744 cs=560023 ds=56002b
es=f7bb002b fs=f7bb0063 gs=f7bb006b flags=00000216
0088:trace:seh:call_stack_handlers calling handler at 0x1004a6f9 code=e06d7363
flags=1 
...
0088:Call KERNEL32.MultiByteToWideChar(0000fde9,00000000,00580f38
"MsiDatabaseIsTablePersistentW call failed. An invalid handle or invalid
parameter is passed to the function.",0000006c,00580fb0,000000da) ret=1003c583 
...
0088:Call KERNEL32.RaiseException(e06d7363,00000001,00000003,0056ee48)
ret=10025a4e
0088:trace:seh:raise_exception code=e06d7363 flags=1 addr=0x7b4473c3
ip=7b4473c3 tid=0088
0088:trace:seh:raise_exception  info[0]=19930520
0088:trace:seh:raise_exception  info[1]=0056ef80
0088:trace:seh:raise_exception  info[2]=1004d798
0088:trace:seh:raise_exception  eax=7b435899 ebx=00000006 ecx=00000000
edx=0056ee34 esi=0056ee34 edi=0056ee00
0088:trace:seh:raise_exception  ebp=0056edd8 esp=0056ed74 cs=560023 ds=3230002b
es=56002b fs=f7bb0063 gs=57006b flags=00000216 
...
Unhandled exception: C++ exception(object = 0x0056ef80, type = 0x1004d798) in
32-bit code (0x7b4473c3).
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:7b4473c3 ESP:0056ed74 EBP:0056edd8 EFLAGS:00000216(   - --  I   -A-P- )
 EAX:7b435899 EBX:00000006 ECX:00000000 EDX:0056ee34
 ESI:0056ee34 EDI:0056ee00
...
Backtrace:
=>0 0x7b4473c3 RaiseException+0x7f()
[/home/focht/projects/wine/mainline-src/dlls/kernel32/except.c:85] in kernel32
(0x0056edd8)
  1 0x7bc815f7 relay_call+0x3e() in ntdll (0x0056ee10)
  2 0x7b433528 in kernel32 (+0x13527) (0x0056ee54)
  3 0x10025a4e in msi1457.tmp (+0x25a4d) (0x0056ee54)
  4 0x1003d028 in msi1457.tmp (+0x3d027) (0x0056f09c)
  5 0x1003b8bd in msi1457.tmp (+0x3b8bc) (0x0056f120)
  6 0x1001a9c7 in msi1457.tmp (+0x1a9c6) (0x0056fcf8)
  7 0x7e915154 custom_proc_wrapper+0xb() in msi (0x0056fd08)
  8 0x7e91542f __wine_msi_call_dll_function+0x2d8()
[/home/focht/projects/wine/mainline-src/dlls/msi/custom.c:559] in msi
(0x0056fe68)
  9 0x7bc815f7 relay_call+0x3e() in ntdll (0x0056fe9c)
  10 0x7e8efec8 in msi (+0xfec7) (0x0056fed8)
  11 0x7efed626 custom_action_thread+0x44()
[/home/focht/projects/wine/mainline-src/programs/msiexec/msiexec.c:406] in
msiexec (0x0056fed8)
  12 0x7bc978cc call_thread_func_wrapper+0xb() in ntdll (0x0056feec)
  13 0x7bc97932 call_thread_func+0x63()
[/home/focht/projects/wine/mainline-src/dlls/ntdll/signal_i386.c:2654] in ntdll
(0x0056ffdc)
  14 0x7bc978be call_thread_entry+0x9() in ntdll (0x0056ffec)
0x7b4473c3 RaiseException+0x7f
[/home/focht/projects/wine/mainline-src/dlls/kernel32/except.c:85] in kernel32:
addl    $12,%esp
85        RtlRaiseException( &record );
Modules:
Module    Address            Debug info    Name (78 modules)
PE    10000000-1005d000    Export          msi1457.tmp
ELF    7b400000-7b7f4000    Dwarf           kernel32<elf>
  \-PE    7b420000-7b7f4000    \               kernel32
ELF    7bc00000-7bd10000    Dwarf           ntdll<elf>
  \-PE    7bc30000-7bd10000    \               ntdll
ELF    7c000000-7c004000    Deferred        <wine-loader>
...
Threads:
process  tid      prio (all id:s are in hex)
...
00000058 ose.exe
    0000007e    0
    0000007d    0
    0000007c    0
    00000077    0
    0000005a    0
    00000059    0
...
00000064 setup.exe
    00000087    0
    00000086    0
    00000085    0
    00000084    0
    0000007f    0
    0000006f    0
    00000065    0
00000080 (D) C:\windows\system32\msiexec.exe
    00000088    0 <==
    00000081    0 
--- snip ---

Debugger session:

--- snip ---
$ MsiBreak=FormatFilesInUseTemplate wine ./setup.exe

...

$ winedbg
Wine-dbg>info process
 pid      threads  executable (all id:s are in hex)
 00000069 6        'ose00001.exe'
 00000057 5        'setup.exe'
 00000078 2        \_ 'msiexec.exe'
 00000049 2        'msiexec.exe'
 00000052 1        \_ 'winedbg.exe'
 00000023 4        'explorer.exe'
 0000000e 5        'services.exe'
 0000001e 4        \_ 'winedevice.exe'
 00000019 3        \_ 'plugplay.exe'
 00000011 4        \_ 'winedevice.exe'

Wine-dbg>attach 0x78 

Wine-dbg>b MsiDatabaseIsTablePersistentW
0083:fixme:dbghelp_dwarf:dwarf2_parse_const_type Unsupported children
Breakpoint 1 at 0x7e94489f MsiDatabaseIsTablePersistentW
[/home/focht/projects/wine/mainline-src/dlls/msi/msiquery.c:1136] in msi

Wine-dbg>c

Stopped on breakpoint 1 at 0x7e94489f MsiDatabaseIsTablePersistentW
[/home/focht/projects/wine/mainline-src/dlls/msi/msiquery.c:1136] in msi
MsiDatabaseIsTablePersistentW () at
/home/focht/projects/wine/mainline-src/dlls/msi/msiquery.c:1136
1136    {
Wine-dbg>bt
Backtrace:
=>0 0x7e94489f MsiDatabaseIsTablePersistentW()
[/home/focht/projects/wine/mainline-src/dlls/msi/msiquery.c:1136] in msi
(0x0056fa84)
  1 0x1001a66d in msi6fa2.tmp (+0x1a66c) (0x0056fd28)
  2 0x7e915154 custom_proc_wrapper+0xb() in msi (0x0056fd38)
  3 0x7e91542f __wine_msi_call_dll_function+0x2d8()
[/home/focht/projects/wine/mainline-src/dlls/msi/custom.c:559] in msi
(0x0056fe98)
  4 0x7efed626 custom_action_thread+0x44()
[/home/focht/projects/wine/mainline-src/programs/msiexec/msiexec.c:406] in
msiexec (0x0056fed8)
  5 0x7bc978cc call_thread_func_wrapper+0xb() in ntdll (0x0056feec)
  6 0x7bc97932 call_thread_func+0x63()
[/home/focht/projects/wine/mainline-src/dlls/ntdll/signal_i386.c:2654] in ntdll
(0x0056ffdc)
  7 0x7bc978be call_thread_entry+0x9() in ntdll (0x0056ffec)
Wine-dbg>n
1140        TRACE("%x %s\n", hDatabase, debugstr_w(szTableName));
Wine-dbg>n
1140        TRACE("%x %s\n", hDatabase, debugstr_w(szTableName));
Wine-dbg>n
1142        db = msihandle2msiinfo( hDatabase, MSIHANDLETYPE_DATABASE );
Wine-dbg>n
1143        if( !db )
Wine-dbg>n
1147            if (!(remote = msi_get_remote(hDatabase)))
Wine-dbg>n
1147            if (!(remote = msi_get_remote(hDatabase)))
Wine-dbg>n
1148                return MSICONDITION_ERROR;
Wine-dbg>
--- snip ---

https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/msi/msiquery.c#l1134

$ wine --version
wine-3.16

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list