From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id kONcAq+t7mQpcQEA9RJhRA:P1 (envelope-from ) for ; Wed, 30 Aug 2023 04:47:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kONcAq+t7mQpcQEA9RJhRA (envelope-from ) for ; Wed, 30 Aug 2023 04:47:11 +0200 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 BBF31560B3 for ; Wed, 30 Aug 2023 04:47:10 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=AEIeuVu6; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693363631; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=qMV6RbmHhcrXvguhmJw1ERF9N3V7rPow9FwSYmF8h2M=; b=asAV5rhq53xJg5V5hF1YbahmOfEXgJhMErav2alRc65zlf60zX61SVnk9r6KjSCJ+oYBTK XM9zA1K9i6duw4IlWQ21NDD8IDwSsxe6dAtHzLx+VkIg9Q9AtwG8a+uhszNaLVSFRDjoXg ay/5k3EhBmZYSIMfHIVDycDTU6ytm2prIh1/o4yqGDEj08aj9MUsV6/6fW/wIJfCgtZwh8 5tK9Yzg1jZnSTtWQj7sed+kHq69Yxc5s6hhLDzkBdLXg7Bud96BjDa6rQflKNHSMZ6Jkus D8eAe2OazT/IGUlcfMHZY9e5YtybOX/0MqvuSvQAjW3FFiBiIRXVH+5oMvRWeA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693363631; a=rsa-sha256; cv=none; b=VwCievn8+ypfIKe/ZB37bDke7CeigDhfSO2ZP2UDeYZYyxrLsM5Z2Vo3nM4QYdZ5guQoZ1 nOGBs1nHVlnuvOAPsDuZFb8e110iHIK3c2HNmNZ/u29AuEi/LWaubUN8U7YE2HDu9yW5dN Wekq0r4YJ+iZllJ9trEzisC/h78Ey7A/OeCl1mD9IvhDZIHhMHJ+mp7mxp/MML/HTyp/xw rho0H7rCQma5XP2WjPgVZZaVvNV4EFSfbk/yUkQSdshrUuzgy64/FPMfIJNAXlXBQg7CDW 8OBN9t0f+PNPhhQVWAsdM61Cq5VbLkjyCZzRPHquAhBDP0dXxC+9ym/bgRdVcg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=AEIeuVu6; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbBE9-0003jd-DR; Tue, 29 Aug 2023 22:46:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbBE7-0003j5-HS for guix-devel@gnu.org; Tue, 29 Aug 2023 22:46:39 -0400 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbBDw-0005y9-Gz for guix-devel@gnu.org; Tue, 29 Aug 2023 22:46:30 -0400 Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-76d7224c5bcso284042885a.2 for ; Tue, 29 Aug 2023 19:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693363587; x=1693968387; darn=gnu.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=qMV6RbmHhcrXvguhmJw1ERF9N3V7rPow9FwSYmF8h2M=; b=AEIeuVu66YwlJeH+mX4xxYzGhSBNIT1yOpNSgfcCErPCwm7vNZQPbeiUZLEp12xh5Y 5xZOSEKmn9rJLXIXESemt4oIdD1AZuLYhOcY3O0DXVuC+S0asyszt382/PeguhHT9UNE h5MWKMg6GQNnvp8MJRWtcoRYOgA4m4Uj3w+Qj27b8Jd8oDT3FEqRoQ9v0WmPAO6n9yeO Nag/5vEdMXLX/IB+4pBNfKkCIY7oo45ppty0VK6Nl241lpg6xfgL7pHIKCf9aafQSxPj zcx8A9asO/5PMx8Pq1Hht1bx6DhaiW3BwaJ+3TIvOP5mM99FnpkLW08ianNz8GYOlgWU mzqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693363587; x=1693968387; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qMV6RbmHhcrXvguhmJw1ERF9N3V7rPow9FwSYmF8h2M=; b=I9h0UAYXFZlZRfPmJf9yUAW0F413nBJTzgauf2K1zr9l1qLEG6OI49knENjwQpqCCy dJhditF6/BjLv0k1AEX4kXSE5dqUipqfb/wcKif2/EaW/lKhpMDtfOadoQ4igCL8LxC+ DezU75U6eWk2ZE4360UDQ8xa+8qKnR5liDSiNx4Za14rw8Y9OTVKOmUP5Bp4f4BAPZ3c Xpoe5+JYpZPWPva7OSF9VEGK6CSoZMMOeiH3Zfc91vM+i220e8fPjUMyYjoTsJQgZqaT l7SG2n2086ixphytO/6bqGaOw5uT2jiA9RgFgsiiiCWZ3rgwwedgnhxhXmMFZzknPtMp O/YQ== X-Gm-Message-State: AOJu0YwnSEwStTrhq2wUrORWpZ660+yRLYY7RqtBK2q+xhTYprqkBcfn +gmUD8ePYEG+MvonPqyhfuC4LGEFRqvdrg== X-Google-Smtp-Source: AGHT+IHu81lsEVu92YR2vFGGlZAQkuDe20sLpfBT0RGsanTDIi4ig9b/Avo8z+1MFtOQiQdh/rTrqw== X-Received: by 2002:a05:620a:4414:b0:76f:1846:2f6d with SMTP id v20-20020a05620a441400b0076f18462f6dmr936324qkp.48.1693363586820; Tue, 29 Aug 2023 19:46:26 -0700 (PDT) Received: from hurd (dsl-10-132-204.b2b2c.ca. [72.10.132.204]) by smtp.gmail.com with ESMTPSA id i1-20020a0cf101000000b00641899958efsm3782632qvl.130.2023.08.29.19.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Aug 2023 19:46:26 -0700 (PDT) From: Maxim Cournoyer To: Csepp Cc: Katherine Cox-Buday , guix-devel@gnu.org Subject: Re: How can we decrease the cognitive overhead for contributors? References: <871qfsayyx.fsf@riseup.net> <87bketjj1f.fsf@gmail.com> <87zg29jwb8.fsf@riseup.net> Date: Tue, 29 Aug 2023 22:46:25 -0400 In-Reply-To: <87zg29jwb8.fsf@riseup.net> (Csepp's message of "Wed, 30 Aug 2023 00:40:40 +0200") Message-ID: <87o7ip6yda.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::735; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x735.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=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.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.58 X-Spam-Score: -8.58 X-Migadu-Queue-Id: BBF31560B3 X-Migadu-Scanner: mx2.migadu.com X-TUID: a7BvmdB9NnYG Hi Csepp, Csepp writes: > Maxim Cournoyer writes: > >> Hi, >> >> Csepp writes: >> >> [...] >> >>> but as soon as something breaks, you are thrown into the deep end, >>> having to dissect logs, bisect commit ranges, learn strace, gdb (which >>> still doesn't work well on Guix) >> >> Hm? While GDB on Guix may be sometimes more challenging than say, on >> Fedora, I only know of one problem, that is related to grafts (see: #48907). >> >> For running binaries wrapped in shell script, I have this 'run-gdb' >> wrapper which reads: >> >> --8<---------------cut here---------------start------------->8--- >> #!/usr/bin/env bash >> >> wrapper=$(cat $(which $1)) >> shift >> . <(echo "$wrapper" | grep ^export) >> binary=$(echo "$wrapper" | grep ^exec | grep -o -E '/gnu/store[^"]*') >> gdb --args "$binary" "$@" >> --8<---------------cut here---------------end--------------->8--- >> >> Hope that helps, > > Thanks, it does somewhat, but this is the kind of thing that should be > either packaged in Guix, documented in the cookbook, or preferably fixed > upstream. > At the very least I try to document these helper Guix-specific helper > scripts on the mailing list. I've asked where it would be appropriate > to put them (cookbook, package, guix module, etc) but I don't think I > got a response. > This is exactly what I mean by core devs having their own scripts that > others don't have an easy way to find and/or access. I think a "Debugging with GDB" section in the Cookbook showcasing such script would be a good option. Patches welcome! > The other problem is the difficulty of accessing debug symbols. > One problem is the need to recompile the package you need symbols for, > the other is loading external symbols. The first is a CI issue as far > as I know: all the debug outputs would take up too much space > (probably). We have tons of disk space on Berlin, at least. I don't think it'd be an issue at least there (not sure about Bordeaux). We could also look into having our debug symbols de-duplicated with something like dwz (https://sourceware.org/mailman/listinfo/dwz) to make them smaller, or see if Fedora does something smart in this regard. > This may not be fixable in the short term without > additional funding. The second is purely technical though. > Maybe someone fixed it since the last time I tried to use GDB, but if > not, it should be a priority IMHO. Guix packages often have bugs and we > should do everything in our power to make fixing future problems easier, > otherwise the project risks the death of a thousand cuts. Loading external (such as from linked libraries?) symbols should work, provided they are in the profile you're working with, that gdb is there, and that it has access to the default ~/.guile file (e.g. not in a container), so that it automatically set 'debug-file-directory' for you, from the GDB_DEBUG_FILE_DIRECTORY environment variable. Also, build the profile with --no-grafts to avoid the bug mentioned earlier (#48907). -- Thanks, Maxim