http://bugs.winehq.org/show_bug.cgi?id=35561
Bug ID: 35561 Summary: Some MSYS2 commands generate a stackdump Product: Wine Version: 1.7.12 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: irwin@beluga.phys.uvic.ca Classification: Unclassified
Created attachment 47484 --> http://bugs.winehq.org/attachment.cgi?id=47484 strace log of execution of mintty
The general problem is I cannot start MSYS2 (the successor to MSYS) using its msys2_shell.bat startup batch file (see directions at http://sourceforge.net/p/msys2/wiki/MSYS2 installation/ concerning how to start MSYS2). That batch file (which executes a number of different MSYS2 commands) exits almost immediately with a stack dump.
Alexey Pavlov, the developer of MSYS2, suggested I narrow down the problem by attempting to execute the MSYS2 version of mintty.exe directly, and if that did not work (which was the case) then run that app via the MSYS2 strace.exe facility to help figure out what the exact problem is. MSYS2 strace.exe did appear to work and I attach its log (and also the associated stackdump for mintty.exe).
Here are some additional details in case there are any difficulties replicating this issue.
I have used 3 different versions of 32-bit Wine which I built myself on my Debian Wheezy system. Those are Unpatched Wine-1.6.1, patched Wine-1.6.1, and patched Wine-1.7.12. The patch used was "Hackish patch to fix APC problem" taken from http://bugs.winehq.org/show_bug.cgi?id=24018. The reason why that extremely small patch is relevant is MSYS2 is essentially a simplified modern Cygwin (as opposed to MSYS which is essentially a simplified ancient version of Cygwin). Because the patched versions give improved results (see below), apparently the modern bits of Cygwin that are still part of MSYS2 trigger at least the APC Wine bug for modern Cygwin that did not occur for older Cygwin versions.
The version of MSYS2 I am using is msys2-base-i686-20140205.tar.xz. Unpacking that created a top-level directory name of msys32 which I have changed to MSYS2-20140205 to help keep better track of which version of MSYS2 I am trying.
I ran the MSYS2 version of strace with the patched versions of Wine as follows:
wine@raven> wineserver -k wine@raven> wineserver -p wine@raven> wineconsole --backend=curses cmd Microsoft Windows 5.1.2600 (1.7.12)
Z:\home\wine\newstart>PATH=Z:\home\wine\newstart\MSYS2-20140205\bin;%PATH% Z:\home\wine\newstart>MSYS2-20140205\bin\strace.exe MSYS2-0140205\bin\mintty.exe > strace.log 1069046 [main] mintty 44 cygwin_exception::open_stackdumpfile: Dumping stack trace to mintty.exe.stackdump
The mintty terminal momentarily appeared before the stackdump occurred. After that stack dump strace did not return (i.e., everything was hung), and the last line in strace.log at that point was
616 1255194 [main] mintty 44 pinfo::exit: Calling ExitProcess n 0x8B, exitcode 0x8B00
I exited the combination of mintty, strace, cmd, and wineconsole the brute-force way by typing "wineserver -k" in a different Linux xterm which added nothing else to strace.log.
The strace and stackdump results for patched wine-1.6.1 and patched wine-1.7.12 were virtually identical (except for numerical data like PID numbers). I have attached the wine-1.7.12 versions.
When initially investigating this issue I was using unpatched wine-1.6.1. The result of everything I tried was Wine error boxes concerning dll problems. Those error boxes reminded me very much of my troubles in trying to run modern Cygwin from Wine so I applied the APC-related patch, and sure enough, that got rid of the error boxes, and I could get a lot further before I ran into a different problem which is what I have described above.