blob: 970f3407c54972bb88da90962900ddb7b3b7f6ee [file] [log] [blame]
John DeNisco06dcd452018-07-26 12:45:10 -04001.. _reportingbugs:
2
3.. toctree::
4
John DeNisco06dcd452018-07-26 12:45:10 -04005Data to include in bug reports
6==============================
7
8Image version and operating environment
9---------------------------------------
10
11Please make sure to include the vpp image version and command-line arguments.
12
13.. code-block:: console
14
15 $ sudo bash
16 # vppctl show version verbose cmdline
17 Version: v18.07-rc0~509-gb9124828
18 Compiled by: vppuser
19 Compile host: vppbuild
20 Compile date: Fri Jul 13 09:05:37 EDT 2018
21 Compile location: /scratch/vpp-showversion
22 Compiler: GCC 7.3.0
23 Current PID: 5211
Dave Barachb93452b2019-02-27 10:14:01 -050024 Command line arguments:
John DeNisco06dcd452018-07-26 12:45:10 -040025 /scratch/vpp-showversion/build-root/install-vpp_debug-native/vpp/bin/vpp
26 unix
27 interactive
28
29With respect to the operating environment: if misbehavior involving a
30specific VM / container / bare-metal environment is involved, please
31describe the environment in detail:
32
Dave Barachb93452b2019-02-27 10:14:01 -050033* Linux Distro (e.g. Ubuntu 18.04.2 LTS, CentOS-7, etc.)
John DeNisco06dcd452018-07-26 12:45:10 -040034* NIC type(s) (ixgbe, i40e, enic, etc. etc.), vhost-user, tuntap
35* NUMA configuration if applicable
36
37Please note the CPU architecture (x86_86, aarch64), and hardware platform.
38
39When practicable, please report issues against released software, or
40unmodified master/latest software.
41
42"Show" command output
43---------------------
44
Dave Barachb93452b2019-02-27 10:14:01 -050045Every situation is different. If the issue involves a sequence of
46debug CLI command, please enable CLI command logging, and send the
47sequence involved. Note that the debug CLI is a developer's tool -
48**no warranty express or implied** - and that we may choose not to fix
49debug CLI bugs.
John DeNisco06dcd452018-07-26 12:45:10 -040050
Dave Barachb93452b2019-02-27 10:14:01 -050051Please include "show error" [error counter] output. It's often helpful
52to "clear error", send a bit of traffic, then "show error"
53particularly when running vpp on noisy networks.
John DeNisco06dcd452018-07-26 12:45:10 -040054
Dave Barachb93452b2019-02-27 10:14:01 -050055Please include ip4 / ip6 / mpls FIB contents ("show ip fib", "show ip6
56fib", "show mpls fib", "show mpls tunnel").
John DeNisco06dcd452018-07-26 12:45:10 -040057
Dave Barachb93452b2019-02-27 10:14:01 -050058Please include "show hardware", "show interface", and "show interface
59address" output
John DeNisco06dcd452018-07-26 12:45:10 -040060
Dave Barachb93452b2019-02-27 10:14:01 -050061Here is a consolidated set of commands that are generally useful
62before/after sending traffic. Before sending traffic:
John DeNisco06dcd452018-07-26 12:45:10 -040063
64.. code-block:: console
65
66 vppctl clear hardware
67 vppctl clear interface
68 vppctl clear error
69 vppctl clear run
70
71Send some traffic and then issue the following commands.
Dave Barachb93452b2019-02-27 10:14:01 -050072
John DeNisco06dcd452018-07-26 12:45:10 -040073.. code-block:: console
74
75 vppctl show version verbose
76 vppctl show hardware
Paul Vinciguerra917c91a2019-11-07 15:38:59 -050077 vppctl show interface address
John DeNisco06dcd452018-07-26 12:45:10 -040078 vppctl show interface
79 vppctl show run
80 vppctl show error
81
82Here are some protocol specific show commands that may also make
83sense. Only include those features which have been configured.
84
85.. code-block:: console
86
87 vppctl show l2fib
88 vppctl show bridge-domain
Dave Barachb93452b2019-02-27 10:14:01 -050089
John DeNisco06dcd452018-07-26 12:45:10 -040090 vppctl show ip fib
Paul Vinciguerra917c91a2019-11-07 15:38:59 -050091 vppctl show ip neighbors
Dave Barachb93452b2019-02-27 10:14:01 -050092
John DeNisco06dcd452018-07-26 12:45:10 -040093 vppctl show ip6 fib
94 vppctl show ip6 neighbors
Dave Barachb93452b2019-02-27 10:14:01 -050095
John DeNisco06dcd452018-07-26 12:45:10 -040096 vppctl show mpls fib
97 vppctl show mpls tunnel
98
99Network Topology
100----------------
101
102Please include a crisp description of the network topology, including
103L2 / IP / MPLS / segment-routing addressing details. If you expect
104folks to reproduce and debug issues, this is a must.
105
106At or above a certain level of topological complexity, it becomes
107problematic to reproduce the original setup.
108
109Packet Tracer Output
110--------------------
111
112If you capture packet tracer output which seems relevant, please include it.
113
114.. code-block:: console
115
116 vppctl trace add dpdk-input 100 # or similar
117
118send-traffic
119
120.. code-block:: console
121
122 vppctl show trace
123
124Capturing post-mortem data
125==========================
126
127It should go without saying, but anyhow: **please put post-mortem data
128in obvious, accessible places.** Time wasted trying to acquire
129accounts, credentials, and IP addresses simply delays problem
130resolution.
131
132Please remember to add post-mortem data location information to Jira
133tickets.
134
135Syslog Output
136-------------
137
138The vpp signal handler typically writes a certain amount of data in
139/var/log/syslog before exiting. Make sure to check for evidence, e.g
140via "grep /usr/bin/vpp /var/log/syslog" or similar.
141
142Binary API Trace
143----------------
144
145If the issue involves a sequence of control-plane API messages - even
146a very long sequence - please enable control-plane API
147tracing. Control-plane API post-mortem traces end up in
Dave Barachb93452b2019-02-27 10:14:01 -0500148/tmp/api_post_mortem.<pid>.
John DeNisco06dcd452018-07-26 12:45:10 -0400149
150Please remember to put post-mortem binary api traces in accessible
151places.
152
153These API traces are especially helpful in cases where the vpp engine
154is throwing traffic on the floor, e.g. for want of a default route or
155similar.
156
157Make sure to leave the default stanza "... api-trace { on } ... " in
158the vpp startup configuration file /etc/vpp/startup.conf, or to
159include it in the command line arguments passed by orchestration
160software.
161
162Core Files
163----------
164
165Production systems, as well as long-running pre-production soak-test
166systems, **must** arrange to collect core images. There are various
167ways to configure core image capture, including e.g. the Ubuntu
168"corekeeper" package. In a pinch, the following very basic sequence
169will capture usable vpp core files in /tmp/dumps.
170
171.. code-block:: console
172
173 # mkdir -p /tmp/dumps
Dave Barachb93452b2019-02-27 10:14:01 -0500174 # sysctl -w debug.exception-trace=1
John DeNisco06dcd452018-07-26 12:45:10 -0400175 # sysctl -w kernel.core_pattern="/tmp/dumps/%e-%t"
176 # ulimit -c unlimited
177 # echo 2 > /proc/sys/fs/suid_dumpable
178
BenoƮt Ganne6d72c172019-07-04 11:25:59 +0200179If you start VPP from systemd, you also need to edit
180/lib/systemd/system/vpp.service and uncomment the "LimitCORE=infinity"
181line before restarting VPP.
182
Dave Barach328631d2019-12-17 09:35:23 -0500183Vpp core files often appear enormous, but they are invariably
184sparse. Gzip compresses them to manageable sizes. A multi-GByte
185corefile often compresses to 10-20 Mbytes.
186
187When decompressing a vpp core file, we suggest using "dd" as shown to
188create a sparse, uncompressed core file:
189
190.. code-block:: console
191
192 $ zcat vpp_core.gz | dd conv=sparse of=vpp_core
John DeNisco06dcd452018-07-26 12:45:10 -0400193
194Please remember to put compressed core files in accessible places.
195
196Make sure to leave the default stanza "... unix { ... full-coredump
197... } ... " in the vpp startup configuration file
198/etc/vpp/startup.conf, or to include it in the command line arguments
199passed by orchestration software.
200
Dave Barach328631d2019-12-17 09:35:23 -0500201Core files from Private Images
202==============================
203
Dave Barachb93452b2019-02-27 10:14:01 -0500204Core files from private images require special handling. If it's
205necessary to go that route, copy the **exact** Debian packages (or
206RPMs) which correspond to the core file to the same public place as
207the core file. A no-excuses-allowed, hard-and-fast requirement.
John DeNisco06dcd452018-07-26 12:45:10 -0400208
Dave Barachb93452b2019-02-27 10:14:01 -0500209In particular:
John DeNisco06dcd452018-07-26 12:45:10 -0400210
Dave Barachb93452b2019-02-27 10:14:01 -0500211.. code-block:: console
212
213 libvppinfra_<version>_<arch>.deb # vppinfra library
214 libvppinfra-dev_<version>_<arch>.deb # vppinfra library development pkg
215 vpp_<version>_<arch>.deb # the vpp executable
216 vpp-dbg_<version>_<arch>.deb # debug symbols
217 vpp-dev_<version>_<arch>.deb # vpp development pkg
218 vpp-lib_<version>_<arch>.deb # shared libraries
219 vpp-plugin-core_<version>_<arch>.deb # core plugins
220 vpp-plugin-dpdk_<version>_<arch>.deb # dpdk plugin
221
222For reference, please include git commit-ID, branch, and git repo
223information [for repos other than gerrit.fd.io] in the Jira ticket.
224
225Note that git commit-ids are crypto sums of the head [latest]
226**merged** patch. They say **nothing whatsoever** about local
227workspace modifications, branching, or the git repo in question.
228
229Even given a byte-for-byte identical source tree, it's easy to build
230dramatically different binary artifacts. All it takes is a different
231toolchain version.
232
Dave Barachedff8052019-07-12 10:24:03 -0400233
Dave Barach328631d2019-12-17 09:35:23 -0500234On-the-fly Core File Compression
235--------------------------------
Dave Barachedff8052019-07-12 10:24:03 -0400236
237Depending on operational requirements, it's possible to compress
238corefiles as they are generated. Please note that it takes several
239seconds' worth of wall-clock time to compress a vpp core file on the
240fly, during which all packet processing activities are suspended.
241
242To create compressed core files on the fly, create the following
243script, e.g. in /usr/local/bin/compressed_corefiles, owned by root,
244executable:
245
246.. code-block:: console
247
248 #!/bin/sh
249 exec /bin/gzip -f - >"/tmp/dumps/core-$1.$2.gz"
250
251Adjust the kernel core file pattern as shown:
252
253.. code-block:: console
254
255 sysctl -w kernel.core_pattern="|/usr/local/bin/compressed_corefiles %e %t"
256
257Core File Summary
258-----------------
259
Dave Barachb93452b2019-02-27 10:14:01 -0500260Bottom line: please follow core file handling instructions to the
261letter. It's not complicated. Simply copy the exact Debian packages or
262RPMs which correspond to core files to accessible locations.
John DeNisco06dcd452018-07-26 12:45:10 -0400263
264If we go through the setup process only to discover that the image and
Dave Barachb93452b2019-02-27 10:14:01 -0500265core files don't match, it will simply delay resolution of the issue;
266to say nothing of irritating the person who just wasted their time.