Help with stack trace. Wine 1.9.5(Staging)

Questions about Wine on Linux
Locked
ubuntugoat
Newbie
Newbie
Posts: 1
Joined: Sat Mar 12, 2016 12:53 am

Help with stack trace. Wine 1.9.5(Staging)

Post by ubuntugoat »

My .exe crashes after entering a verification code.

I'm trying to understand the stack trace better, in order to fix the remaining problems. Any help is greatly appreciated!
On a side note, I would like to know what PE, ELF mean for modules, and what Deferred, Dwarf mean in the debug info.

I will gladly gather any additional information about my setup, if this is not sufficient.

my setup

Code: Select all

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.4 LTS
Release:	14.04
Codename:	trusty
$ wine --version
wine-1.9.5 (Staging)
the main packages installed:

Code: Select all

$ dpkg --list | grep wine
ii  wine-gecko2.21:amd64                                  2.21-0ubuntu1                                       amd64        Microsoft Windows compatibility layer (embedded web browser)
ii  wine-mono0.0.8                                        0.0.8-0ubuntu1                                      all          Microsoft Windows compatibility layer (.NET compatibility)
ii  wine-staging                                          1.9.5~ubuntu14.04.1                                 amd64        official WineHQ build of the popular Wine software
ii  wine-staging-amd64                                    1.9.5~ubuntu14.04.1                                 amd64        official WineHQ build of the popular Wine software
ii  wine-staging-i386                                     1.9.5~ubuntu14.04.1                                 i386         official WineHQ build of the popular Wine software
ii  winehq-staging                                        1.9.5~ubuntu14.04.1                                 amd64        official WineHQ build of the popular Wine software
ii  winetricks                                            0.0+20140302-0ubuntu2                               all          Microsoft Windows Compatibility Layer (winetricks)
I also fixed some of the more common problems initially with:

Code: Select all

$ sudo apt-get install winbind
$ sudo apt-get install p11-kit-modules:i386 libp11-kit-gnome-keyring:i386

Stack trace:

Code: Select all

myname@mycomputer:~/project$ sudo rm -rf ~/.wine
myname@mycomputer:~/project$ wine MyApp.exe 
wine: created the configuration directory '/home/myname/.wine'
fixme:winediag:start_process Wine Staging 1.9.5 is a testing version containing experimental patches.
fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
err:ole:get_local_server_stream Failed: 80004002
err:ole:marshal_object couldn't get IPSFactory buffer for interface {00000131-0000-0000-c000-000000000046}
err:ole:marshal_object couldn't get IPSFactory buffer for interface {6d5140c1-7436-11ce-8034-00aa006009fa}
err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hres=0x80004002
err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, 80004002
err:ole:get_local_server_stream Failed: 80004002
fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
fixme:dwmapi:DwmIsCompositionEnabled 0x6d88c758
fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0x69e94b5e, context 0x8bd5f0, init_notify 0, handle 0x127e1a0): stub
fixme:ntdll:__syscall_NtLockFile I/O completion on lock not implemented yet
fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0x6a0a6836, context 0x93df48, init_notify 0, handle 0x124e7b4): stub
wine: configuration in '/home/myname/.wine' has been updated.
# --- up until here it seems like wine is simply initializing --- #
# --- below is what happens on every subsequent run      --- #
fixme:ver:GetCurrentPackageId (0xc8ea10 (nil)): stub
IsActivated returned: 1  									        # myapp start initially, and prompts for key.
Enter activation key:										        # I manually enter the key when it prompts,
XX-XX-XX-XX-XX-XX											# and it crashes immediately after correct key is  
key entered: XX-XX-XX-XX-XX-XX								# entered (it potentially tries to make an http request? educated guess.)
fixme:wbemprox:wbem_locator_ConnectServer unsupported flags
fixme:wbemprox:client_security_SetBlanket 0x7f33d5ed2030, 0x23290, 10, 0, (null), 3, 3, (nil), 0x00000000
fixme:wbemprox:client_security_Release 0x7f33d5ed2030
wine: Unhandled page fault on read access to 0xc0000000 at address 0x235b2 (thread 0058), starting debugger...
Unhandled exception: page fault on read access to 0xc0000000 in 64-bit code (0x00000000000235b2).
Register dump:
 rip:00000000000235b2 rsp:0000000000c8e788 rbp:0000000000c8e890 eflags:00010212 (  R- --  I   -A- - )
 rax:00000000c0000000 rbx:0000000000000000 rcx:0000000000c8d6f0 rdx:0000000000000000
 rsi:0000000180000000 rdi:0000000180012a99  r8:0000000000c8e620  r9:00000000c0000005 r10:0000000000c8dbc0
 r11:0000000000000000 r12:0000000000000000 r13:0000000000000003 r14:0000000000000030 r15:00000000000235b2
