From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs reproducible builds part1 of 2 : eln Date: Fri, 12 Jan 2024 10:22:10 +0200 Message-ID: <83jzofj70t.fsf@gnu.org> References: <8d01d73e-7ce1-4b3a-a25c-03b518a7e584@lsmod.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23124"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: "Bernhard M. Wiedemann" , Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 12 09:23:30 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rOCp6-0005h1-R9 for ged-emacs-devel@m.gmane-mx.org; Fri, 12 Jan 2024 09:23:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOCoA-0007XZ-2Y; Fri, 12 Jan 2024 03:22:30 -0500 Original-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 1rOCo8-0007X9-DK for emacs-devel@gnu.org; Fri, 12 Jan 2024 03:22:28 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOCo6-0000yk-Ft; Fri, 12 Jan 2024 03:22:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+Ac1gJ+QQnFyUjnSytKZ6bsc4f1OLOjVrKuL7r/nEBw=; b=HDREem+IF6XT 8z+Ls63UwDOuraZ0wzi/GrdQi7a9WrcTUPkCxPTJghXMZ/p8DREl9Tmtib7VHUFzDypGP65FbweGm BEyMSxt+g0VkEXQohTMHA3qxKAH5M4SW+0XK6mgy89vNDTJkORUTS9TIvVSUxn+wiabJwXN9tPkPS Dq5V+MmCRyT4+HG1wHDGIoCZHwyQkITfSYpwb2pvNdkLyMGhuKUSpiSfZD13oifUL6PF1zLzfT7nW eoZlmUgM1rGkKCGu8enYqKln0wENnEmDCq2vtVhzpjPtohSzDrtVEm2ae/D9ieEd3i6mNsIlzlEcN vQJVUA/V4cMlPh99Dl39IQ==; In-Reply-To: <8d01d73e-7ce1-4b3a-a25c-03b518a7e584@lsmod.de> (bernhardout@lsmod.de) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314892 Archived-At: > Date: Thu, 11 Jan 2024 22:17:24 +0100 > From: "Bernhard M. Wiedemann" > > I'm working on reproducible builds for openSUSE > and in that process found that our emacs-29.1 > package varies across builds from 2 different issues > > The diff is visible at > https://rb.zq1.de/compare.factory-20231231/diffs/emacs-compare.out > > Here is a simple reproducer that works in our build env: > > cd ~/rpmbuild/BUILD/emacs-29.1/native-lisp && > for i in $(seq 10) ; do > ../src/emacs -batch \ > --eval "(batch-native-compile t)" ../lisp/term/x-win.el && > md5sum 29.1-70b784e9/x-win-3c49581f-6ddb7e08.eln > done | sort | uniq -c > > > That prints variations of > 6 0c749bdbef8d9fa7b1afc2f042caf45b > 29.1-70b784e9/x-win-3c49581f-6ddb7e08.eln > 2 3022ea8c675b69ac79005281fd824179 > 29.1-70b784e9/x-win-3c49581f-6ddb7e08.eln > 2 57bc581456c38395e9ac6409bbcb0d6e > 29.1-70b784e9/x-win-3c49581f-6ddb7e08.eln > > > while the same with setarch -R ../src/emacs > produces deterministic > 10 0c749bdbef8d9fa7b1afc2f042caf45b > 29.1-70b784e9/x-win-3c49581f-6ddb7e08.eln > > So somewhere in the batch-native-compile code is a place that adds > ASLR-related non-determinism into the .eln file. From the diff, it > probably is some ordering issue. > > I'd appreciate pointers to where that non-determinism gets added and how > to patch it out. Andrea, can you perhaps help Bernhard understand where the differences come from?