]> git.ipfire.org Git - thirdparty/elfutils.git/blob - debuginfod/ChangeLog
debuginfod-find: Be a bit less verbose with -v
[thirdparty/elfutils.git] / debuginfod / ChangeLog
1 2020-11-11 Mark Wielaard <mark@klomp.org>
2
3 * debuginfod-find.c (progressfn): Use clock_gettime to print Progress
4 at most 5 times a second.
5
6 2020-11-01 Érico N. Rolim <erico.erc@gmail.com>
7
8 * debuginfod-client.c (debuginfod_init_cache): Use ACCESSPERMS for
9 mkdir, DEFFILEMODE for open with O_CREAT.
10
11 2020-11-01 Érico N. Rolim <erico.erc@gmail.com>
12
13 * debuginfod.cxx: include libintl.h.
14
15 2020-11-01 Érico N. Rolim <erico.erc@gmail.com>
16
17 * Makefile.am (debuginfod_LDADD): Add argp_LDADD and fts_LIBS.
18 (debuginfod_find_LDADD): Likewise.
19 (libdebuginfod_so_LDLIBS): Add fts_LIBS.
20
21 2020-10-31 Frank Ch. Eigler <fche@redhat.com>
22
23 * debuginfod.cxx (scan_source_file, scan_archive_file): Add new scanned_bytes_total,
24 scanned_files_total metrics.
25 (archive_classify): Exit early if interrupted.
26 (scan_source_paths): Perform realpath/regex checks only on FTS_F files.
27 Tweak metrics.
28
29 2020-10-30 Frank Ch. Eigler <fche@redhat.com>
30
31 PR26775 cont'd.
32 * debuginfod.cxx (thread_main_scanner): Ensure control doesn't
33 leave infinite loop until program exit, even if SIGUSR2.
34 (scan_source_paths): Have traverser clean scanq on
35 SIGUSR2. Emit additional traversed_total metrics.
36 (groom): Emit additional groomed_total metrics.
37 (thread_main_groom): Restore previous thread_work_total
38 metric.
39
40 2020-10-29 Frank Ch. Eigler <fche@redhat.com>
41
42 PR26775
43 * debuginfod.cxx (forced_*_count): Make these global.
44 (runq::clear): New function.
45 (thread_main_scanner): Check for pending SIGUSR2; interrupt.
46 (scan_source_paths): Check for pending SIGUSR2; interrupt.
47 (groom): Report prometheus stats before groom also. Check for
48 pending SIGUSR1; interrupt. Increment thread_work_total for
49 each file scanned, not the entire cycle.
50
51 2020-10-29 Frank Ch. Eigler <fche@redhat.com>
52
53 PR26810
54 * debuginfod.cxx (handle_buildid_*_match): Throw exceptions for
55 more lower level libc errors.
56 (handle_buildid_match): Catch & report exceptions but return 0
57 for continued iteration in the caller.
58
59 2020-10-25 Mark Wielaard <mark@klomp.org>
60
61 * debuginfod-client.c (debuginfod_query_server): Translate
62 CURLE_PEER_FAILED_VERIFICATION to ECONNREFUSED.
63
64 2020-10-20 Frank Ch. Eigler <fche@redhat.com>
65
66 PR26756: more prometheus metrics
67 * debuginfod.cxx (*_exception): Add counters for error occurrences.
68 (fdcache::*): Add counters for fdcache operations and status.
69 (fdcache::set_metric): New fn for overall stat counts.
70 (fdcache::limit): ... allow metric-less use from dtors.
71
72 2020-10-20 Frank Ch. Eigler <fche@redhat.com>
73
74 * debuginfod.cxx (handle_buildid*): Add a parameter for detecting
75 internally-originated lookups for dwz resolution.
76
77 2020-09-18 Frank Ch. Eigler <fche@redhat.com>
78
79 * debuginfod.cxx (scan_source_file, archive_classify): Store only
80 canonicalized file names in sdef & sref records in the database.
81
82 2020-09-08 Mark Wielaard <mark@klomp.org>
83
84 * Makefile.am (BUILD_STATIC): Include libcurl_LIBS in libdebuginfod
85 when NOT DUMMY_LIBDEBUGINFOD.
86
87 2020-09-16 Mark Wielaard <mark@klomp.org>
88
89 * debuginfod-find.c: Fix license block comment.
90
91 2020-09-15 Mark Wielaard <mark@klomp.org>
92
93 * debuginfod-find.c (main): Use dwelf_elf_begin.
94
95 2020-07-03 Alice Zhang <alizhang@redhat.com>
96
97 * debuginfod-client.c (debuginfod_query_server): Use strncasecmp
98 to compare effective_url. Try CURLINFO_SCHEME as fallback.
99
100 2020-06-19 Mark Wielaard <mark@klomp.org>
101
102 * Makefile.am (bin_PROGRAMS): Guard with DEBUGINFOD and
103 LIBDEBUGINFOD.
104 (debuginfod_LDADD): Remove libcurl.
105 (libdebuginfod): When static and DUMMY_LIBDEBUGINFO remove libcurl.
106 (noinst_LIBRARIES): Guard with LIBDEBUGINFOD.
107 (AM_CPPFLAGS): Add -Wno-unused-parameter when DUMMY_LIBDEBUGINFOD.
108 (pkginclude_headers): Guard with LIBDEBUGINFOD
109 (libdebuginfod_so_LIBS): Likewise.
110 (+libdebuginfod_so_LDLIBS): Likewise.
111 (install): Likewise.
112 (uninstall): Likewise.
113 * debuginfod-client.c: Include dummy functions when
114 DUMMY_LIBDEBUGINFOD.
115 * debuginfod.cxx: Remove curl.h include.
116
117 2020-06-16 Mark Wielaard <mark@klomp.org>
118
119 * debuginfod-client.c (debuginfod_query_server): Check malloc.
120 Move curl_multi_init call before handle_data malloc call.
121
122 2020-06-16 Mark Wielaard <mark@klomp.org>
123
124 * debuginfod-client.c (debuginfod_query_server): Replace sizeof
125 build_id_bytes check with strlen build_id check.
126
127 2020-06-16 Mark Wielaard <mark@klomp.org>
128
129 * debuginfod-client.c (debuginfod_query_server): Increase suffix
130 array and prepare having to escape 1 character with 2.
131
132 2020-06-16 Mark Wielaard <mark@klomp.org>
133
134 * debuginfod-client.c (debuginfod_clean_cache): Handle failing
135 fopen (interval_path).
136
137 2020-03-29 Mark Wielaard <mark@klomp.org>
138
139 * debuginfod-client.c (debuginfod_add_http_header): Check header
140 contains precisely one colon that isn't the first or last char.
141
142 2020-03-29 Frank Ch. Eigler <fche@redhat.com>
143
144 * debuginfod-client.c (struct debuginfod_client): Add a flag field
145 for progressfn printing.
146 (default_progressfn): Set it if printing \rsomething.
147 (debuginfod_end): Terminate with \n if flag set, i.e., only if the
148 default_progressfn was actually called.
149
150 2020-03-27 Mark Wielaard <mark@klomp.org>
151
152 * debuginfod.cxx (parse_opt): Check port is not zero.
153
154 2020-03-28 Frank Ch. Eigler <fche@redhat.com>
155
156 * debuginfod.cxx (handle_buildid_r_match): During archive
157 extraction / fdcache prefetching, set the mtime of each
158 file in the cache.
159
160 2020-03-27 Frank Ch. Eigler <fche@redhat.com>
161
162 * debuginfod-find.c (main): Extract buildid from /binary/ if
163 given instead of hex string.
164 * Makefile.am: Add elfutils library prereqs for debuginfod-find.
165
166 2020-03-24 Frank Ch. Eigler <fche@redhat.com>
167
168 * debuginfod.h, libdebuginfod.map: New functions for _add_url_header.
169 * debuginfod-client.c (struct debuginfod_client): Add headers fields.
170 (debuginfod_add_http_header): New client api to add outgoing headers.
171 (add_default_headers): Renamed from add_extra_headers, skip if flag.
172 (debuginfod_query_server): Pass accumulated headers to libcurl.
173 (debuginfod_end): Clean accumulated headers.
174 (debuginfod_find_*): Add default headers at this point.
175 * debuginfod.cxx (handle_buildid): Add conn pointer. Use it to relay
176 incoming UA and XFF headers to federated upstream debuginfods.
177
178 2020-03-26 Frank Ch. Eigler <fche@redhat.com>
179
180 * debuginfod.cxx (handler_cb): Export two families of metrics for
181 prometheus traffic analysis: response times and data amounts.
182
183 2020-03-26 Frank Ch. Eigler <fche@redhat.com>
184
185 * debuginfod.cxx (parse_opt): For -U, prefer dpkg-deb
186 after all if access(3)-able, fallback to bsdtar.
187
188 2020-03-25 Frank Ch. Eigler <fche@redhat.com>
189
190 * debuginfod.cxx (parse_opt): Associate a bsdtar subshell with
191 the .deb & .ddeb extensions, instead of dpkg-deb.
192
193 2020-03-26 Frank Ch. Eigler <fche@redhat.com>
194
195 * debuginfod-client.c (debuginfod_query_server): Don't
196 set CURLOPT_PATH_AS_IS on old curl. Mostly harmless.
197
198 2020-03-24 Frank Ch. Eigler <fche@redhat.com>
199
200 * debuginfod-client.c (debuginfod_query_server): Set
201 CURLOPT_PATH_AS_IS, to propagate file names verbatim.
202 * debuginfod.cxx (canon_pathname): Implement RFC3986
203 style pathname canonicalization.
204 (handle_buildid): Canonicalize incoming webapi source
205 paths, accept either one.
206 (scan_source_file, archive_classify): Store both
207 original and canonicalized dwarf-source file names.
208
209 2020-03-24 Frank Ch. Eigler <fche@redhat.com>
210
211 * debuginfod.cxx (handle_buildid): In case of federated fallback
212 queries, handle errors analogously to local ENOENT/404.
213 (handle_metrics): Return a size-of-response value.
214 (handler_cb): Add code to time entire application-side processing
215 stage + response sizes + http codes, so as to emit a complete
216 httpd-flavoured log line for each webapi request.
217
218 2020-03-24 Frank Ch. Eigler <fche@redhat.com>
219
220 * debuginfod-client.c (debuginfod_query_server): Print the
221 default_progressfn terminating \n message only if that progressfn
222 is actually set.
223
224 2020-03-24 Frank Ch. Eigler <fche@redhat.com>
225
226 * debuginfod-find.c (main): Correct /source full-pathness check for
227 "debuginfod-find -v source deadbeef /pathname" case.
228
229 2020-03-22 Frank Ch. Eigler <fche@redhat.com>
230
231 * debuginfod-client.c (struct debuginfod_client): Add url field.
232 (struct handle_data): Add client field as backpointer.
233 (debuginfod_write_callback): Compute & save URL.
234 (default_progressfn): Print front pieces of the URL.
235 (debuginfod_query_server): Clear URL and cleanup after progressfn.
236 * debuginfod-find.c (main): Print URL at transfer conclusion.
237
238 2020-03-22 Frank Ch. Eigler <fche@redhat.com>
239
240 * debuginfod.h, libdebuginfod.map: New functions for _get/set_user().
241 * debuginfod-client.c: Implement them.
242 * debuginfod-find.c: Include a token call just for testing them.
243
244 2020-03-03 Aaron Merey <amerey@redhat.com>
245
246 * debuginfod-client.c (debuginfod_query_server): Update
247 cache_path even when new default path already exists.
248
249 2020-02-27 Aaron Merey <amerey@redhat.com>
250
251 * debuginfod-client.c (xalloc_str): New macro. Call
252 asprintf with error checking.
253 (debuginfod_query_server): Use XDG_CACHE_HOME as a default
254 cache location if it is set. Replace snprintf with xalloc_str.
255
256 2020-02-26 Konrad Kleine <kkleine@redhat.com>
257
258 * debuginfod-client.c (debuginfod_query_server): Handle curl's
259 response code correctly when DEBUGINFOD_URLS begin with file://
260
261 2020-02-25 Frank Ch. Eigler <fche@redhat.com>
262
263 * debuginfod.cxx (parse_opt): Treat -R as if -Z.rpm .
264
265 2020-02-25 Frank Ch. Eigler <fche@redhat.com>
266
267 * debuginfod.cxx (fdcache_prefetch): New parameter.
268 (parse_opt): Parse it.
269 (main): Default it.
270 (fdcache::fd_size_mb): Change to double for accuracy.
271 (fdcache::probe): New function.
272 (fdcache::intern): New option to intern at end of LRU.
273 (fdcache::lookup): Clean fdcache.
274 (handle_buildid_r_match): Implement multi-stage archive
275 parsing, with optional prefetching of extracted contents
276 into the fdcache.
277
278 2020-02-19 Aaron Merey <amerey@redhat.com>
279
280 * debuginfod-client.c (debuginfod_clean_cache): Restrict
281 cleanup to client-pattern files.
282
283 2020-02-05 Frank Ch. Eigler <fche@redhat.com>
284
285 * debuginfod.cxx (argp options): Add -Z option.
286 (canonicalized_archive_entry_pathname): New function for
287 distro-agnostic file name matching/storage.
288
289 2020-01-22 Frank Ch. Eigler <fche@redhat.com>
290
291 * debuginfod.cxx (dwarf_extract_source_paths): Don't print
292 "skipping hat" messages at verbosity <=3, too noisy.
293
294 2020-01-19 Frank Ch. Eigler <fche@redhat.com>
295
296 * debuginfod.cxx (scanq): Rework to let groomer/fts threads
297 synchronize with an empty workqueue, and lock out workqueue
298 consumers.
299 (thread_groom): Adopt new scanq idle APIs to lock out scanners.
300 (thread_main_fts_source_paths): Adopt new scanq idler API to
301 avoid being restarted while scanners haven't even finished yet.
302 (thread_main_*): Increment thread_work_total metric only after
303 a work cycle is completed, not when it begins.
304
305 2020-01-18 Frank Ch. Eigler <fche@redhat.com>
306
307 * debuginfod.cxx (thread_main_scanner): Handle empty source_paths[].
308
309 2020-01-11 Frank Ch. Eigler <fche@redhat.com>
310
311 * debuginfod.cxx (libarchive_fdcache): New class/facility to own a
312 cache of temporary files that were previously extracted from an
313 archive. If only it could store just unlinked fd's instead of
314 filenames.
315 (handle_buildid_r_match): Use it to answer dwz/altdebug and webapi
316 requests.
317 (groom): Clean it.
318 (main): Initialize the cache control parameters from heuristics.
319 Use a consistent tmpdir for these and tmp files elsewhere.
320
321 2020-01-11 Frank Ch. Eigler <fche@redhat.com>
322
323 * debuginfod.cxx (conninfo): Print User-Agent and X-Forwarded-For
324 request headers, after mild safety-censorship (for easier machine
325 processing).
326
327 2020-01-11 Frank Ch. Eigler <fche@redhat.com>
328
329 * debuginfod.cxx: Rework threading model.
330 (workq): New class for concurrent work-queue.
331 (semaphore): Removed class, now unused.
332 (scan_source_file_path): Rework into ...
333 (scan_source_file): New function.
334 (thread_main_scan_source_file_path): Nuke.
335 (scan_source_archive_path): Rework into ...
336 (scan_archive_file): New function.
337 (thread_main_scanner): New function for scanner threads.
338 (thread_main_fts_source_paths): New function for traversal thread.
339 (scan_source_paths): ... doing this.
340 (thread_groom): Tweak metrics for consistency.
341 (main): Start 1 traversal and N scanner threads if needed.
342
343 2019-01-02 Mark Wielaard <mark@klomp.org>
344
345 * debuginfod.cxx (default_connect_timeout): Removed.
346 (default_transfer_timeout): Removed.
347 (default_timeout): New. Default to 90 seconds.
348 (debuginfod_query_server): Parse server_timeout_envvar as one number.
349 Set as CURLOPT_LOW_SPEED_TIME, with CURL_OPT_LOW_SPEED_LIMITE as 100K.
350
351 2020-01-09 Frank Ch. Eigler <fche@redhat.com>
352
353 * debuginfod-client.c (add_extra_headers): New function,
354 based on mjw's draft.
355 (debuginfod_query_server): Call it.
356
357 2019-12-22 Frank Ch. Eigler <fche@redhat.com>
358
359 * debuginfod.cxx (*_rpm_*): Rename to *_archive_* throughout.
360 (scan_archives): New read-mostly global to identify archive
361 file extensions and corresponding extractor commands.
362 (parse_opt): Handle new -U flag.
363
364 2019-12-19 Frank Ch. Eigler <fche@redhat.com>
365
366 * debuginfod-client.c (default_progressfn): New function.
367 (debuginfod_begin): Use it if $DEBUGINFOD_PROGRESS set.
368 (server_timeout): Bump to 30 seconds.
369 (debuginfod_query_server): Call progressfn -after- rather than
370 before curl ops, to make it likely that a successful transfer
371 results in final a=b call. Tweak cleanup sequence.
372 * debuginfod.h: Document $DEBUGINFOD_PROGRESS name.
373
374 2019-12-09 Mark Wielaard <mark@klomp.org>
375
376 * debuginfod-client.c (debuginfod_query_server): Check
377 server_urls_envvar early.
378
379 2019-12-03 Mark Wielaard <mark@klomp.org>
380
381 * debuginfod-client.c (debuginfod_query_server): Use separate
382 local variables for CURLcode curl_res and CURLMcode curlm_res.
383
384 2019-11-26 Mark Wielaard <mark@klomp.org>
385
386 * Makefile.am (BUILD_STATIC): Add needed libraries for libdw and
387 libdebuginfod.
388
389 2019-11-25 Frank Ch. Eigler <fche@redhat.com>
390
391 * debuginfod.cxx (groom): Add a sqlite3_db_release_memory()
392 at the end of periodic grooming to try to shrink the process.
393
394 2019-11-24 Mark Wielaard <mark@klomp.org>
395
396 * debuginfod.cxx (test_webapi_sleep): Removed.
397 (handler_cb): Don't check test_webapi_sleep and sleep.
398 (main): Don't set test_webapi_sleep.
399
400 2019-11-24 Mark Wielaard <mark@klomp.org>
401
402 * debuginfod.cxx (add_metric): New function.
403 (scan_source_file_path): Record metrics for
404 found_executable_total, found_debuginfo_total and
405 found_sourcerefs_total.
406 (scan_source_rpm_path): Likewise.
407
408 2019-11-07 Frank Ch. Eigler <fche@redhat.com>
409
410 * debuginfod.cxx: Add /metrics endpoint. Add numerous
411 calls to new functions inc_metric/set_metric to populate
412 threadsafe map containing stats. Add http content-type
413 response headers throughout.
414 (thread_main_*): Simplify counter/timer flow.
415 (main): Reorder web service shutdown to leave http running
416 as long as possible.
417 * debuginfod.8: Document it, add security caution.
418
419 2019-11-06 Frank Ch. Eigler <fche@redhat.com>
420
421 * debuginfod.cxx: Add new -L (symlink-following) mode.
422 * debuginfod.8: Document it.
423
424 2019-11-04 Frank Ch. Eigler <fche@redhat.com>
425
426 * debuginfo-client.c (debuginfod_set_progressfn): New function
427 for progress/interrupt callback.
428 (debuginfod_clean_cache, debuginfod_query_server): Call it.
429 * debuginfo.h: Declare it.
430 * debuginfod_set_progressfn.3, *_find_debuginfo.3: Document it.
431 * Makefile.am: Install it.
432 * libdebuginfod.map: Export it all under ELFUTILS_0.178 symversion.
433
434 * debuginfod-find.c: Add -v option to activate progress cb.
435 * debuginfod-find.1: Document it.
436 * debuginfod.cxx: Add $DEBUGINFOD_TEST_WEBAPI_SLEEP env var
437 to insert sleep in webapi callbacks, to help manual testing.
438
439 2019-10-28 Frank Ch. Eigler <fche@redhat.com>
440
441 * debuginfod.cxx: New file: debuginfod server.
442 * debuginfod.8: New file: man page.
443 * Makefile.am: Build it.
444
445 2019-10-28 Aaron Merey <amerey@redhat.com>
446
447 * debuginfod-client.c: New file: debuginfod client library.
448 * debuginfod.h: New file: header for same.
449 * libdebuginfod.map: New file: govern its solib exports.
450 * debuginfod-find.c: New file: command line frontend.
451 * debuginfod-find.1, debuginfod_find_source.3,
452 debuginfod_find_executable.3, debuginfod_find_debuginfo.3:
453 New man pages.