Stack dump:
0x0000000000c8e788:  00000001800141a1 0000000000000000
0x0000000000c8e798:  0000000000023268 00000000000243dc
0x0000000000c8e7a8:  0000000000000001 0000000000c8e848
0x0000000000c8e7b8:  0000000000000000 0000000000000000
0x0000000000c8e7c8:  0000000000000000 0000000000c8e860
0x0000000000c8e7d8:  0000000000000002 0000000000000038
0x0000000000c8e7e8:  00007f33dc12ad55 0000000300000001
0x0000000000c8e7f8:  0000000000045808 0000000000000000
0x0000000000c8e808:  0000000000c8ec00 fffffffffffffffe
0x0000000000c8e818:  0000000000000000 00000000000487f8
0x0000000000c8e828:  0000000000010020 0000000000047f50
0x0000000000c8e838:  00000000000005e0 0000000000000000
Backtrace:
=>0 0x00000000000235b2 (0x0000000000c8e890)
0x00000000000235b2: sbbl	(%rax),%esi
Modules:
Module	Address					Debug info	Name (109 modules)
PE	          400000-          4e7000	Deferred        myapp
PE	        61440000-        6145a000	Deferred        libgcc_s_seh-1           	# myapp dll (1 of 3)
PE	        63600000-        63614000	Deferred        libgomp-1 					# myapp dll (2 of 3)
PE	        64940000-        6495b000	Deferred        libwinpthread-1 			# myapp dll (3 of 3)
ELF	        7a800000-        7ac00000	Deferred        opengl32<elf>
  \-PE	        7a850000-        7ac00000	\               opengl32
ELF	        7be00000-        7c103000	Deferred        <wine-loader>
PE	       180000000-       1800e5000	Deferred        turboactivate
ELF	    7f33d101e000-    7f33d1256000	Deferred        libtxc_dxtn_s2tc.so.0
ELF	    7f33d1272000-    7f33d1478000	Deferred        libxfixes.so.3
ELF	    7f33d1478000-    7f33d1682000	Deferred        libxcursor.so.1
ELF	    7f33d1700000-    7f33d192a000	Deferred        libexpat.so.1
ELF	    7f33d192a000-    7f33d1b66000	Deferred        libfontconfig.so.1
ELF	    7f33d1b66000-    7f33d1d8c000	Deferred        libpng12.so.0
ELF	    7f33d1d8c000-    7f33d202f000	Deferred        libfreetype.so.6
ELF	    7f33d202f000-    7f33d223f000	Deferred        libxi.so.6
ELF	    7f33d223f000-    7f33d2442000	Deferred        libxcomposite.so.1
ELF	    7f33d2442000-    7f33d264c000	Deferred        libxrandr.so.2
ELF	    7f33d264c000-    7f33d2856000	Deferred        libxrender.so.1
ELF	    7f33d2856000-    7f33d2a5c000	Deferred        libxxf86vm.so.1
ELF	    7f33d2a5c000-    7f33d2c5f000	Deferred        libxinerama.so.1
ELF	    7f33d2c5f000-    7f33d2e65000	Deferred        libxdmcp.so.6
ELF	    7f33d2e65000-    7f33d3069000	Deferred        libxau.so.6
ELF	    7f33d3069000-    7f33d3288000	Deferred        libxcb.so.1
ELF	    7f33d3288000-    7f33d35bd000	Deferred        libx11.so.6
ELF	    7f33d35bd000-    7f33d37cf000	Deferred        libxext.so.6
ELF	    7f33d37cf000-    7f33d3a6d000	Deferred        winex11<elf>
  \-PE	    7f33d37e0000-    7f33d3a6d000	\               winex11
