1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
\r
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
\r
5 <link rel="icon" type="image/png" href="/favicon.png">
\r
6 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
\r
7 <meta name="generator" content="AsciiDoc 8.6.7" />
\r
8 <title>i3: Debugging i3: How To</title>
\r
9 <link rel="stylesheet" href="/css/style.css" type="text/css" />
\r
10 <link rel="stylesheet" href="/css/xhtml11.css" type="text/css" />
\r
11 <script type="text/javascript">
\r
13 window.onload = function(){asciidoc.footnotes();}
\r
16 <script type="text/javascript" src="/js/asciidoc-xhtml11.js"></script>
\r
18 <body class="article">
\r
21 <a href="/"><h1 id="title">i3 - improved tiling WM</h1></a>
\r
23 <li><a style="border-bottom: 2px solid #fff" href="/docs">Docs</a></li>
\r
24 <li><a href="/screenshots">Screens</a></li>
\r
25 <li><a href="/contact">Contact</a></li>
\r
26 <li><a href="http://bugs.i3wm.org/">Bugs</a></li>
\r
28 <br style="clear: both">
\r
31 <h1>Debugging i3: How To</h1>
\r
32 <span id="author">Michael Stapelberg</span><br />
\r
33 <span id="email"><tt><<a href="mailto:michael@i3wm.org">michael@i3wm.org</a>></tt></span><br />
\r
34 <span id="revdate">February 2012</span>
\r
37 <div class="sectionbody">
\r
38 <div class="paragraph"><p>This document describes how to debug i3 suitably for sending us useful bug
\r
39 reports, even if you have no clue of C programming.</p></div>
\r
40 <div class="paragraph"><p>First of all: Thank you for being interested in debugging i3. It really means
\r
41 something to us to get your bug fixed. If you have any questions about the
\r
42 debugging and/or need further help, do not hesitate to contact us!</p></div>
\r
46 <h2 id="_verify_you_are_using_the_latest_development_version">1. Verify you are using the latest (development) version</h2>
\r
47 <div class="sectionbody">
\r
48 <div class="paragraph"><p>Please verify that you are using the latest version of i3:</p></div>
\r
49 <div class="listingblock">
\r
50 <div class="content">
\r
51 <pre><tt>$ i3 --version
\r
52 i3 version 4.1.2-248-g51728ba (2012-02-12, branch "next")</tt></pre>
\r
54 <div class="paragraph"><p>Your version can look like this:</p></div>
\r
55 <div class="dlist"><dl>
\r
56 <dt class="hdlist1">
\r
61 You are using a release version. Please
\r
62 upgrade to a development version first, or read
\r
63 <a href="debugging-release-version.html">Debugging i3: How To (release version)</a>.
\r
66 <dt class="hdlist1">
\r
71 Your version is 248 commits newer than 4.1.2, and the git revision of your
\r
72 version is <tt>51728ba</tt>. Go to <a href="http://code.i3wm.org/i3/commit/?h=next">http://code.i3wm.org/i3/commit/?h=next</a> and see if
\r
73 the line "commit" starts with the same revision. If so, you are using the
\r
78 <div class="paragraph"><p>Development versions of i3 have several properties which make debugging easier:</p></div>
\r
79 <div class="olist arabic"><ol class="arabic">
\r
82 Shared memory debug logging is enabled by default. You do not have to enable
\r
88 Core dumps are enabled by default.
\r
93 If you are using a version from the Debian/Ubuntu autobuilder, it is
\r
94 compiled without optimization. Debug symbols are available in the i3-wm-dbg
\r
95 package. When compiling i3 yourself, debug mode is the default.
\r
101 <div class="sect1">
\r
102 <h2 id="_obtaining_the_debug_logfile">2. Obtaining the debug logfile</h2>
\r
103 <div class="sectionbody">
\r
104 <div class="paragraph"><p>No matter whether i3 misbehaved in some way without crashing or whether it just
\r
105 crashed, the logfile provides all information necessary to debug the problem.</p></div>
\r
106 <div class="paragraph"><p>To save a compressed version of the logfile (suitable for attaching it to a
\r
107 bugreport), use:</p></div>
\r
108 <div class="listingblock">
\r
109 <div class="content">
\r
110 <pre><tt>i3-dump-log | gzip -9c > /tmp/i3.log.gz</tt></pre>
\r
112 <div class="paragraph"><p>This command does not depend on i3 (it also works when i3 currently displays
\r
113 the crash dialog), but it requires a working X11 connection. When running it
\r
114 from a virtual console (Ctrl-Alt-F1), use:</p></div>
\r
115 <div class="listingblock">
\r
116 <div class="content">
\r
117 <pre><tt>DISPLAY=:0 i3-dump-log | gzip -9c > /tmp/i3.log.gz</tt></pre>
\r
121 <div class="sect1">
\r
122 <h2 id="_obtaining_a_backtrace">3. Obtaining a backtrace</h2>
\r
123 <div class="sectionbody">
\r
124 <div class="paragraph"><p>When i3 displays its crash dialog, do the following:</p></div>
\r
125 <div class="olist arabic"><ol class="arabic">
\r
128 Switch to a virtual console (Ctrl-Alt-F1) or login from a different computer
\r
133 Generate a backtrace (see below)
\r
138 Switch back to the crash dialog (Ctrl-Alt-F7)
\r
143 Restart i3 in-place (you will keep your session), continue working
\r
147 <div class="paragraph"><p>This is how you get a backtrace from a running i3 process:</p></div>
\r
148 <div class="listingblock">
\r
149 <div class="content">
\r
150 <pre><tt>I3PID=$(pidof i3)
\r
151 gdb /proc/$I3PID/exe $I3PID \
\r
153 --ex 'backtrace full' > /tmp/i3-backtrace.txt 2>&1</tt></pre>
\r
157 <div class="sect1">
\r
158 <h2 id="_sending_bug_reports_debugging_on_irc">4. Sending bug reports/debugging on IRC</h2>
\r
159 <div class="sectionbody">
\r
160 <div class="paragraph"><p>When sending bug reports, please attach the <strong>whole</strong> log file. Even if you think
\r
161 you found the section which clearly highlights the problem, additional
\r
162 information might be necessary to completely diagnose the problem.</p></div>
\r
163 <div class="paragraph"><p>When debugging with us in IRC, be prepared to use a so called nopaste service
\r
164 such as <a href="http://nopaste.info">http://nopaste.info</a> or <a href="http://pastebin.com">http://pastebin.com</a> because pasting large
\r
165 amounts of text in IRC sometimes leads to incomplete lines (servers have line
\r
166 length limitations) or flood kicks.</p></div>
\r
170 <div id="footnotes"><hr /></div>
\r
171 <div id="footer" lang="de">
\r
172 © 2009-2011 Michael Stapelberg, <a href="/impress.html">Impressum</a>
\r