unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo <acorallo@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Bernhard M. Wiedemann" <bernhardout@lsmod.de>,  emacs-devel@gnu.org
Subject: Re: emacs reproducible builds part1 of 2 : eln
Date: Fri, 12 Jan 2024 11:19:58 -0500	[thread overview]
Message-ID: <yp1edemwmkx.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <83jzofj70t.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 Jan 2024 10:22:10 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Thu, 11 Jan 2024 22:17:24 +0100
>> From: "Bernhard M. Wiedemann" <bernhardout@lsmod.de>
>> 
>> 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?

Mmmh, from what I can see from the diff looks like to me in x-win we
have some circular object.  For some reason when we serialize (print) it
in order to store it into the eln the result is not reproducible with
ASLR (!?).

That's bizarre.

  Andrea



  reply	other threads:[~2024-01-12 16:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 21:17 emacs reproducible builds part1 of 2 : eln Bernhard M. Wiedemann
2024-01-12  8:22 ` Eli Zaretskii
2024-01-12 16:19   ` Andrea Corallo [this message]
2024-01-12 16:26     ` Eli Zaretskii
2024-01-13  9:52       ` Andrea Corallo
2024-02-10 16:35         ` Andrea Corallo
2024-02-10 17:45           ` Stefan Monnier
2024-02-10 18:31             ` Andrea Corallo
2024-02-10 18:44               ` Stefan Monnier
2024-02-10 20:37                 ` Andrea Corallo
2024-02-11 10:24                   ` Andrea Corallo
2024-02-11 20:13                     ` Stefan Monnier
2024-02-11 21:44                       ` Andrea Corallo
2024-05-22  6:06                     ` Bernhard M. Wiedemann
2024-05-22 12:31                       ` Eli Zaretskii
2024-05-27 17:33                       ` Andrea Corallo
2024-05-28 15:20                         ` Andrea Corallo
2024-05-31  7:26                           ` Bernhard M. Wiedemann
2024-05-31  7:44                             ` Andrea Corallo
2024-05-31  8:22                               ` Bernhard M. Wiedemann
2024-05-31 10:45                                 ` Eli Zaretskii
2024-05-31 10:33                               ` Eli Zaretskii
2024-01-12 16:14 ` Simon Tournier
2024-01-12 20:13   ` Eli Zaretskii
2024-02-12  7:10 ` Björn Bidar
     [not found] ` <87il2ub1jy.fsf@>
2024-02-12  8:17   ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yp1edemwmkx.fsf@fencepost.gnu.org \
    --to=acorallo@gnu.org \
    --cc=bernhardout@lsmod.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).