List for cgit developers and users
 help / color / mirror / Atom feed
* SEGV in cgit-1.2.3 on unreadable refs/tags/FOO
@ 2023-06-10  0:03 Frank Ch. Eigler
  0 siblings, 0 replies; only message in thread
From: Frank Ch. Eigler @ 2023-06-10  0:03 UTC (permalink / raw)
  To: cgit

Hi -

Over on, we run a cgit instance to expose the various
git repos held there.  We noticed in the logs a recurrent SEGV of the
cgi-bin/cgit process, looking thusly:

#0  0x000056510452bfae in cgit_mk_refinfo (oid=0x565105f5bc98, refname=0x565105f5bcca "cluster-2.99.02") at ../shared.c:165
#1  cgit_refs_cb (refname=0x565105f5bcca "cluster-2.99.02", oid=0x565105f5bc98, flags=<optimized out>, cb_data=0x7fff6dc25fc0)
    at ../shared.c:217
#2  0x00005651045d3b44 in do_for_each_repo_ref_iterator (r=0x56510490fc20 <the_repo>, iter=0x565105f7de00,
    fn=fn@entry=0x5651045c6cc0 <do_for_each_ref_helper>, cb_data=cb_data@entry=0x7fff6dc25f80) at refs/iterator.c:418
#3  0x00005651045c9669 in do_for_each_ref (refs=<optimized out>, prefix=prefix@entry=0x5651046a1d4e "refs/tags/",
    fn=<optimized out>, trim=<optimized out>, flags=flags@entry=(unknown: 0),
    cb_data=cb_data@entry=0x56510453295b <cgit_print_tags+75>) at refs.c:1498
#4  0x00005651045c96f2 in refs_for_each_ref_in (refs=<optimized out>, prefix=prefix@entry=0x5651046a1d4e "refs/tags/",
    fn=<optimized out>, cb_data=cb_data@entry=0x56510453295b <cgit_print_tags+75>) at refs.c:1515
#5  0x00005651045ca217 in refs_for_each_tag_ref (cb_data=0x56510453295b <cgit_print_tags+75>, fn=<optimized out>,
    refs=<optimized out>) at refs.c:409
#6  for_each_tag_ref (fn=<optimized out>, cb_data=cb_data@entry=0x7fff6dc25fc0) at refs.c:414
#7  0x000056510453295b in cgit_print_tags (maxcount=2087820800) at ../ui-refs.c:185
#8  0x0000565104539e1d in cgit_print_summary () at ../ui-summary.c:56
#9  0x0000565104525c1f in process_request () at ../cgit.c:755

(gdb) print *oid
$1 = {hash = '\000' <repeats 31 times>, algo = 1}

It appears as though the oid is null or invalid.  That in turns
appears to be because the refs/tags/cluster-2.99.02 file had perms
0440, i.e., unreadable to the cgi process.  With world-readability
restored, the code started working again.

- FChE

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-10  0:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-10  0:03 SEGV in cgit-1.2.3 on unreadable refs/tags/FOO Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).