Package: systemtap-sdt-dev
Version: 4.8-1
User: reproducible-bui...@lists.alioth.debian.org
Usertags: randomness filesystem
Control: block 1032055 by -1

`dtrace -G` creates temporary files with random filenames. The name of these temporary files gets embedded in the ELF `.symtab` of the final object files, making them always slightly different.

This behavior makes all packages that use `dtrace`-produced object files inherently non reproducible.

Instead of being fully random, `dtrace` should employ some sort of controlled reproducible randomness, for example based on the value of `SOURCE_DATE_EPOCH`. See also <https://reproducible-builds.org/docs/randomness/>.

To reproduce this issue:

```
$ git clone https://salsa.debian.org/sssd-team/sssd.git
$ cd sssd
$ mkdir -p build && cd build/

$ dtrace -C -G -s ../src/systemtap/sssd_probes.d -o stap_generated_probes.o
$ readelf --wide --symbols stap_generated_probes.o > sym1.txt

$ dtrace -C -G -s ../src/systemtap/sssd_probes.d -o stap_generated_probes.o
$ readelf --wide --symbols stap_generated_probes.o > sym2.txt

$ diff -u sym1.txt sym2.txt
--- sym1.txt    2023-02-27 08:38:48.955299234 +0100
+++ sym2.txt    2023-02-27 08:38:49.103303352 +0100
@@ -2,7 +2,7 @@
 Symbol table '.symtab' contains 59 entries:
 Num:    Value  Size Type    Bind   Vis      Ndx Name
   0: 0000000000   0 NOTYPE  LOCAL  DEFAULT  UND
-  1: 0000000000   0 FILE    LOCAL  DEFAULT  ABS .dtrace-temp.4f0bbdda.c
+  1: 0000000000   0 FILE    LOCAL  DEFAULT  ABS .dtrace-temp.d20e76c7.c
   2: 0000000000   0 SECTION LOCAL  DEFAULT    1 .text
   3: 0000000000   7 FUNC    LOCAL  DEFAULT    1 __dtrace
   4: 0000000000   0 SECTION LOCAL  DEFAULT    5 .debug_info
```

Regards,

--
Gioele Barabucci

Reply via email to