blob: 7437d8ae0cc4c53564aaa7a9e0a90d8c3c0638dc [file] [log] [blame]
John DeNisco06dcd452018-07-26 12:45:10 -04001.. _reportingbugs:
2
3.. toctree::
4
5Reporting Bugs
6==============
7
8Although every situation is different, this page describes how to
9collect 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
14information for someone else to understand and possibly to reproduce
15the issue given a reasonable amount of effort. **Unicast emails to
16maintainers, committers, and the project PTL are strongly discouraged.**
17
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
42 Command line arguments:
43 /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
51* Linux Distro (e.g. Ubuntu 14.04.3 LTS, CentOS-7, etc.)
52* 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
63Every situation is different. If the issue involves a sequence of debug CLI command, please enable CLI command logging, and send the sequence involved. Note that the debug CLI is a developer's tool - **no warranty express or implied** - and that we may choose not to fix debug CLI bugs.
64
65Please include "show error" [error counter] output. It's often helpful to "clear error", send a bit of traffic, then "show error" particularly when running vpp on a noisy networks.
66
67Please include ip4 / ip6 / mpls FIB contents ("show ip fib", "show ip6 fib", "show mpls fib", "show mpls tunnel").
68
69Please include "show hardware", "show interface", and "show interface address" output
70
71Here is a consolidated set of commands that are generally useful before/after sending traffic. Before sending traffic.
72
73.. code-block:: console
74
75 vppctl clear hardware
76 vppctl clear interface
77 vppctl clear error
78 vppctl clear run
79
80Send some traffic and then issue the following commands.
81
82.. code-block:: console
83
84 vppctl show version verbose
85 vppctl show hardware
86 vppctl show hardware address
87 vppctl show interface
88 vppctl show run
89 vppctl show error
90
91Here are some protocol specific show commands that may also make
92sense. Only include those features which have been configured.
93
94.. code-block:: console
95
96 vppctl show l2fib
97 vppctl show bridge-domain
98
99 vppctl show ip fib
100 vppctl show ip arp
101
102 vppctl show ip6 fib
103 vppctl show ip6 neighbors
104
105 vppctl show mpls fib
106 vppctl show mpls tunnel
107
108Network Topology
109----------------
110
111Please include a crisp description of the network topology, including
112L2 / IP / MPLS / segment-routing addressing details. If you expect
113folks to reproduce and debug issues, this is a must.
114
115At or above a certain level of topological complexity, it becomes
116problematic to reproduce the original setup.
117
118Packet Tracer Output
119--------------------
120
121If you capture packet tracer output which seems relevant, please include it.
122
123.. code-block:: console
124
125 vppctl trace add dpdk-input 100 # or similar
126
127send-traffic
128
129.. code-block:: console
130
131 vppctl show trace
132
133Capturing post-mortem data
134==========================
135
136It should go without saying, but anyhow: **please put post-mortem data
137in obvious, accessible places.** Time wasted trying to acquire
138accounts, credentials, and IP addresses simply delays problem
139resolution.
140
141Please remember to add post-mortem data location information to Jira
142tickets.
143
144Syslog Output
145-------------
146
147The vpp signal handler typically writes a certain amount of data in
148/var/log/syslog before exiting. Make sure to check for evidence, e.g
149via "grep /usr/bin/vpp /var/log/syslog" or similar.
150
151Binary API Trace
152----------------
153
154If the issue involves a sequence of control-plane API messages - even
155a very long sequence - please enable control-plane API
156tracing. Control-plane API post-mortem traces end up in
157/tmp/api_post_mortem.<pid>.
158
159Please remember to put post-mortem binary api traces in accessible
160places.
161
162These API traces are especially helpful in cases where the vpp engine
163is throwing traffic on the floor, e.g. for want of a default route or
164similar.
165
166Make sure to leave the default stanza "... api-trace { on } ... " in
167the vpp startup configuration file /etc/vpp/startup.conf, or to
168include it in the command line arguments passed by orchestration
169software.
170
171Core Files
172----------
173
174Production systems, as well as long-running pre-production soak-test
175systems, **must** arrange to collect core images. There are various
176ways to configure core image capture, including e.g. the Ubuntu
177"corekeeper" package. In a pinch, the following very basic sequence
178will capture usable vpp core files in /tmp/dumps.
179
180.. code-block:: console
181
182 # mkdir -p /tmp/dumps
183 # sysctl -w debug.exception-trace=1
184 # sysctl -w kernel.core_pattern="/tmp/dumps/%e-%t"
185 # ulimit -c unlimited
186 # echo 2 > /proc/sys/fs/suid_dumpable
187
188Vpp core files often appear enormous. Gzip typically compresses them
189to manageable sizes. A multi-GByte corefile often compresses to 10-20
190Mbytes.
191
192Please remember to put compressed core files in accessible places.
193
194Make sure to leave the default stanza "... unix { ... full-coredump
195... } ... " in the vpp startup configuration file
196/etc/vpp/startup.conf, or to include it in the command line arguments
197passed by orchestration software.
198
199Core files from private, modified images are discouraged. If it's
200necessary to go that route, please copy the **exact** Debian
201packages (or RPMs) corresponding to the core file to the same public
202place as the core file. In particular.
203
204* vpp_<version>_<arch>.deb # the vpp executable
205* vpp-dbg_<version>_<arch>.deb # debug symbols
206* vpp-dev_<version>_<arch>.deb # development package
207* vpp-lib_<version>_<arch>.deb # shared libraries
208* vpp-plugins_<version>_<arch>.deb # plugins
209
210Please include the full commit-ID the Jira ticket.
211
212If we go through the setup process only to discover that the image and
213core files don't match, it will simply delay resolution of the
214issue. And it will annoy the heck out of the engineer who just wasted
215their time. Exact means **exact**, not "oh, gee, I added a few lines
216of debug scaffolding since then..."