Hi - > I found this somewhat hard to review since the indenting isn't > following the (GNU) style used in the rest of the file. Please place > curly brackets on their own line when possible.
OK. > > +2020-10-20 Frank Ch. Eigler <f...@redhat.com> > > + > > + PR26756: more prometheus metrics > > + * debuginfod.cxx (*_exception): Add counters for error occurrences. > > + (fdcache::*): Add counters for fdcache operations and status. > > Also a new public set_metrics() function. OK. > In general these changes look correct. > Unfortunately the test crashes on my RHEL7 with DTS9 system: > [...] > #11 0x00007f924ecb7ce9 in __run_exit_handlers (status=0, > listp=0x7f924f0456c8 <__exit_funcs>, > run_list_atexit=run_list_atexit@entry=true) at exit.c:77 > #12 0x00007f924ecb7d37 in __GI_exit (status=<optimized out>) at exit.c:99 > #13 0x00007f924eca055c in __libc_start_main ( > main=0x40ad40 <main(int, char**)>, argc=10, argv=0x7ffc8ebaf6a8, > init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, > stack_end=0x7ffc8ebaf698) at ../csu/libc-start.c:300 > #14 0x000000000040c3e5 in _start () > at /opt/rh/devtoolset-9/root/usr/include/c++/9/bits/stl_tree.h:211 > Which seems to be caused by the libarchive_fdcache destructor calling > limit (0,0) triggering the new inc_metric which somehow cannot use the > metrics map? Ah it's a global variable destructor sequencing issue. Hmm what a pain, ok will think of a solution. > > +# create a 000 empty .rpm file to evoke a metric-visible error > > +touch R/nothing.rpm > > +chmod 000 R/nothing.rpm > > + > > Does this cause any issues during cleanup? > I would have expected something like: > > if [ -f R/nothing.rpm ]; then chmod 644 R/nothing.rpm; fi > > in cleanup(). But maybe the rm -f takes care of that? There's a "rm -rf R" in cleanup, so is covered. - FChE