]> git.sur5r.net Git - i3/i3.github.io/blob - docs/debugging.html
add i3 v4.2
[i3/i3.github.io] / docs / debugging.html
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
4 <head>\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.4" />\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
12 /*<![CDATA[*/\r
13 window.onload = function(){asciidoc.footnotes();}\r
14 /*]]>*/\r
15 </script>\r
16 <script type="text/javascript" src="/js/asciidoc-xhtml11.js"></script>\r
17 </head>\r
18 <body class="article">\r
19 \r
20         <div id="main">\r
21             <a href="/"><h1 id="title">i3 - improved tiling WM</h1></a>\r
22                         <ul id="nav">\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
27                         </ul>\r
28         <br style="clear: both">\r
29 <div id="content">\r
30 <div id="header">\r
31 <h1>Debugging i3: How To</h1>\r
32 <span id="author">Michael Stapelberg</span><br />\r
33 <span id="email"><tt>&lt;<a href="mailto:michael@i3wm.org">michael@i3wm.org</a>&gt;</tt></span><br />\r
34 <span id="revdate">February 2012</span>\r
35 </div>\r
36 <div id="preamble">\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
43 </div>\r
44 </div>\r
45 <div class="sect1">\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
53 </div></div>\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
57 4.1.2\r
58 </dt>\r
59 <dd>\r
60 <p>\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
64 </p>\r
65 </dd>\r
66 <dt class="hdlist1">\r
67 4.1.2-248-g51728ba\r
68 </dt>\r
69 <dd>\r
70 <p>\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
74 latest version.\r
75 </p>\r
76 </dd>\r
77 </dl></div>\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
80 <li>\r
81 <p>\r
82 Shared memory debug logging is enabled by default. You do not have to enable\r
83    logging explicitly.\r
84 </p>\r
85 </li>\r
86 <li>\r
87 <p>\r
88 Core dumps are enabled by default.\r
89 </p>\r
90 </li>\r
91 <li>\r
92 <p>\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
96 </p>\r
97 </li>\r
98 </ol></div>\r
99 </div>\r
100 </div>\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 &gt; /tmp/i3.log.gz</tt></pre>\r
111 </div></div>\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 &gt; /tmp/i3.log.gz</tt></pre>\r
118 </div></div>\r
119 </div>\r
120 </div>\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
126 <li>\r
127 <p>\r
128 Switch to a virtual console (Ctrl-Alt-F1) or login from a different computer\r
129 </p>\r
130 </li>\r
131 <li>\r
132 <p>\r
133 Generate a backtrace (see below)\r
134 </p>\r
135 </li>\r
136 <li>\r
137 <p>\r
138 Switch back to the crash dialog (Ctrl-Alt-F7)\r
139 </p>\r
140 </li>\r
141 <li>\r
142 <p>\r
143 Restart i3 in-place (you will keep your session), continue working\r
144 </p>\r
145 </li>\r
146 </ol></div>\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
152     --batch --quiet \\r
153     --ex 'backtrace full' &gt; /tmp/i3-backtrace.txt 2&gt;&amp;1</tt></pre>\r
154 </div></div>\r
155 </div>\r
156 </div>\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
167 </div>\r
168 </div>\r
169 </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
173 </div>\r
174 </body>\r
175 </html>\r