On Wed, 2007-10-03 at 01:15 +0000, Adam Leventhal wrote: 
> > thank you for the explanation. What would cause these symbols to change? 
> > The 
> > only thing that I changed between build was the introduce parallelism 
> > between 
> > uts and lib build plus additional parallelism in uts build.
> 
> dtrace -G chooses a randomly generated prefix for the symbols. They should
> change every time a workspace is built.

But my inner two-year-old compels me to ask:

Why?

if they were actually random, the values in the examples were just large
enough that collisions would occur frequently enough to bother people
but be annoyingly hard to reproduce.

So I cheated.  (I read the libdtrace code; it looks like this is in
usr/src/libdtrace/common/dt_link.c).  

Assuming I found the right place, it's not actually random.  

It uses ftok(path, 0) on the file; that ftok invocation produces a
24-bit integer based on 12 bits of device and 12 bits of inode number.
This is actually better than a truly random value that small as it makes
collisions less likely, at least on small filesystems. 

I (and, well, anyone who has to use wsdiff) have this thing about build
reproduceability -- it's best if the same source tree produces the same
objects.  Can we do something more collision-resistant but deterministic
so as to not cause these sorts of false positives for wsdiff?

                                        - Bill












_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to