blob: 3ccd494d092b3ef0c8188d425a89ce651ee5e582 [file] [log] [blame]
John DeNisco06dcd452018-07-26 12:45:10 -04001.. _reportingbugs:
2
3.. toctree::
4
5Reporting Bugs
6==============
7
Dave Barachb93452b2019-02-27 10:14:01 -05008Although every situation is different, this section describes how to
John DeNisco06dcd452018-07-26 12:45:10 -04009collect data which will help make efficient use of everyone's time
10when dealing with vpp bugs.
11
12Before you press the Jira button to create a bug report - or email
13vpp-dev@lists.fd.io - please ask yourself whether there's enough
Dave Barachb93452b2019-02-27 10:14:01 -050014information for someone else to understand and to reproduce the issue
15given a reasonable amount of effort. **Unicast emails to maintainers,
16committers, and the project PTL are strongly discouraged.**
John DeNisco06dcd452018-07-26 12:45:10 -040017
18A good strategy for clear-cut bugs: file a detailed Jira ticket, and
19then send a short description of the issue to vpp-dev@lists.fd.io,
20perhaps from the Jira ticket description. It's fine to send email to
21vpp-dev@lists.fd.io to ask a few questions **before** filing Jira tickets.
22
23Data to include in bug reports
24==============================
25
26Image version and operating environment
27---------------------------------------
28
29Please make sure to include the vpp image version and command-line arguments.
30
31.. code-block:: console
32
33 $ sudo bash
34 # vppctl show version verbose cmdline
35 Version: v18.07-rc0~509-gb9124828
36 Compiled by: vppuser
37 Compile host: vppbuild
38 Compile date: Fri Jul 13 09:05:37 EDT 2018
39 Compile location: /scratch/vpp-showversion
40 Compiler: GCC 7.3.0
41 Current PID: 5211
Dave Barachb93452b2019-02-27 10:14:01 -050042 Command line arguments:
John DeNisco06dcd452018-07-26 12:45:10 -040043 /scratch/vpp-showversion/build-root/install-vpp_debug-native/vpp/bin/vpp
44 unix
45 interactive
46
47With respect to the operating environment: if misbehavior involving a
48specific VM / container / bare-metal environment is involved, please
49describe the environment in detail:
50
Dave Barachb93452b2019-02-27 10:14:01 -050051* Linux Distro (e.g. Ubuntu 18.04.2 LTS, CentOS-7, etc.)
John DeNisco06dcd452018-07-26 12:45:10 -040052* NIC type(s) (ixgbe, i40e, enic, etc. etc.), vhost-user, tuntap
53* NUMA configuration if applicable
54
55Please note the CPU architecture (x86_86, aarch64), and hardware platform.
56
57When practicable, please report issues against released software, or
58unmodified master/latest software.
59
60"Show" command output
61---------------------
62
Dave Barachb93452b2019-02-27 10:14:01 -050063Every situation is different. If the issue involves a sequence of
64debug CLI command, please enable CLI command logging, and send the
65sequence involved. Note that the debug CLI is a developer's tool -
66**no warranty express or implied** - and that we may choose not to fix
67debug CLI bugs.
John DeNisco06dcd452018-07-26 12:45:10 -040068
Dave Barachb93452b2019-02-27 10:14:01 -050069Please include "show error" [error counter] output. It's often helpful
70to "clear error", send a bit of traffic, then "show error"
71particularly when running vpp on noisy networks.
John DeNisco06dcd452018-07-26 12:45:10 -040072
Dave Barachb93452b2019-02-27 10:14:01 -050073Please include ip4 / ip6 / mpls FIB contents ("show ip fib", "show ip6
74fib", "show mpls fib", "show mpls tunnel").
John DeNisco06dcd452018-07-26 12:45:10 -040075
Dave Barachb93452b2019-02-27 10:14:01 -050076Please include "show hardware", "show interface", and "show interface
77address" output
John DeNisco06dcd452018-07-26 12:45:10 -040078
Dave Barachb93452b2019-02-27 10:14:01 -050079Here is a consolidated set of commands that are generally useful
80before/after sending traffic. Before sending traffic:
John DeNisco06dcd452018-07-26 12:45:10 -040081
82.. code-block:: console
83
84 vppctl clear hardware
85 vppctl clear interface
86 vppctl clear error
87 vppctl clear run
88
89Send some traffic and then issue the following commands.
Dave Barachb93452b2019-02-27 10:14:01 -050090
John DeNisco06dcd452018-07-26 12:45:10 -040091.. code-block:: console
92
93 vppctl show version verbose
94 vppctl show hardware
Paul Vinciguerra917c91a2019-11-07 15:38:59 -050095 vppctl show interface address
John DeNisco06dcd452018-07-26 12:45:10 -040096 vppctl show interface
97 vppctl show run
98 vppctl show error
99
100Here are some protocol specific show commands that may also make
101sense. Only include those features which have been configured.
102
103.. code-block:: console
104
105 vppctl show l2fib
106 vppctl show bridge-domain
Dave Barachb93452b2019-02-27 10:14:01 -0500107
John DeNisco06dcd452018-07-26 12:45:10 -0400108 vppctl show ip fib
Paul Vinciguerra917c91a2019-11-07 15:38:59 -0500109 vppctl show ip neighbors
Dave Barachb93452b2019-02-27 10:14:01 -0500110
John DeNisco06dcd452018-07-26 12:45:10 -0400111 vppctl show ip6 fib
112 vppctl show ip6 neighbors
Dave Barachb93452b2019-02-27 10:14:01 -0500113
John DeNisco06dcd452018-07-26 12:45:10 -0400114 vppctl show mpls fib
115 vppctl show mpls tunnel
116
117Network Topology
118----------------
119
120Please include a crisp description of the network topology, including
121L2 / IP / MPLS / segment-routing addressing details. If you expect
122folks to reproduce and debug issues, this is a must.
123
124At or above a certain level of topological complexity, it becomes
125problematic to reproduce the original setup.
126
127Packet Tracer Output
128--------------------
129
130If you capture packet tracer output which seems relevant, please include it.
131
132.. code-block:: console
133
134 vppctl trace add dpdk-input 100 # or similar
135
136send-traffic
137
138.. code-block:: console
139
140 vppctl show trace
141
142Capturing post-mortem data
143==========================
144
145It should go without saying, but anyhow: **please put post-mortem data
146in obvious, accessible places.** Time wasted trying to acquire
147accounts, credentials, and IP addresses simply delays problem
148resolution.
149
150Please remember to add post-mortem data location information to Jira
151tickets.
152
153Syslog Output
154-------------
155
156The vpp signal handler typically writes a certain amount of data in
157/var/log/syslog before exiting. Make sure to check for evidence, e.g
158via "grep /usr/bin/vpp /var/log/syslog" or similar.
159
160Binary API Trace
161----------------
162
163If the issue involves a sequence of control-plane API messages - even
164a very long sequence - please enable control-plane API
165tracing. Control-plane API post-mortem traces end up in
Dave Barachb93452b2019-02-27 10:14:01 -0500166/tmp/api_post_mortem.<pid>.
John DeNisco06dcd452018-07-26 12:45:10 -0400167
168Please remember to put post-mortem binary api traces in accessible
169places.
170
171These API traces are especially helpful in cases where the vpp engine
172is throwing traffic on the floor, e.g. for want of a default route or
173similar.
174
175Make sure to leave the default stanza "... api-trace { on } ... " in
176the vpp startup configuration file /etc/vpp/startup.conf, or to
177include it in the command line arguments passed by orchestration
178software.
179
180Core Files
181----------
182
183Production systems, as well as long-running pre-production soak-test
184systems, **must** arrange to collect core images. There are various
185ways to configure core image capture, including e.g. the Ubuntu
186"corekeeper" package. In a pinch, the following very basic sequence
187will capture usable vpp core files in /tmp/dumps.
188
189.. code-block:: console
190
191 # mkdir -p /tmp/dumps
Dave Barachb93452b2019-02-27 10:14:01 -0500192 # sysctl -w debug.exception-trace=1
John DeNisco06dcd452018-07-26 12:45:10 -0400193 # sysctl -w kernel.core_pattern="/tmp/dumps/%e-%t"
194 # ulimit -c unlimited
195 # echo 2 > /proc/sys/fs/suid_dumpable
196
BenoƮt Ganne6d72c172019-07-04 11:25:59 +0200197If you start VPP from systemd, you also need to edit
198/lib/systemd/system/vpp.service and uncomment the "LimitCORE=infinity"
199line before restarting VPP.
200
Dave Barach328631d2019-12-17 09:35:23 -0500201Vpp core files often appear enormous, but they are invariably
202sparse. Gzip compresses them to manageable sizes. A multi-GByte
203corefile often compresses to 10-20 Mbytes.
204
205When decompressing a vpp core file, we suggest using "dd" as shown to
206create a sparse, uncompressed core file:
207
208.. code-block:: console
209
210 $ zcat vpp_core.gz | dd conv=sparse of=vpp_core
John DeNisco06dcd452018-07-26 12:45:10 -0400211
212Please remember to put compressed core files in accessible places.
213
214Make sure to leave the default stanza "... unix { ... full-coredump
215... } ... " in the vpp startup configuration file
216/etc/vpp/startup.conf, or to include it in the command line arguments
217passed by orchestration software.
218
Dave Barach328631d2019-12-17 09:35:23 -0500219Core files from Private Images
220==============================
221
Dave Barachb93452b2019-02-27 10:14:01 -0500222Core files from private images require special handling. If it's
223necessary to go that route, copy the **exact** Debian packages (or
224RPMs) which correspond to the core file to the same public place as
225the core file. A no-excuses-allowed, hard-and-fast requirement.
John DeNisco06dcd452018-07-26 12:45:10 -0400226
Dave Barachb93452b2019-02-27 10:14:01 -0500227In particular:
John DeNisco06dcd452018-07-26 12:45:10 -0400228
Dave Barachb93452b2019-02-27 10:14:01 -0500229.. code-block:: console
230
231 libvppinfra_<version>_<arch>.deb # vppinfra library
232 libvppinfra-dev_<version>_<arch>.deb # vppinfra library development pkg
233 vpp_<version>_<arch>.deb # the vpp executable
234 vpp-dbg_<version>_<arch>.deb # debug symbols
235 vpp-dev_<version>_<arch>.deb # vpp development pkg
236 vpp-lib_<version>_<arch>.deb # shared libraries
237 vpp-plugin-core_<version>_<arch>.deb # core plugins
238 vpp-plugin-dpdk_<version>_<arch>.deb # dpdk plugin
239
240For reference, please include git commit-ID, branch, and git repo
241information [for repos other than gerrit.fd.io] in the Jira ticket.
242
243Note that git commit-ids are crypto sums of the head [latest]
244**merged** patch. They say **nothing whatsoever** about local
245workspace modifications, branching, or the git repo in question.
246
247Even given a byte-for-byte identical source tree, it's easy to build
248dramatically different binary artifacts. All it takes is a different
249toolchain version.
250
Dave Barachedff8052019-07-12 10:24:03 -0400251
Dave Barach328631d2019-12-17 09:35:23 -0500252On-the-fly Core File Compression
253--------------------------------
Dave Barachedff8052019-07-12 10:24:03 -0400254
255Depending on operational requirements, it's possible to compress
256corefiles as they are generated. Please note that it takes several
257seconds' worth of wall-clock time to compress a vpp core file on the
258fly, during which all packet processing activities are suspended.
259
260To create compressed core files on the fly, create the following
261script, e.g. in /usr/local/bin/compressed_corefiles, owned by root,
262executable:
263
264.. code-block:: console
265
266 #!/bin/sh
267 exec /bin/gzip -f - >"/tmp/dumps/core-$1.$2.gz"
268
269Adjust the kernel core file pattern as shown:
270
271.. code-block:: console
272
273 sysctl -w kernel.core_pattern="|/usr/local/bin/compressed_corefiles %e %t"
274
275Core File Summary
276-----------------
277
Dave Barachb93452b2019-02-27 10:14:01 -0500278Bottom line: please follow core file handling instructions to the
279letter. It's not complicated. Simply copy the exact Debian packages or
280RPMs which correspond to core files to accessible locations.
John DeNisco06dcd452018-07-26 12:45:10 -0400281
282If we go through the setup process only to discover that the image and
Dave Barachb93452b2019-02-27 10:14:01 -0500283core files don't match, it will simply delay resolution of the issue;
284to say nothing of irritating the person who just wasted their time.