ELF	    7f33d3a6d000-    7f33d3c75000	Deferred        librt.so.1
ELF	    7f33d3c75000-    7f33d3e90000	Deferred        libresolv.so.2
ELF	    7f33d3e90000-    7f33d4094000	Deferred        libkeyutils.so.1
ELF	    7f33d4094000-    7f33d42d9000	Deferred        libdbus-1.so.3
ELF	    7f33d42d9000-    7f33d44e4000	Deferred        libkrb5support.so.0
ELF	    7f33d44e4000-    7f33d46e8000	Deferred        libcom_err.so.2
ELF	    7f33d46e8000-    7f33d4917000	Deferred        libk5crypto.so.3
ELF	    7f33d4917000-    7f33d4be2000	Deferred        libkrb5.so.3
ELF	    7f33d4be2000-    7f33d4df3000	Deferred        libavahi-client.so.3
ELF	    7f33d4df3000-    7f33d4fff000	Deferred        libavahi-common.so.3
ELF	    7f33d4fff000-    7f33d5246000	Deferred        libgssapi_krb5.so.2
ELF	    7f33d5246000-    7f33d54ba000	Deferred        libcups.so.2
ELF	    7f33d54ba000-    7f33d5820000	Deferred        wined3d<elf>
  \-PE	    7f33d54d0000-    7f33d5820000	\               wined3d
ELF	    7f33d5820000-    7f33d5a4c000	Deferred        dxgi<elf>
  \-PE	    7f33d5830000-    7f33d5a4c000	\               dxgi
ELF	    7f33d5a4c000-    7f33d5c94000	Deferred        winspool<elf>
  \-PE	    7f33d5a50000-    7f33d5c94000	\               winspool
ELF	    7f33d5c94000-    7f33d5ed3000	Deferred        wbemprox<elf>
  \-PE	    7f33d5ca0000-    7f33d5ed3000	\               wbemprox
ELF	    7f33d5ed3000-    7f33d60e7000	Deferred        gnome-keyring-pkcs11.so
ELF	    7f33d60e7000-    7f33d631f000	Deferred        p11-kit-trust.so
ELF	    7f33d631f000-    7f33d6527000	Deferred        libffi.so.6
ELF	    7f33d6527000-    7f33d672c000	Deferred        libgpg-error.so.0
ELF	    7f33d672c000-    7f33d696e000	Deferred        libp11-kit.so.0
ELF	    7f33d696e000-    7f33d6b82000	Deferred        libtasn1.so.6
ELF	    7f33d6b82000-    7f33d6d9b000	Deferred        libz.so.1
ELF	    7f33d6d9b000-    7f33d701b000	Deferred        libgcrypt.so.11
ELF	    7f33d701b000-    7f33d72d9000	Deferred        libgnutls.so.26
ELF	    7f33d72d9000-    7f33d750d000	Deferred        netapi32<elf>
  \-PE	    7f33d72e0000-    7f33d750d000	\               netapi32
ELF	    7f33d750d000-    7f33d7746000	Deferred        secur32<elf>
  \-PE	    7f33d7520000-    7f33d7746000	\               secur32
ELF	    7f33d7746000-    7f33d796e000	Deferred        imm32<elf>
  \-PE	    7f33d7750000-    7f33d796e000	\               imm32
ELF	    7f33d796e000-    7f33d7b97000	Deferred        libtinfo.so.5
ELF	    7f33d7b97000-    7f33d7dba000	Deferred        libncurses.so.5
ELF	    7f33d7dba000-    7f33d7fe8000	Deferred        iphlpapi<elf>
  \-PE	    7f33d7dc0000-    7f33d7fe8000	\               iphlpapi
ELF	    7f33d7fe8000-    7f33d822a000	Deferred        ws2_32<elf>
  \-PE	    7f33d7ff0000-    7f33d822a000	\               ws2_32
