emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs reproducible builds part1 of 2 : eln


From: Andrea Corallo
Subject: Re: emacs reproducible builds part1 of 2 : eln
Date: Fri, 12 Jan 2024 11:19:58 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]