Debian Codegraph @

doc/bugs.md

raw
1 BUG REPORTS
2 ===========
3
4 The following is information for reporting bugs. Please read
5 the file as well as the documentation for the relevant program
6 before posting. This document is more useful for advanced users
7 and the people that package for the distributions.
8
9 Also if you are an end-user of the programs and not the packager
10 and are using a distribution, check their bug tracker first,
11 you may find its a known bug already.
12
13
14 Where to send
15 -------------
16 You can raise issues on the GitLab issues tracker which is
17 located at https://gitlab.com/procps-ng/procps/issues You
18 will need a GitLab login to do so.
19
20 Alternatively send comments, bug reports, patches, etc.
21 to the email list [email protected]
22
23 What to send
24 ------------
25 It is much more useful to us if a program really crashes to recompile it
26 with make `CFLAGS=-ggdb -O`, run it with `gdb prog` and `run` and send
27 me a stack trace (`bt` command). That said, any bug report is still
28 better than none.
29
30 strace and ltrace output are very helpful:
31
32 > strace -o output-file ps --blah
33 > bzip2 output-file
34
35 The output of `ps --info` is often quite useful, even if the problem
36 is not with ps itself. A lot of the utilities use the same library.
37
38 Merge Requests
39 --------------
40 Merge requests are fine to use and give a central place for
41 everyone involved to have a look. Merge requests are found
42 on GitLab at https://gitlab.com/procps-ng/procps/merge_requests
43 It is best to follow up your merge request with an email to
44 the list saying what you have done.
45
46 Patches
47 -------
48 While merge requests are preferred, patches are also welcome.
49 Get latest version of the source from upstream git.
50
51 > git clone [email protected]:procps-ng/procps.git
52
53 and use `git format-patch` format. It is fine to attach patches as
54 compressed tar balls. When you are about to send very large number
55 of patches consider setting up your personal clone, and send a pull
56 request.
57
58 > git request-pull commit-id \
59 > git://gitorious.org/~yourlogin/procps/your-clone.git
60
61
62 Kernel-Dependent Patches
63 ------------------------
64 If you send patches which are specific to *running* with a particular
65 kernel version of /proc, please condition them with the runtime determined
66 variable `linux_version_code` from libproc/version.c. It is the same
67 number as the macro `LINUX_VERSION_CODE` for which the kernel /proc fs
68 code was compiled.
69
70 A macro is provide in libproc/misc.h to construct the code from its
71 components, e.g.
72 > if (linux_version_code < LINUX_VERSION(2,5,41))
73 > /* blah blah blah */
74 A startup call to `set_linux_version` may also be necessary.
75
76 Of course, if a bug is due to a change in kernel file formats, it would
77 be best to first try to generalize the parsing, since the code is then
78 more resilient against future change.
79
80 Code Structure
81 --------------
82 A goal is to encapsulate *all* parsing dependent on /proc
83 file formats into the libproc library. If the API is general enough
84 it can hopefully stabilize and then /proc changes might only require
85 updating libproc.so. Beyond that having the set of utilities be simple
86 command lines parsers and output formatters and encapsulating all kernel
87 divergence in libproc is the way to go.
88
89 Hence if you are submitting a new program or are fixing an old one, keep
90 in mind that adding files to libproc which encapsulate such things is
91 more desirable than patching the actual driver program. (well, except
92 to move it toward the API of the library).