ELF	    7f33d822a000-    7f33d8447000	Deferred        jsproxy<elf>
  \-PE	    7f33d8230000-    7f33d8447000	\               jsproxy
ELF	    7f33d8447000-    7f33d868a000	Deferred        winhttp<elf>
  \-PE	    7f33d8450000-    7f33d868a000	\               winhttp
ELF	    7f33d868a000-    7f33d8a1a000	Deferred        oleaut32<elf>
  \-PE	    7f33d86b0000-    7f33d8a1a000	\               oleaut32
ELF	    7f33d8a1a000-    7f33d8cb1000	Deferred        rpcrt4<elf>
  \-PE	    7f33d8a30000-    7f33d8cb1000	\               rpcrt4
ELF	    7f33d8cb1000-    7f33d903d000	Deferred        ole32<elf>
  \-PE	    7f33d8ce0000-    7f33d903d000	\               ole32
ELF	    7f33d903d000-    7f33d92d0000	Deferred        shlwapi<elf>
  \-PE	    7f33d9050000-    7f33d92d0000	\               shlwapi
ELF	    7f33d92d0000-    7f33d97d2000	Deferred        shell32<elf>
  \-PE	    7f33d92f0000-    7f33d97d2000	\               shell32
ELF	    7f33d97d2000-    7f33d99ec000	Deferred        version<elf>
  \-PE	    7f33d97e0000-    7f33d99ec000	\               version
ELF	    7f33d99ec000-    7f33d9c7c000	Deferred        advapi32<elf>
  \-PE	    7f33d9a00000-    7f33d9c7c000	\               advapi32
ELF	    7f33d9c7c000-    7f33d9fe4000	Deferred        gdi32<elf>
  \-PE	    7f33d9c90000-    7f33d9fe4000	\               gdi32
ELF	    7f33d9fe4000-    7f33da3b9000	Deferred        user32<elf>
  \-PE	    7f33da000000-    7f33da3b9000	\               user32
ELF	    7f33da3b9000-    7f33da68b000	Deferred        msvcrt<elf>
  \-PE	    7f33da3e0000-    7f33da68b000	\               msvcrt
ELF	    7f33dad6d000-    7f33db375000	Deferred        kernel32<elf>
  \-PE	    7f33dad90000-    7f33db375000	\               kernel32
ELF	    7f33db375000-    7f33db581000	Deferred        libnss_files.so.2
ELF	    7f33db581000-    7f33db78d000	Deferred        libnss_nis.so.2
ELF	    7f33db78d000-    7f33db9a7000	Deferred        libnsl.so.1
ELF	    7f33db9a7000-    7f33dbbb1000	Deferred        libnss_compat.so.2
ELF	    7f33dbbb1000-    7f33dbdc7000	Deferred        libgcc_s.so.1
ELF	    7f33dbdc7000-    7f33dc0cd000	Deferred        libm.so.6
ELF	    7f33dc0cd000-    7f33dc3e6000	Deferred        ntdll<elf>
  \-PE	    7f33dc0f0000-    7f33dc3e6000	\               ntdll
ELF	    7f33dc3e9000-    7f33dc5ed000	Deferred        libdl.so.2
ELF	    7f33dc5ed000-    7f33dc9b2000	Deferred        libc.so.6
ELF	    7f33dc9b3000-    7f33dcbd1000	Deferred        libpthread.so.0
ELF	    7f33dcbed000-    7f33dcfb0000	Dwarf           libwine.so.1
ELF	    7f33dcfb2000-    7f33dd1d7000	Deferred        ld-linux-x86-64.so.2
ELF	    7ffd765f6000-    7ffd765f7000	Deferred        [vdso].so
Threads:
process  tid      prio (all id:s are in hex)
0000000c services.exe
	00000039    0
	00000038    0
	0000000e    0
	0000000d    0
00000012 explorer.exe
	00000013    0
00000036 winedevice.exe
	0000003c    0
	0000003b    0
	0000003a    0
	00000037    0
00000057 (D) Z:\home\myname\project\MyApp.exe
	00000058    0 <==
