From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6N1eDQ9x3V8uLwAA0tVLHw (envelope-from ) for ; Sat, 19 Dec 2020 03:18:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UJYQCQ9x3V/8LAAAbx9fmQ (envelope-from ) for ; Sat, 19 Dec 2020 03:18:39 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E17B5940367 for ; Sat, 19 Dec 2020 03:18:38 +0000 (UTC) Received: from localhost ([::1]:44498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqSlR-00021l-TT for larch@yhetil.org; Fri, 18 Dec 2020 22:18:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqSlG-00021e-NJ for guix-devel@gnu.org; Fri, 18 Dec 2020 22:18:26 -0500 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]:34552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqSlE-0007I8-TQ; Fri, 18 Dec 2020 22:18:26 -0500 Received: by mail-qk1-x72f.google.com with SMTP id c7so4160158qke.1; Fri, 18 Dec 2020 19:18:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:references:from:autocrypt:subject:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=9TXO36fpNOwff/Wnd0mirImVqPWZ/XmrdRecYpeLRoA=; b=hXGBoYASIBoYLI8KNyOdoYNQepdKr3Q+aVlVILWqcWq3g0o3PUXeZSJxn5hovqz5Z7 g7pU66tyuV9k1D54XZtbG15SrgbTIF3FaHJVbKGTvNn0VLZmshH4L+5GqEoOjY25R/nF 5nRlmYxeZ50KQ5KsI7rQ0jXilOS6r/rtXfJ7ifsIrN1EyNWugHgLMoTQkMBr+i/NhfVL RhrxIUI94FFmSoUWdYUjpwb4JB6qpWkGdKEVLK+tjlw0F6mP3kIHIxvvAsthArjNb6HW OIJcvc/w9lyNUCJgd0s5tSBsSprJYQZQgn2vQw6jGe1hkdw7LYgRs0FSYFzCW0+fPhwJ ii4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:autocrypt:subject :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=9TXO36fpNOwff/Wnd0mirImVqPWZ/XmrdRecYpeLRoA=; b=LQoBsBOSI9gNAedc527w42R6b4N1kpFslfLL6ZtmHh95U21NgHJailiByB0tt/HKe3 JZhxvVMfGgRxHBB37Nz5Do8/DrIualOzauPZd2BGWUjWdAIbBNnAZXGaBH3JBHY/mp7m 2XnLDnA6OyTkMf1luS4jWLamD42UP84Ago/XNfIjO/30wkUtC9ILuHXbjHu6CEbu6KrZ wamFHpAzsyxg4xGKZKq9GQ3dX7D0bs29q+FMobzbOHvKuR+n8Fi+w0JUwASvJhMndmUg xwqgWQIVmOboc0ngLy4VvI1MoAP4weBvmyGZAQ0rFNDKwglU2sCgjM/osaMY1kzWbdEy g6lA== X-Gm-Message-State: AOAM530C7MrsqT5QpHiDzhLRhSrzJ/YPp5sjLj3ruzs5fsdSn8vPaYVT VB44ixfbr2YfAYamI33onIKu1vCwXpEnXPKR X-Google-Smtp-Source: ABdhPJzbsN6soKq/lEVfu3Lj77icMUEs6JugpBItPzMrl5BDyRJCceSv7T8XfgzYJKZkxY30a+PiaA== X-Received: by 2002:ae9:ef12:: with SMTP id d18mr8147542qkg.473.1608347902316; Fri, 18 Dec 2020 19:18:22 -0800 (PST) Received: from ?IPv6:2804:14c:bbe3:444c:918b:f160:fe95:f517? ([2804:14c:bbe3:444c:918b:f160:fe95:f517]) by smtp.gmail.com with ESMTPSA id k26sm6655113qtb.41.2020.12.18.19.18.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Dec 2020 19:18:21 -0800 (PST) To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <86r1nwfdeu.fsf@gmail.com> <86lfe3fc0t.fsf@gmail.com> <87sg839lge.fsf@gnu.org> From: Magali Autocrypt: addr=magalilemes00@gmail.com; keydata= mQINBF/OWLMBEAC9RPIj/byKDnMrDYPUHdDUalPenP0p5XAfFWcWXqlWXAMBMZ0YQMYXPm/d 3VjWcR6D+LMubp1t+Txd26rld0LWOpQxLYWJqxua4/B2nmhH+dLZV0h+QWfXRV4IrJk697q1 HvH+UKt1azS1Ayt4ryO0kW30a0RlcrZHb54FJ6ZOyU6FMk36A1oQGQOC4FMjhfx5MmwK4Jw+ Gt/7w5UF17wI99/iy407P2gEtN+toJ6+SOQ5sXX7Ce29ytYkXO2JhrCtSZ81oyFwYfs3uC0S BEJAs932wRCrAC/sDcXk5Lxh3NEpfIxhazzqnHK31v7i6XypxN2rA1Fq95q0MmCXuFlZ7moU KmMuLY7u2itBvOrbqCECt93VQlKYtTm7Y/zLwqC3GbgKM94gtLGIXt1SiB8MButJL9W3kt0F nAquMqSVqwf/qZ7Shgv8TvhbjqnLLqxHiS2ZlYk+sWzU3EpktL+oKrPx/cIPRpS0mEzCAvW5 Vr4iZpaRNAutql9k9R8ROdzFX6l3B/0uQm7aK96snF1wHCnwfmy7TuCkVpnYqK+ISmPLRQf3 qCgX/BRhQOeo64ofXMNkagEf8WXtgUUqE60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r7gbUu7HKvG85Em5ETCPxlv6b6CFTY+NuAdOPU4wGe9QDr +dDNnOgaTybO5/p5Im0RZOmnMi+/q3hObfd+Ot6tGhliekaVvZZGpsoc7XTOIujrrnXyNl9r 3jhgd1QoW1Cy0TtM/tkZ/rgv+m0TWyY8KCIo1zdmgzCuVBhfr3PwSbL/+XkoOZODFnFvE6S5 P+4V/UHeaJzG+W9AYmVwcIcfTWX4QeOo2M/qPTRwn9mgJzYfGTr3l64q+iXWA+8MtQls0RYU ijdHLA== Subject: Re: [outreachy] Walk through the Git history (guix git {authenticate,log}) Message-ID: <4789d1fe-5cc0-e0e6-f546-6bc0acd77f04@gmail.com> Date: Sat, 19 Dec 2020 00:18:18 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87sg839lge.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::72f; envelope-from=magalilemes00@gmail.com; helo=mail-qk1-x72f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel , Mathieu Othacehe Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.22 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=hXGBoYAS; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: E17B5940367 X-Spam-Score: -1.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: eaG3hyOhhgwr Hi! On 18/12/2020 12:34, Ludovic Court=C3=A8s wrote: > Hi Magali, > > Magali skribis: > >> scheme@(guix-user)> (let* ((repo (repository-open cache)) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (latest-commit >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (commit-lookup = repo (reference-target (repository-head repo))))) >> =C2=A0=C2=A0=C2=A0 (let loop ((commit latest-commit) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (res (list latest-commit))) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (match (commit-parents commit) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= (() (reverse res)) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ((head . tail) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 (loop head (cons head res)))))) >> Segmentation fault (core dumped) > I can reproduce the bug; the C backtrace looks like this: > > --8<---------------cut here---------------start------------->8--- > (gdb) bt > #0 0x00007fabfa9d31ee in git_oidmap_get () > from /gnu/store/zchrrs2zf4l06cszbadqsk18329q78sg-libgit2-1.1.0/lib/l= ibgit2.so > #1 0x00007fabfa98d516 in cache_get () from /gnu/store/zchrrs2zf4l06csz= badqsk18329q78sg-libgit2-1.1.0/lib/libgit2.so > #2 0x00007fabfa9cbef7 in git_object_lookup_prefix () > from /gnu/store/zchrrs2zf4l06cszbadqsk18329q78sg-libgit2-1.1.0/lib/l= ibgit2.so > #3 0x00007fac01b8866d in ffi_call_unix64 () > from /gnu/store/bw15z9kh9c65ycc2vbhl2izwfwfva7p1-libffi-3.3/lib/libf= fi.so.7 > #4 0x00007fac01b86ac0 in ffi_call_int () from /gnu/store/bw15z9kh9c65y= cc2vbhl2izwfwfva7p1-libffi-3.3/lib/libffi.so.7 > #5 0x00007fac01e54f2e in scm_i_foreign_call (cif_scm=3D= , pointer_scm=3D,=20 > errno_ret=3Derrno_ret@entry=3D0x7ffe5fc1f95c, argv=3D0x7fabfe2e4980= ) at foreign.c:1073 > #6 0x00007fac01ec3a84 in foreign_call (thread=3D0x7fac014a8d80, cif=3D= , pointer=3D) > at vm.c:1282 > --8<---------------cut here---------------end--------------->8--- > > Could it be that, if you keep =E2=80=98repo=E2=80=99 in a global variab= le like in the > example zimoun posted, segfault no longer occurs? Yes, this seems to work just fine. > I believe that what happens is a bug in Guile-Git: =E2=80=98repo=E2=80=99= is =E2=80=9Cfinalized=E2=80=9D > (freed) before Guile inspects the commit objects to print them, and whe= n > Guile gets around to printing those commit objects, they now refer to a= > repo that has been freed, hence the crash. > > Until the bug is fixed, the workaround is to arrange your code so that > the repository object outlives commit objects. We can discuss this > further here or on IRC if you want. Nice! Thanks. > Hope this helps! It sure did :-) Magali