xref: /aosp_15_r20/external/curl/docs/BUGS.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker<!--
2*6236dae4SAndroid Build Coastguard WorkerCopyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard Worker
4*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
5*6236dae4SAndroid Build Coastguard Worker-->
6*6236dae4SAndroid Build Coastguard Worker
7*6236dae4SAndroid Build Coastguard Worker# BUGS
8*6236dae4SAndroid Build Coastguard Worker
9*6236dae4SAndroid Build Coastguard Worker## There are still bugs
10*6236dae4SAndroid Build Coastguard Worker
11*6236dae4SAndroid Build Coastguard Worker Curl and libcurl keep being developed. Adding features and changing code
12*6236dae4SAndroid Build Coastguard Worker means that bugs sneak in, no matter how hard we try to keep them out.
13*6236dae4SAndroid Build Coastguard Worker
14*6236dae4SAndroid Build Coastguard Worker Of course there are lots of bugs left. Not to mention misfeatures.
15*6236dae4SAndroid Build Coastguard Worker
16*6236dae4SAndroid Build Coastguard Worker To help us make curl the stable and solid product we want it to be, we need
17*6236dae4SAndroid Build Coastguard Worker bug reports and bug fixes.
18*6236dae4SAndroid Build Coastguard Worker
19*6236dae4SAndroid Build Coastguard Worker## Where to report
20*6236dae4SAndroid Build Coastguard Worker
21*6236dae4SAndroid Build Coastguard Worker If you cannot fix a bug yourself and submit a fix for it, try to report an as
22*6236dae4SAndroid Build Coastguard Worker detailed report as possible to a curl mailing list to allow one of us to have
23*6236dae4SAndroid Build Coastguard Worker a go at a solution. You can optionally also submit your problem in [curl's
24*6236dae4SAndroid Build Coastguard Worker bug tracking system](https://github.com/curl/curl/issues).
25*6236dae4SAndroid Build Coastguard Worker
26*6236dae4SAndroid Build Coastguard Worker Please read the rest of this document below first before doing that.
27*6236dae4SAndroid Build Coastguard Worker
28*6236dae4SAndroid Build Coastguard Worker If you feel you need to ask around first, find a suitable [mailing list](
29*6236dae4SAndroid Build Coastguard Worker https://curl.se/mail/) and post your questions there.
30*6236dae4SAndroid Build Coastguard Worker
31*6236dae4SAndroid Build Coastguard Worker## Security bugs
32*6236dae4SAndroid Build Coastguard Worker
33*6236dae4SAndroid Build Coastguard Worker If you find a bug or problem in curl or libcurl that you think has a security
34*6236dae4SAndroid Build Coastguard Worker impact, for example a bug that can put users in danger or make them
35*6236dae4SAndroid Build Coastguard Worker vulnerable if the bug becomes public knowledge, then please report that bug
36*6236dae4SAndroid Build Coastguard Worker using our security development process.
37*6236dae4SAndroid Build Coastguard Worker
38*6236dae4SAndroid Build Coastguard Worker Security related bugs or bugs that are suspected to have a security impact,
39*6236dae4SAndroid Build Coastguard Worker should be reported on the [curl security tracker at
40*6236dae4SAndroid Build Coastguard Worker HackerOne](https://hackerone.com/curl).
41*6236dae4SAndroid Build Coastguard Worker
42*6236dae4SAndroid Build Coastguard Worker This ensures that the report reaches the curl security team so that they
43*6236dae4SAndroid Build Coastguard Worker first can deal with the report away from the public to minimize the harm and
44*6236dae4SAndroid Build Coastguard Worker impact it has on existing users out there who might be using the vulnerable
45*6236dae4SAndroid Build Coastguard Worker versions.
46*6236dae4SAndroid Build Coastguard Worker
47*6236dae4SAndroid Build Coastguard Worker The curl project's process for handling security related issues is
48*6236dae4SAndroid Build Coastguard Worker [documented separately](https://curl.se/dev/secprocess.html).
49*6236dae4SAndroid Build Coastguard Worker
50*6236dae4SAndroid Build Coastguard Worker## What to report
51*6236dae4SAndroid Build Coastguard Worker
52*6236dae4SAndroid Build Coastguard Worker When reporting a bug, you should include all information to help us
53*6236dae4SAndroid Build Coastguard Worker understand what is wrong, what you expected to happen and how to repeat the
54*6236dae4SAndroid Build Coastguard Worker bad behavior. You therefore need to tell us:
55*6236dae4SAndroid Build Coastguard Worker
56*6236dae4SAndroid Build Coastguard Worker - your operating system's name and version number
57*6236dae4SAndroid Build Coastguard Worker
58*6236dae4SAndroid Build Coastguard Worker - what version of curl you are using (`curl -V` is fine)
59*6236dae4SAndroid Build Coastguard Worker
60*6236dae4SAndroid Build Coastguard Worker - versions of the used libraries that libcurl is built to use
61*6236dae4SAndroid Build Coastguard Worker
62*6236dae4SAndroid Build Coastguard Worker - what URL you were working with (if possible), at least which protocol
63*6236dae4SAndroid Build Coastguard Worker
64*6236dae4SAndroid Build Coastguard Worker and anything and everything else you think matters. Tell us what you expected
65*6236dae4SAndroid Build Coastguard Worker to happen, tell use what did happen, tell us how you could make it work
66*6236dae4SAndroid Build Coastguard Worker another way. Dig around, try out, test. Then include all the tiny bits and
67*6236dae4SAndroid Build Coastguard Worker pieces in your report. You benefit from this yourself, as it enables us to
68*6236dae4SAndroid Build Coastguard Worker help you quicker and more accurately.
69*6236dae4SAndroid Build Coastguard Worker
70*6236dae4SAndroid Build Coastguard Worker Since curl deals with networks, it often helps us if you include a protocol
71*6236dae4SAndroid Build Coastguard Worker debug dump with your bug report. The output you get by using the `-v` or
72*6236dae4SAndroid Build Coastguard Worker `--trace` options.
73*6236dae4SAndroid Build Coastguard Worker
74*6236dae4SAndroid Build Coastguard Worker If curl crashed, causing a core dump (in Unix), there is hardly any use to
75*6236dae4SAndroid Build Coastguard Worker send that huge file to anyone of us. Unless we have the same system setup as
76*6236dae4SAndroid Build Coastguard Worker you, we cannot do much with it. Instead, we ask you to get a stack trace and
77*6236dae4SAndroid Build Coastguard Worker send that (much smaller) output to us instead.
78*6236dae4SAndroid Build Coastguard Worker
79*6236dae4SAndroid Build Coastguard Worker The address and how to subscribe to the mailing lists are detailed in the
80*6236dae4SAndroid Build Coastguard Worker `MANUAL.md` file.
81*6236dae4SAndroid Build Coastguard Worker
82*6236dae4SAndroid Build Coastguard Worker## libcurl problems
83*6236dae4SAndroid Build Coastguard Worker
84*6236dae4SAndroid Build Coastguard Worker When you have written your own application with libcurl to perform transfers,
85*6236dae4SAndroid Build Coastguard Worker it is even more important to be specific and detailed when reporting bugs.
86*6236dae4SAndroid Build Coastguard Worker
87*6236dae4SAndroid Build Coastguard Worker Tell us the libcurl version and your operating system. Tell us the name and
88*6236dae4SAndroid Build Coastguard Worker version of all relevant sub-components like for example the SSL library
89*6236dae4SAndroid Build Coastguard Worker you are using and what name resolving your libcurl uses. If you use SFTP or
90*6236dae4SAndroid Build Coastguard Worker SCP, the libssh2 version is relevant etc.
91*6236dae4SAndroid Build Coastguard Worker
92*6236dae4SAndroid Build Coastguard Worker Showing us a real source code example repeating your problem is the best way
93*6236dae4SAndroid Build Coastguard Worker to get our attention and it greatly increases our chances to understand your
94*6236dae4SAndroid Build Coastguard Worker problem and to work on a fix (if we agree it truly is a problem).
95*6236dae4SAndroid Build Coastguard Worker
96*6236dae4SAndroid Build Coastguard Worker Lots of problems that appear to be libcurl problems are actually just abuses
97*6236dae4SAndroid Build Coastguard Worker of the libcurl API or other malfunctions in your applications. It is advised
98*6236dae4SAndroid Build Coastguard Worker that you run your problematic program using a memory debug tool like valgrind
99*6236dae4SAndroid Build Coastguard Worker or similar before you post memory-related or "crashing" problems to us.
100*6236dae4SAndroid Build Coastguard Worker
101*6236dae4SAndroid Build Coastguard Worker## Who fixes the problems
102*6236dae4SAndroid Build Coastguard Worker
103*6236dae4SAndroid Build Coastguard Worker If the problems or bugs you describe are considered to be bugs, we want to
104*6236dae4SAndroid Build Coastguard Worker have the problems fixed.
105*6236dae4SAndroid Build Coastguard Worker
106*6236dae4SAndroid Build Coastguard Worker There are no developers in the curl project that are paid to work on bugs.
107*6236dae4SAndroid Build Coastguard Worker All developers that take on reported bugs do this on a voluntary basis. We do
108*6236dae4SAndroid Build Coastguard Worker it out of an ambition to keep curl and libcurl excellent products and out of
109*6236dae4SAndroid Build Coastguard Worker pride.
110*6236dae4SAndroid Build Coastguard Worker
111*6236dae4SAndroid Build Coastguard Worker Please do not assume that you can just lump over something to us and it then
112*6236dae4SAndroid Build Coastguard Worker magically gets fixed after some given time. Most often we need feedback and
113*6236dae4SAndroid Build Coastguard Worker help to understand what you have experienced and how to repeat a problem.
114*6236dae4SAndroid Build Coastguard Worker Then we may only be able to assist YOU to debug the problem and to track down
115*6236dae4SAndroid Build Coastguard Worker the proper fix.
116*6236dae4SAndroid Build Coastguard Worker
117*6236dae4SAndroid Build Coastguard Worker We get reports from many people every month and each report can take a
118*6236dae4SAndroid Build Coastguard Worker considerable amount of time to really go to the bottom with.
119*6236dae4SAndroid Build Coastguard Worker
120*6236dae4SAndroid Build Coastguard Worker## How to get a stack trace
121*6236dae4SAndroid Build Coastguard Worker
122*6236dae4SAndroid Build Coastguard Worker First, you must make sure that you compile all sources with `-g` and that you
123*6236dae4SAndroid Build Coastguard Worker do not 'strip' the final executable. Try to avoid optimizing the code as well,
124*6236dae4SAndroid Build Coastguard Worker remove `-O`, `-O2` etc from the compiler options.
125*6236dae4SAndroid Build Coastguard Worker
126*6236dae4SAndroid Build Coastguard Worker Run the program until it cores.
127*6236dae4SAndroid Build Coastguard Worker
128*6236dae4SAndroid Build Coastguard Worker Run your debugger on the core file, like `<debugger> curl core`. `<debugger>`
129*6236dae4SAndroid Build Coastguard Worker should be replaced with the name of your debugger, in most cases that is
130*6236dae4SAndroid Build Coastguard Worker `gdb`, but `dbx` and others also occur.
131*6236dae4SAndroid Build Coastguard Worker
132*6236dae4SAndroid Build Coastguard Worker When the debugger has finished loading the core file and presents you a
133*6236dae4SAndroid Build Coastguard Worker prompt, enter `where` (without quotes) and press return.
134*6236dae4SAndroid Build Coastguard Worker
135*6236dae4SAndroid Build Coastguard Worker The list that is presented is the stack trace. If everything worked, it is
136*6236dae4SAndroid Build Coastguard Worker supposed to contain the chain of functions that were called when curl
137*6236dae4SAndroid Build Coastguard Worker crashed. Include the stack trace with your detailed bug report, it helps a
138*6236dae4SAndroid Build Coastguard Worker lot.
139*6236dae4SAndroid Build Coastguard Worker
140*6236dae4SAndroid Build Coastguard Worker## Bugs in libcurl bindings
141*6236dae4SAndroid Build Coastguard Worker
142*6236dae4SAndroid Build Coastguard Worker There are of course bugs in libcurl bindings. You should then primarily
143*6236dae4SAndroid Build Coastguard Worker approach the team that works on that particular binding and see what you can
144*6236dae4SAndroid Build Coastguard Worker do to help them fix the problem.
145*6236dae4SAndroid Build Coastguard Worker
146*6236dae4SAndroid Build Coastguard Worker If you suspect that the problem exists in the underlying libcurl, then please
147*6236dae4SAndroid Build Coastguard Worker convert your program over to plain C and follow the steps outlined above.
148*6236dae4SAndroid Build Coastguard Worker
149*6236dae4SAndroid Build Coastguard Worker## Bugs in old versions
150*6236dae4SAndroid Build Coastguard Worker
151*6236dae4SAndroid Build Coastguard Worker The curl project typically releases new versions every other month, and we
152*6236dae4SAndroid Build Coastguard Worker fix several hundred bugs per year. For a huge table of releases, number of
153*6236dae4SAndroid Build Coastguard Worker bug fixes and more, see: https://curl.se/docs/releases.html
154*6236dae4SAndroid Build Coastguard Worker
155*6236dae4SAndroid Build Coastguard Worker The developers in the curl project do not have bandwidth or energy enough to
156*6236dae4SAndroid Build Coastguard Worker maintain several branches or to spend much time on hunting down problems in
157*6236dae4SAndroid Build Coastguard Worker old versions when chances are we already fixed them or at least that they have
158*6236dae4SAndroid Build Coastguard Worker changed nature and appearance in later versions.
159*6236dae4SAndroid Build Coastguard Worker
160*6236dae4SAndroid Build Coastguard Worker When you experience a problem and want to report it, you really SHOULD
161*6236dae4SAndroid Build Coastguard Worker include the version number of the curl you are using when you experience the
162*6236dae4SAndroid Build Coastguard Worker issue. If that version number shows us that you are using an out-of-date curl,
163*6236dae4SAndroid Build Coastguard Worker you should also try out a modern curl version to see if the problem persists
164*6236dae4SAndroid Build Coastguard Worker or how/if it has changed in appearance.
165*6236dae4SAndroid Build Coastguard Worker
166*6236dae4SAndroid Build Coastguard Worker Even if you cannot immediately upgrade your application/system to run the
167*6236dae4SAndroid Build Coastguard Worker latest curl version, you can most often at least run a test version or
168*6236dae4SAndroid Build Coastguard Worker experimental build or similar, to get this confirmed or not.
169*6236dae4SAndroid Build Coastguard Worker
170*6236dae4SAndroid Build Coastguard Worker At times people insist that they cannot upgrade to a modern curl version, but
171*6236dae4SAndroid Build Coastguard Worker instead, they "just want the bug fixed". That is fine, just do not count on us
172*6236dae4SAndroid Build Coastguard Worker spending many cycles on trying to identify which single commit, if that is
173*6236dae4SAndroid Build Coastguard Worker even possible, that at some point in the past fixed the problem you are now
174*6236dae4SAndroid Build Coastguard Worker experiencing.
175*6236dae4SAndroid Build Coastguard Worker
176*6236dae4SAndroid Build Coastguard Worker Security wise, it is almost always a bad idea to lag behind the current curl
177*6236dae4SAndroid Build Coastguard Worker versions by a lot. We keep discovering and reporting security problems
178*6236dae4SAndroid Build Coastguard Worker over time see you can see in [this
179*6236dae4SAndroid Build Coastguard Worker table](https://curl.se/docs/vulnerabilities.html)
180*6236dae4SAndroid Build Coastguard Worker
181*6236dae4SAndroid Build Coastguard Worker# Bug fixing procedure
182*6236dae4SAndroid Build Coastguard Worker
183*6236dae4SAndroid Build Coastguard Worker## What happens on first filing
184*6236dae4SAndroid Build Coastguard Worker
185*6236dae4SAndroid Build Coastguard Worker When a new issue is posted in the issue tracker or on the mailing list, the
186*6236dae4SAndroid Build Coastguard Worker team of developers first needs to see the report. Maybe they took the day off,
187*6236dae4SAndroid Build Coastguard Worker maybe they are off in the woods hunting. Have patience. Allow at least a few
188*6236dae4SAndroid Build Coastguard Worker days before expecting someone to have responded.
189*6236dae4SAndroid Build Coastguard Worker
190*6236dae4SAndroid Build Coastguard Worker In the issue tracker, you can expect that some labels are set on the issue to
191*6236dae4SAndroid Build Coastguard Worker help categorize it.
192*6236dae4SAndroid Build Coastguard Worker
193*6236dae4SAndroid Build Coastguard Worker## First response
194*6236dae4SAndroid Build Coastguard Worker
195*6236dae4SAndroid Build Coastguard Worker If your issue/bug report was not perfect at once (and few are), chances are
196*6236dae4SAndroid Build Coastguard Worker that someone asks follow-up questions. Which version did you use? Which
197*6236dae4SAndroid Build Coastguard Worker options did you use? How often does the problem occur? How can we reproduce
198*6236dae4SAndroid Build Coastguard Worker this problem? Which protocols does it involve? Or perhaps much more specific
199*6236dae4SAndroid Build Coastguard Worker and deep diving questions. It all depends on your specific issue.
200*6236dae4SAndroid Build Coastguard Worker
201*6236dae4SAndroid Build Coastguard Worker You should then respond to these follow-up questions and provide more info
202*6236dae4SAndroid Build Coastguard Worker about the problem, so that we can help you figure it out. Or maybe you can
203*6236dae4SAndroid Build Coastguard Worker help us figure it out. An active back-and-forth communication is important
204*6236dae4SAndroid Build Coastguard Worker and the key for finding a cure and landing a fix.
205*6236dae4SAndroid Build Coastguard Worker
206*6236dae4SAndroid Build Coastguard Worker## Not reproducible
207*6236dae4SAndroid Build Coastguard Worker
208*6236dae4SAndroid Build Coastguard Worker We may require further work from you who actually see or experience the
209*6236dae4SAndroid Build Coastguard Worker problem if we cannot reproduce it and cannot understand it even after having
210*6236dae4SAndroid Build Coastguard Worker gotten all the info we need and having studied the source code over again.
211*6236dae4SAndroid Build Coastguard Worker
212*6236dae4SAndroid Build Coastguard Worker## Unresponsive
213*6236dae4SAndroid Build Coastguard Worker
214*6236dae4SAndroid Build Coastguard Worker If the problem have not been understood or reproduced, and there is nobody
215*6236dae4SAndroid Build Coastguard Worker responding to follow-up questions or questions asking for clarifications or
216*6236dae4SAndroid Build Coastguard Worker for discussing possible ways to move forward with the task, we take that as a
217*6236dae4SAndroid Build Coastguard Worker strong suggestion that the bug is unimportant.
218*6236dae4SAndroid Build Coastguard Worker
219*6236dae4SAndroid Build Coastguard Worker Unimportant issues are closed as inactive sooner or later as they cannot be
220*6236dae4SAndroid Build Coastguard Worker fixed. The inactivity period (waiting for responses) should not be shorter
221*6236dae4SAndroid Build Coastguard Worker than two weeks but may extend months.
222*6236dae4SAndroid Build Coastguard Worker
223*6236dae4SAndroid Build Coastguard Worker## Lack of time/interest
224*6236dae4SAndroid Build Coastguard Worker
225*6236dae4SAndroid Build Coastguard Worker Bugs that are filed and are understood can unfortunately end up in the
226*6236dae4SAndroid Build Coastguard Worker "nobody cares enough about it to work on it" category. Such bugs are
227*6236dae4SAndroid Build Coastguard Worker perfectly valid problems that *should* get fixed but apparently are not. We
228*6236dae4SAndroid Build Coastguard Worker try to mark such bugs as `KNOWN_BUGS material` after a time of inactivity and
229*6236dae4SAndroid Build Coastguard Worker if no activity is noticed after yet some time those bugs are added to the
230*6236dae4SAndroid Build Coastguard Worker `KNOWN_BUGS` document and are closed in the issue tracker.
231*6236dae4SAndroid Build Coastguard Worker
232*6236dae4SAndroid Build Coastguard Worker## `KNOWN_BUGS`
233*6236dae4SAndroid Build Coastguard Worker
234*6236dae4SAndroid Build Coastguard Worker This is a list of known bugs. Bugs we know exist and that have been pointed
235*6236dae4SAndroid Build Coastguard Worker out but that have not yet been fixed. The reasons for why they have not been
236*6236dae4SAndroid Build Coastguard Worker fixed can involve anything really, but the primary reason is that nobody has
237*6236dae4SAndroid Build Coastguard Worker considered these problems to be important enough to spend the necessary time
238*6236dae4SAndroid Build Coastguard Worker and effort to have them fixed.
239*6236dae4SAndroid Build Coastguard Worker
240*6236dae4SAndroid Build Coastguard Worker The `KNOWN_BUGS` items are always up for grabs and we love the ones who bring
241*6236dae4SAndroid Build Coastguard Worker one of them back to life and offer solutions to them.
242*6236dae4SAndroid Build Coastguard Worker
243*6236dae4SAndroid Build Coastguard Worker The `KNOWN_BUGS` document has a sibling document known as `TODO`.
244*6236dae4SAndroid Build Coastguard Worker
245*6236dae4SAndroid Build Coastguard Worker## `TODO`
246*6236dae4SAndroid Build Coastguard Worker
247*6236dae4SAndroid Build Coastguard Worker Issues that are filed or reported that are not really bugs but more missing
248*6236dae4SAndroid Build Coastguard Worker features or ideas for future improvements and so on are marked as
249*6236dae4SAndroid Build Coastguard Worker *enhancement* or *feature-request* and get added to the `TODO` document and
250*6236dae4SAndroid Build Coastguard Worker the issues are closed. We do not keep TODO items open in the issue tracker.
251*6236dae4SAndroid Build Coastguard Worker
252*6236dae4SAndroid Build Coastguard Worker The `TODO` document is full of ideas and suggestions of what we can add or
253*6236dae4SAndroid Build Coastguard Worker fix one day. You are always encouraged and free to grab one of those items and
254*6236dae4SAndroid Build Coastguard Worker take up a discussion with the curl development team on how that could be
255*6236dae4SAndroid Build Coastguard Worker implemented or provided in the project so that you can work on ticking it odd
256*6236dae4SAndroid Build Coastguard Worker that document.
257*6236dae4SAndroid Build Coastguard Worker
258*6236dae4SAndroid Build Coastguard Worker If an issue is rather a bug and not a missing feature or functionality, it is
259*6236dae4SAndroid Build Coastguard Worker listed in `KNOWN_BUGS` instead.
260*6236dae4SAndroid Build Coastguard Worker
261*6236dae4SAndroid Build Coastguard Worker## Closing off stalled bugs
262*6236dae4SAndroid Build Coastguard Worker
263*6236dae4SAndroid Build Coastguard Worker The [issue and pull request trackers](https://github.com/curl/curl) only hold
264*6236dae4SAndroid Build Coastguard Worker "active" entries open (using a non-precise definition of what active actually
265*6236dae4SAndroid Build Coastguard Worker is, but they are at least not completely dead). Those that are abandoned or
266*6236dae4SAndroid Build Coastguard Worker in other ways dormant are closed and sometimes added to `TODO` and
267*6236dae4SAndroid Build Coastguard Worker `KNOWN_BUGS` instead.
268*6236dae4SAndroid Build Coastguard Worker
269*6236dae4SAndroid Build Coastguard Worker This way, we only have "active" issues open on GitHub. Irrelevant issues and
270*6236dae4SAndroid Build Coastguard Worker pull requests do not distract developers or casual visitors.
271