Cygwin/X
X Windows - on Windows!
Reporting X server crashes
Useful backtraces will help identify where and why the crash is occurring, which will help us fix the bug.
Automatically reporting crashes
- Install the xorg-server-cygwin-crashreporter package
- Reproduce your crash
This should automatically start a crash reporter, which will generate and upload a minidump file containing information about the crash.
In some cases, this doesn't work (for reasons still under investigation), in which case see the following section.
Manually producing a crash backtrace
To generate a useful backtrace, you will need debugging symbols for the X server.
Preparation
- Install the xorg-server-debuginfo package (for debugging symbols)
- Install the gdb package (for gdb)
- Install the sysvinit package (for pidof)
Generating a backtrace when some specific action is making the X server crash (automatically)
- Start XWin using your normal method
- Reproduce your crash
- A backtrace should be captured into /var/log/xwin/XWin.0.log
Generating a backtrace when some specific action is making the X server crash (manually)
- Start XWin using your normal method
- In a non-X terminal window, run gdb --pid=`pidof /usr/bin/XWin`, to attach gdb to the running X server
- Type c at the (gdb) prompt, to resume running the X server
- Reproduce your crash
- Type bt full at the (gdb) prompt, to produce a backtrace
Generating a backtrace when the X server is crashing at startup
- In a non-X terminal window, run gdb --args /usr/bin/XWin -multiwindow, to start the X server under gdb (If you have customized how you start XWin to add additional options, you should also add them here)
- Type handle SIGSYS nostop at the (gdb) prompt
- Type r at the (gdb) prompt, to start running the X server
- Your crash should occur
- Type bt full at the (gdb) prompt, to produce a backtrace
Generating a backtrace when the X server is crashing at startup (alternative approach using JIT debugging)
- Set the error_start token in the CYGWIN environment variable to run gdb, e.g. CYGWIN="error_start=C:\cygwin\bin\gdb" (If you are going to start the X server using a Windows shortcut, you will have to set this in the System applet of the Windows control panel)
- Start XWin using your normal method
- Your crash should occur
- Type bt full at the (gdb) prompt, to produce a backtrace
Please attach the output from gdb, in addition to your /var/log/xwin/XWin.0.log, to your problem report.
Cleaning up
- Uninstall the xorg-server-debuginfo package
- Uninstall the gdb and sysvinit packages if you no longer need them
- Restore the previous value of the CYGWIN environment variable, if you changed it
Preparation (alternative approach)
Alternatively, X server snapshots are built with debugging symbols included. You can install an X server snapshot with the following steps:
-
Download the latest X Server snapshot from ftp://cygwin.com/pub/cygwinx
wget ftp://cygwin.com/pub/cygwinx/XWin.YYYMMDD-git-XXXXXXXXXXXXXXXX.exe.bz2 -
Uncompress it
bunzip2 XWin.YYYMMDD-git-XXXXXXXXXXXXXXXX.exe.bz2 -
Ensure it is executable
chmod +x XWin.YYYMMDD-git-XXXXXXXXXXXXXXXX.exe -
Move it to /usr/bin
mv XWin.YYYMMDD-git-XXXXXXXXXXXXXXXX.exe /usr/bin/XWin.exe
To remove the X server snapshot, use setup to reinstall the xorg-server package