From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9078 invoked from network); 10 Jun 2023 00:04:03 -0000 Received: from lists.zx2c4.com (165.227.139.114) by inbox.vuxu.org with ESMTPUTF8; 10 Jun 2023 00:04:03 -0000 Received: by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTP id b46c3568; Sat, 10 Jun 2023 00:03:47 +0000 (UTC) Return-Path: Received: from elastic.org (elastic.org [96.126.110.187]) by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id 828a0f91 (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO) for ; Sat, 10 Jun 2023 00:03:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=elastic.org ; s=default2; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9SIoEXt7uLeHJBEPX4ebN0t5FqEvnLjKDb9mGriGruk=; b=SAyNSNFbvX79u8IaQQfmLmIaUp dNJTO2CcFn4UX5UQgm5vDatzTdqQ7EsQVh0NWVEyJX1oDT7xCTeixTHhWvMfZV2lzSMis9NGUjl5w 3WmgvHWH9vP3kXnW4g5UcVOzuhbwhhOmKWxDhEgtfNk3pbahlQPqPQF/gru9NTeQIzzM+iQxdsmcp cVco4haxxkLfREob3XlhWgus7qjbuUwpvyQW6N3CL422DQbqPNUbjeVo2V/aAvEUCbkucO1jH4GnF rWzEC4mq8FqHSvXYLpj76ufL/rrHEebC1Xt+IoSP4qQZXHdsRsNOAc5j/YxChA3QnugYKXE7I89st W+Le6Ugg==; Received: from vpn-home.elastic.org ([10.0.0.2] helo=elastic.org) by elastic.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1q7m52-0007On-1e for cgit@lists.zx2c4.com; Sat, 10 Jun 2023 00:03:44 +0000 Received: from very.elastic.org ([192.168.1.1]) by elastic.org with esmtp (Exim 4.96) (envelope-from ) id 1q7m52-000Kaj-1g for cgit@lists.zx2c4.com; Fri, 09 Jun 2023 20:03:44 -0400 Received: from fche by very.elastic.org with local (Exim 4.96) (envelope-from ) id 1q7m52-000zAC-0G for cgit@lists.zx2c4.com; Fri, 09 Jun 2023 20:03:44 -0400 Date: Fri, 9 Jun 2023 20:03:44 -0400 From: "Frank Ch. Eigler" To: cgit@lists.zx2c4.com Subject: SEGV in cgit-1.2.3 on unreadable refs/tags/FOO Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Sender-Verification: "" X-BeenThere: cgit@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: List for cgit developers and users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cgit-bounces@lists.zx2c4.com Sender: "CGit" Hi - Over on sourceware.org, 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=, cb_data=0x7fff6dc25fc0) at ../shared.c:217 #2 0x00005651045d3b44 in do_for_each_repo_ref_iterator (r=0x56510490fc20 , iter=0x565105f7de00, fn=fn@entry=0x5651045c6cc0 , cb_data=cb_data@entry=0x7fff6dc25f80) at refs/iterator.c:418 #3 0x00005651045c9669 in do_for_each_ref (refs=, prefix=prefix@entry=0x5651046a1d4e "refs/tags/", fn=, trim=, flags=flags@entry=(unknown: 0), cb_data=cb_data@entry=0x56510453295b ) at refs.c:1498 #4 0x00005651045c96f2 in refs_for_each_ref_in (refs=, prefix=prefix@entry=0x5651046a1d4e "refs/tags/", fn=, cb_data=cb_data@entry=0x56510453295b ) at refs.c:1515 #5 0x00005651045ca217 in refs_for_each_tag_ref (cb_data=0x56510453295b , fn=, refs=) at refs.c:409 #6 for_each_tag_ref (fn=, 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' , 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