From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EK5cIeVsUGBVegAA0tVLHw (envelope-from ) for ; Tue, 16 Mar 2021 08:31:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IPEcHeVsUGCkagAAB5/wlQ (envelope-from ) for ; Tue, 16 Mar 2021 08:31:33 +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 D0EA3E5B8 for ; Tue, 16 Mar 2021 09:31:32 +0100 (CET) Received: from localhost ([::1]:39844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lM56x-0001Rc-Vd for larch@yhetil.org; Tue, 16 Mar 2021 04:31:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lM54p-0008RU-Az for bug-guix@gnu.org; Tue, 16 Mar 2021 04:29:19 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lM54o-0000Pp-QT for bug-guix@gnu.org; Tue, 16 Mar 2021 04:29:19 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lM54n-0000tH-JS for bug-guix@gnu.org; Tue, 16 Mar 2021 04:29:17 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47115: Grafts without deduplication can lead to breakage in Guile (was: Failure building grub-img.png when reconfiguring) Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 16 Mar 2021 08:29:16 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47115 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Jack Hill Received: via spool by 47115-submit@debbugs.gnu.org id=B47115.16158833212854 (code B ref 47115); Tue, 16 Mar 2021 08:29:16 +0000 Received: (at 47115) by debbugs.gnu.org; 16 Mar 2021 08:28:41 +0000 Received: from localhost ([127.0.0.1]:38107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lM54B-0000jO-Vf for submit@debbugs.gnu.org; Tue, 16 Mar 2021 04:28:40 -0400 Received: from world.peace.net ([64.112.178.59]:49542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lM547-0000i3-BV; Tue, 16 Mar 2021 04:28:37 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lM540-0002hw-UH; Tue, 16 Mar 2021 04:28:29 -0400 From: Mark H Weaver In-Reply-To: References: <87a6r7294k.fsf@netris.org> <877dmb1owa.fsf@netris.org> <874khds84o.fsf@netris.org> <87y2epqnq8.fsf@netris.org> Date: Tue, 16 Mar 2021 04:26:57 -0400 Message-ID: <875z1rjyfn.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 47115@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615883492; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=a+D5UQ0M71X5f2TdGeV73L6npPf0jlDBYQfSqJNFbhA=; b=ET40s9IjSCpyP5R3r75arZaGaQAy53CfzcB/Qqx1uRUSaX0cjdSRMPlkF8mniVJsk7ep+N VFNG7E9MMLqyAz18qnYnJusRIMYqjCfNWcMFFCEz7rKtVXz4MQHblFFLVgjAvB2Bhcu+Nl 0tz2wtkojRrZRQpDhlcIqySCTgPYhF1haQTtiRT+a/24gJW9IZh+iUtCWImfYV4f3pOsfZ M1mrDGCtuzZwAY5WN5XZlQOBEMT2DS+mYvjekzdHQrv4e2Qw97mWlUQ58LkYVfYcr1SF2S Ge0kyQ/MguNHT1Dwck/MK3/j2vE7Wgg+Ahg4bL3qke5YTXL1Vp84s+4BmTMrMA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615883492; a=rsa-sha256; cv=none; b=Ypvd/q2ZoUEzENT+C4fYh+Uvde1CLOi+4k8WzFRqr0VP2vPCjgWPIWCsHezeIEoF5HHrnE 0Iuibm9Bkhdl0RgHa0v7wDL5BdWGWHs1PgLTDwgUXjQh+9rIIJ2VUDKA3CMPMaBPn7Qgkj uQqmF6hV5tYz+NzI0kbXgbe6RVaMIItA4g2uh+PB9d7XpgGtF6BqJckzkESlZVd33QT2qx 41A95umV0TDSYtu0dk4JhBPwWH7tIJjiq1tQvG+0lqxf/qivdLmhygcgqboF+7gJ+N3v8v FiBipaLy8D592fwGYPOomKeid4yYXjc0HmmfOKG7Qt1b7Qmh7IG3IAg3znUDIQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.40 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: D0EA3E5B8 X-Spam-Score: -2.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8fFrWv9w+gJQ retitle 47115 Grafts without deduplication can lead to breakage in Guile thanks Hi Jack, Jack Hill writes: > I believe that I have identified the problematic difference in my > operating system config between my working and non-working hosts. Thanks very much for your investigation. > I am forced to conclude that running the guix-daemon with deduplication > disabled causes this build failure. Spooky! Very interesting! The only difference deduplication makes is that it (usually) causes identical files in the store to be hard links to the same inode. I have a new hypothesis: Suppose that a reference to the original (ungrafted) version of some library (e.g. libcairo or librsvg) has survived unchanged by the grafting process. This could lead to two copies of the same library being loaded. For example, I guess that libcairo is loaded by both librsvg and by guile-cairo. One of them might load the original libcairo, and the other might load the replacement libcairo. If the library is loaded twice, that could lead to each instance of the library having its own dynamically-allocated type tags, which could lead to this kind of error. Here's the code where the error occurred: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/svg.scm?id=bc16eacc99e801ac30cbe2aa649a2be3ca5c102a#n40 Guile uses 'cairo-create' (via guile-cairo) to create a cairo-context, and then passes it to 'rsvg-handle-render-cairo', a 'librsvg' function, which complains that the context argument has the wrong type. If 'guile-cairo' was somehow using a different instance of 'libcairo' than the one that 'librsvg' is linked to, that could explain what we're seeing, because the two instances of 'libcairo' would have different ideas of what the cairo-context tag should be. However, *if* you have deduplication enabled, and *if* the library in question doesn't contain any references that require rewrites due to grafts, then these two copies of the library would most likely[*] be hard links to the same inode. Perhaps in that case, the run-time loader recognizes that these are in fact the same library, and suppresses the redundant load. I don't know if this is what's happening, but it seems plausible. Thoughts? Regards, Mark