System information:
    Wine build: wine-1.9.5 (Staging)
    Platform: x86_64
    Version: Windows XP
    Host system: Linux
    Host version: 3.19.0-51-generic
myname@mycomputer:~/project$
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Help with stack trace. Wine 1.9.5(Staging)

Post by Bob Wya »

From my system:

Code: Select all

file /usr/lib64/wine/fakedlls/winex11.drv /usr/lib64/wine/winex11.drv.so 
/usr/lib64/wine/fakedlls/winex11.drv: PE32+ executable (DLL) x86-64, for MS Windows
/usr/lib64/wine/winex11.drv.so:       ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped

To quote from Wikipedia ELF:
In computing, the Executable and Linkable Format (ELF, formerly called Extensible Linking Format) is a common standard file format for executables, object code, shared libraries, and core dumps.
To quote from Wikipedia dll / PE32:
The file formats for DLLs are the same as for Windows EXE files – that is, Portable Executable (PE) for 32-bit and 64-bit Windows, and New Executable (NE) for 16-bit Windows. As with EXEs, DLLs can contain code, data, and resources, in any combination.
My (admittedly very limited!!) understanding of how wine works is that each native Wine shared library (ELF) is used to wrap the corresponding fake windows dll (PE32+) in Virtual Memory.

So:

Code: Select all

ELF       7f33d37cf000-    7f33d3a6d000   Deferred        winex11<elf>
  \-PE       7f33d37e0000-    7f33d3a6d000   \               winex11
Notice how the native share library (ELF) is mapped slightly before the wrapped, corresponding windows dll (PE32+). The native shared library (ELF) covers a VM region approximately 64K larger (at the start of the region 7f33d37cf000-7f33d37dffff).

Bob
DarkPlayer
Level 2
Level 2
Posts: 23
Joined: Sun Mar 13, 2016 11:15 am

Re: Help with stack trace. Wine 1.9.5(Staging)

Post by DarkPlayer »

Based on the following excerpt, I would guess the problem is located in wbemprox. Many programs use WMI to derive a hardware identification key for licensing, but the WMI implementation of Wine is incomplete. A lot of tables are unsupported or miss certain columns. I could imagine leading this to the crash if the application does not properly handle the situation.

Code: Select all

fixme:wbemprox:wbem_locator_ConnectServer unsupported flags
fixme:wbemprox:client_security_SetBlanket 0x7f33d5ed2030, 0x23290, 10, 0, (null), 3, 3, (nil), 0x00000000
fixme:wbemprox:client_security_Release 0x7f33d5ed2030
wine: Unhandled page fault on read access to 0xc0000000 at address 0x235b2 (thread 0058), starting 
If I understand you correctly, the application is written by your self, so the best idea would be to open a bug report with a small test application which just contains the licensing part plus a valid license key for testing. This way we should be able locate the issue and fix it. Please don't do the mistake of making your application compatible with Wine by adding workarounds. This just means that certain bugs in Wine may never get fixed.

Regarding the module list, Wine does not build PE files for the internal dlls like kernel32 or ntdll but instead creates ELF or MACHO (Mac OS X) libraries to easily access native system libraries. Some application however try to directly read the PE header of a library instead of going through functions like GetProcAddress, so Wine also generates a valid PE header which is put as first section into the ELF/MACHO library. This leads to a line like this:

Code: Select all

ELF           7a800000-        7ac00000   Deferred        opengl32<elf>
  \-PE        7a850000-        7ac00000   \               opengl32
The ELF library starts at 7a800000, but the real PE header starts at 7a850000. If you load this library using LoadLibary in Wine, the API would return 7a850000 as address.

The debug info just describes the format in which the debug symbols are stored. Wine uses dwarf for its internal dlls while applications compiled with the microsoft c compiler use a different format which Wine does not fully supported yet. I can't tell you for sure though why most dlls contain "Deferred" as value. My educated guess is that you are using a Wine compilation in which the debug information was stripped from the libraries. This usually applies to packages provided by distributions or WineHQ to reduce the size of the package. The debug symbols are often stored in external files available as separate package, so deferred means they are not loaded yet.
Locked