GNU bug report logs -
#79082
30.1; [reproducibility] sysinfo call during profile dump
Previous Next
To reply to this bug, email your comments to 79082 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79082
; Package
emacs
.
(Wed, 23 Jul 2025 14:11:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Nicolas Graves <ngraves <at> ngraves.fr>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 23 Jul 2025 14:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi emacs,
I recently worked a bit on reproducibility which is not guaranteed in
particular in the profile dump. I found that undeterminism during the
profile dump comes from two sources : calls to clock_gettime and
sysinfo.
clock_gettime is not that hard to patch using faketime, but it's called
multiple times so it'll be harder to find where in the codebase.
We don't have dedicated tools to patch sysinfo without compiling an
additional file an using the same LD_PRELOAD trick as faketime, but
there's actually an OK solution on the lisp side, IMHO (this is what I
propose for guix's emacs <at> 30.1, but it'd be great to add that on the next
release:
(add-after 'unpack 'avoid-sysinfo-call-at-build-time
(lambda _
;; This is a useful trick for reproducibility: when we configured
;; with --disable-build-details, (system-name) is nil at build
;; time on the lisp side.
;; Find those places with strace -k -e sysinfo.
(substitute* "lisp/jit-lock.el"
(("\\(condition-case nil \\(load-average\\) \\(error\\)\\)"
all)
(format #f "(and (system-name) ~a)" all)))))
It's only a single line change (with maybe a comment addition), please
proceed without my feedback if I don't answer, it doesn't deserve a
copyright citation.
--
Best regards,
Nicolas Graves
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.